User:Zulu Foxtrott/Rockpro64/Bootloader

From Gentoo Wiki
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