The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Adaptations/PinePhone64

From Mer Wiki
< Adaptations(Difference between revisions)
Jump to: navigation, search
(Kernel)
(U-Boot)
Line 36: Line 36:
  
 
  booti ${kernel_addr_r} - ${fdt_addr_r}
 
  booti ${kernel_addr_r} - ${fdt_addr_r}
 +
 +
=== Automatic boot ===
 +
 +
Create boot.cmd
 +
 +
echo Setting bootargs
 +
setenv bootargs console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p2 no_console_suspend rootwait
 +
earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1
 +
printenv
 +
echo Loading DTB
 +
load mmc 0:1 ${fdt_addr_r} /sun50i-a64-dontbeevil.dtb
 +
echo Loading kernel Image
 +
load mmc 0:1 ${kernel_addr_r} /Image
 +
echo Booting kernel NOW
 +
booti ${kernel_addr_r} - ${fdt_addr_r}
 +
 +
Mount you first partion to /mnt and run command:
 +
sudo mkimage -C none -A arm -T script -d /mnt/boot.cmd /mnt/boot.scr
  
 
==Kernel==
 
==Kernel==

Revision as of 11:48, 7 May 2019

Contents

Hardware Support

Instalation

Preparate SD card

U-Boot

Clone u-boot (master branch):

git clone github.com/u-boot/u-boot

Compile u-boot

export CROSS_COMPILE=aarch64-linux-gnu-
ARCH=arm64 make clean
ARCH=arm64 make sopine_baseboard_defconfig
ARCH=arm64 make

Prepare you sd-card

Copy to first sector on SD card:

sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=8k seek=1

You can create a boot partition on the SD card with the first MB empty (used by U-boot), GParted -> EXT4 formatting, leave the defaults. I created 2 partitions: a small one for the U-boot stuff and other for maybe later the data.

Manual load kernel

Serial TTY Baudrate UART = 115200 for screen, example: screen /dev/ttyUSB0 115200 You have to start screen first, before turning on the dev kit. Interrupt the U-boot autoboot process when you see the message in the U-boot prompt. We need to access the U-boot prompt to load the Kernel image and boot it! Kernel loading

ext4load mmc 0:1 ${kernel_addr_r} <IMAGE NAME> should be /Image
ext4load mmc 0:1 ${fdt_addr_r} /sun50i-a64-sopine-baseboard.dtb

Boot kernel

booti ${kernel_addr_r} - ${fdt_addr_r}

Automatic boot

Create boot.cmd

echo Setting bootargs
setenv bootargs console=tty0 console=ttyS0,115200 root=/dev/mmcblk0p2 no_console_suspend rootwait 
earlycon=uart,mmio32,0x01c28000 panic=10 consoleblank=0 loglevel=1
printenv
echo Loading DTB
load mmc 0:1 ${fdt_addr_r} /sun50i-a64-dontbeevil.dtb
echo Loading kernel Image
load mmc 0:1 ${kernel_addr_r} /Image
echo Booting kernel NOW
booti ${kernel_addr_r} - ${fdt_addr_r}

Mount you first partion to /mnt and run command:

sudo mkimage -C none -A arm -T script -d /mnt/boot.cmd /mnt/boot.scr

Kernel

Clone kernel

git clone https://gitlab.com/pine64-org/linux
cd linux
git checkout pinephone-dontbeevil

Configure kernel

Kernel config: https://gitlab.com/pinephone-sailfish-os/linux-kernel/raw/master/pinephone-config . Copy it to main directory as .config

Build kernel

export ARCH=arm64
export CROSS_COMPILE=aarch64-linux-gnu-
export LOCALVERSION=-nemo
make clean
make oldconfig
make Image modules dtbs

Install kernel

Image arch/arm64/boot/Image Device tree files: arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil.dtb arch/arm64/boot/dts/allwinner/sun50i-a64-dontbeevil.dts

Modules install:

make modules_install INSTALL_MOD_PATH=../linux_modules/

Nemo Mobile

Sailfish OS

Personal tools