selecting through the graphical interface, you can start compiling u-boot directly
[ o.k. ] Repeat Build Options [ sudo ./build.sh BOARD=orangepizero2
BRANCH=legacy BUILD_OPT=u-boot KERNEL_CONFIGURE=no ]
6) View the compiled u-boot deb package
test@test:~/orangepi-build$ ls output/debs/u-boot/
linux-u-boot-legacy-orangepizero2_2.0.8_arm64.deb
7) The files contained in the generated u-boot deb package are as follows
a. Use the following command to unzip the deb package
test@test:~/orangepi-build$ cd output/debs/u-boot
test@test:~/orangepi_build/output/debs/u-boot$ $ dpkg -x \
linux-u-boot-legacy-orangepizero2_2.0.8_arm64.deb . (Note that there is a “.” at
the end of the command.)
test@test:~/orangepi_build/output/debs/u-boot$ ls
linux-u-boot-current-orangepizero_2.0.8_armhf.deb usr
b. The decompressed file is as follows
test@test:~orangepi-build/output/debs/u-boot$ tree usr/
usr/
└── lib
├── linux-u-boot-legacy-orangepizero2_2.0.8_arm64
│ ├── boot0_sdcard.fex
│ └── boot_package.fex
└── u-boot
├── LICENSE
├── orangepi_zero2_defconfig
├── orangepizero2-u-boot.dts
└── platform_install.sh
3 directories, 6 files
8) When the orangepi-bulid build OS compiles the u-boot source code, it first
synchronizes the u-boot source code with the u-boot source code of the github server,
so if you want to modify the u-boot source code, you first need to turn off the
download and update function of the source code (You need to compile u-boot once
to turn off this function, otherwise you will be prompted to find the source code
of u-boot), otherwise, the changes made will be restored, the method is as follows:
Set the IGNORE_UPDATES variable in userpatches/config-default.conf to "yes"
test@test:~/orangepi-build$ vim userpatches/config-default.conf
IGNORE_UPDATES="yes"
9) When debugging u-boot code, you can use the following method to update u-boot
in the linux image for testing
a. Upload the compiled u-boot deb package to the linux OS of the development board