User:Zulu Foxtrott/GentooOnARM/EasyInstall/Bootloader
From Gentoo Wiki
< User:Zulu Foxtrott | GentooOnARM | EasyInstall
Jump to:navigation
Jump to:search
Installing the sources
On PINE64's ROCKPro64 Das U-Boot (the Universal Boot Loader) can perform both, initialize the hardware and boot a Linux kernel. To be able to do so it depends on Trusted Firmware A.
Trusted Firmware A
Downloading the sources
root #
cd /mnt/gentoo/usr/src
Unpacking the sources
root #
mkdir /mnt/gentoo/usr/src/trusted-firmware-a
root #
tar xvpf -C /mnt/gentoo/usr/src/trusted-firmware-a
U-Boot
Downloading the sources
root #
cd /mnt/gentoo/usr/src
Unpacking the sources
root #
mkdir /mnt/gentoo/usr/src/uboot
root #
tar xvpf -C /mnt/gentoo/usr/src/uboot
Building Trusted Firmware A
root #
cd /mnt/gentoo/usr/src/trusted-firmware-a
root #
make PLAT=rk3399
Building U-Boot
root #
cd /mnt/gentoo/usr/src/uboot
root #
export BL31="/mnt/gentoo/usr/src/trusted-firmware-a/build/rk3399/release/bl31/bl31.elf"
Configuring U-Boot
root #
make rockpro64-rk3399_defconfig
Optional: Tuning U-Boot manually
root #
make menuconfig
Compiling U-Boot
root #
make
Installing
root #
dd if=/mnt/gentoo/usr/src/uboot/idbloader.img of=/dev/mmcblk0p1
root #
dd if=/mnt/gentoo/usr/src/uboot/u-boot.itb of=/dev/mmcblk0p2
Configuring extlinux
root #
mkdir /mnt/gentoo/boot/extlinux
root #
nano -w /mnt/gentoo/boot/extlinux/extlinux.conf
TODO: dtb installed before?; document change of blkdev handle; add initrd example
label kernel-5.10
kernel /Image
fdt /rk3399-rockpro64.dtb
append earlyprintk root=/dev/mmcblk1p4 rootwait rootfstype=btrfs init=/sbin/init