Сборка загрузчика UBOOT

u-boot. запросто и быстро компилируется на OPi
тестировал на Armbian_5.75_Orangepipc_Ubuntu_bionic_next_4.19.20

uname -a


Linux orangepipc 4.19.20-sunxi #5.75 SMP Sat Feb 9 19:02:47 CET 2019 armv7l armv7l armv7l GNU/Linux

надо например мне включить в u-boot CONFIG_OLD_SUNXI_KERNEL_COMPAT=y

apt install libncurses-dev python-dev swig
git clone git://git.denx.de/u-boot-sunxi.git
cd u-boot-sunxi

For all supported boards there are ready-to-use default
configurations available; just type make board_name_defconfig

make orangepi_pc_defconfig
make menuconfig
make -j4
dd if=/dev/zero of=/dev/mmcblk0 bs=1024 seek=544 count=128
dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
reboot

Здесь, первая команда dd предназначена для очистки переменных окружения U-Boot, а вторая, — для записи начального SPL загрузчика и, непосредственно, U-Boot.
подробнее тут.

Вывод U-Boot информации serial console на плате Orange Pi PC

U-Boot SPL 2019.04-rc1-00629-gd065a6c00a (Feb 19 2019 - 07:15:33 +0000)
DRAM: 1024 MiB
Trying to boot from MMC1


U-Boot 2019.04-rc1-00629-gd065a6c00a (Feb 19 2019 - 07:15:33 +0000) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi PC
DRAM:  1 GiB
MMC:   mmc@1c0f000: 0
Loading Environment from FAT... Unable to use mmc 0:1... In:    serial
Out:   vidconsole
Err:   vidconsole
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
USB4:   USB EHCI 1.00
USB5:   USB OHCI 1.0
USB6:   USB EHCI 1.00
USB7:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 1 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 3 for devices... 1 USB Device(s) found
scanning bus 4 for devices... 1 USB Device(s) found
scanning bus 5 for devices... 1 USB Device(s) found
scanning bus 6 for devices... 1 USB Device(s) found
scanning bus 7 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
3798 bytes read in 2 ms (1.8 MiB/s)
## Executing script at 43100000
U-boot loaded from SD
Boot script loaded from mmc
201 bytes read in 1 ms (196.3 KiB/s)
8129656 bytes read in 368 ms (21.1 MiB/s)
7323200 bytes read in 332 ms (21 MiB/s)
Found mainline kernel configuration
29109 bytes read in 10 ms (2.8 MiB/s)
4155 bytes read in 6 ms (675.8 KiB/s)
Applying kernel provided DT fixup script (sun8i-h3-fixup.scr)
## Executing script at 44000000
## Loading init Ramdisk from Legacy Image at 43300000 ...
   Image Name:   uInitrd
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8129592 Bytes = 7.8 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 43000000
   Booting using the fdt blob at 0x43000000
EHCI failed to shut down host controller.
   Loading Ramdisk to 4983f000, end 49fffc38 ... OK
   Loading Device Tree to 497cf000, end 4983efff ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Ubuntu 18.04.1 LTS orangepipc ttyS0

orangepipc login:
 2486   9 мес   armbian   UBOOT
Популярное