en:bpi-r2pro:barebox
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
en:bpi-r2pro:barebox [2022/04/12 21:44] – [testing barebox] frank | en:bpi-r2pro:barebox [2023/06/08 17:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Barebox ====== | ||
+ | |||
+ | alternative to uboot as bootloader, supports ethernet/ | ||
+ | |||
+ | Doc: https:// | ||
+ | |||
+ | Git: https:// | ||
+ | |||
+ | Bootlin: https:// | ||
+ | |||
+ | Mailinglist archive: https:// | ||
+ | ===== build ===== | ||
+ | |||
+ | sudo apt install lzop | ||
+ | | ||
+ | cp rk3568_bl31_v1.24.elf firmware/ | ||
+ | cp rk3568_ddr_1560MHz_v1.11.bin arch/ | ||
+ | cp rk3568_ddr_1560MHz_v1.11.bin arch/ | ||
+ | | ||
+ | ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make rockchip_v8_defconfig | ||
+ | ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make menuconfig | ||
+ | ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make | ||
+ | |||
+ | #flash to sdcard | ||
+ | dd if=barebox-rk3568-bpi-r2pro.img of=/dev/sdx bs=1024 seek=32 | ||
+ | |||
+ | #flash to emmc from running system: | ||
+ | dd if=barebox-rk3568-bpi-r2pro.img of=/ | ||
+ | |||
+ | https:// | ||
+ | |||
+ | ===== testing barebox ===== | ||
+ | |||
+ | if barebox is already flashed it can chainload another one to avoid flashing it for testing | ||
+ | |||
+ | bootm / | ||
+ | |||
+ | booting the barebox.bin in root failed on my board, but flashimage (images/ | ||
+ | |||
+ | ERROR: Unknown OS filetype (try -f) | ||
+ | handler failed with: Invalid argument | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | barebox can be chainloaded in uboot this way: | ||
+ | |||
+ | < | ||
+ | => fatload mmc 1:2 ${kernel_addr_r} barebox-dt-2nd.img | ||
+ | => fatload mmc 1:2 ${fdt_addr_r} rk3568-bpi-r2-pro.dtb | ||
+ | => booti ${kernel_addr_r} - ${fdt_addr_r} | ||
+ | </ | ||
+ | |||
+ | using images/ | ||
+ | |||
+ | I've noticed that network does not work if barebox is chainloaded. Network works if barebox is flashed. | ||
+ | ===== booting kernel ===== | ||
+ | |||
+ | ==== bootloader (blspec) ==== | ||
+ | |||
+ | boot -m sd.1 | ||
+ | |||
+ | list all conf files in folder loader/ | ||
+ | |||
+ | example of a conf for this menu | ||
+ | |||
+ | < | ||
+ | # cat / | ||
+ | title Linux GZip | ||
+ | version 5.16 | ||
+ | options earlycon=uart8250, | ||
+ | linux / | ||
+ | devicetree | ||
+ | initrd | ||
+ | </ | ||
+ | |||
+ | ==== manual ==== | ||
+ | |||
+ | < | ||
+ | mount -a | ||
+ | ls / | ||
+ | |||
+ | bootm -o / | ||
+ | |||
+ | global.bootm.oftree=/ | ||
+ | global.bootm.image=/ | ||
+ | global.bootm.initrd=/ | ||
+ | global linux.bootargs.rootfs=" | ||
+ | bootm | ||
+ | </ | ||
+ | |||
+ | ==== tftp ==== | ||
+ | |||
+ | Tftp not yet working in v1.0, i have added network changes which are working in linux,but get no traffic on eth1. | ||
+ | |||
+ | by default it uses these filenames (defaultenv/ | ||
+ | |||
+ | * kernel (${global.user}-linux-${global.hostname}): | ||
+ | * my barebox: none-linux-bpi-r2pro | ||
+ | * upstream: none-linux-rk3568-evb | ||
+ | * fdt (${global.user}-oftree-${global.hostname}): | ||
+ | * my barebox: none-oftree-bpi-r2pro | ||
+ | * upstream: none-oftree-rk3568-evb | ||
+ | * initrd (${global.user}-initramfs-${global.hostname}): | ||
+ | * my barebox: none-initramfs-bpi-r2pro | ||
+ | * upstream: none-initramfs-rk3568-evb | ||
+ | |||
+ | booted by default (issue dhcp and uses gateway as tftp-server) or run (here with additional bootargs like earlycon, | ||
+ | < | ||
+ | global linux.bootargs.debug=" | ||
+ | #global linux.bootargs.video=" | ||
+ | #global linux.bootargs.console=" | ||
+ | boot net | ||
+ | </ | ||
+ | |||
+ | another filenames can be used if defining the bootm-variables with tftp-filesystem (here with different fdt) | ||
+ | |||
+ | imgdir=/ | ||
+ | global.bootm.image=$imgdir/ | ||
+ | global.bootm.oftree=$imgdir/ | ||
+ | # | ||
+ | global linux.bootargs.rootfs=" | ||
+ | #echo $global.linux.bootargs.debug | ||
+ | # | ||
+ | #echo $global.linux.bootargs.video | ||
+ | bootm | ||
en/bpi-r2pro/barebox.txt · Last modified: 2023/06/08 17:06 by 127.0.0.1