https://elixir.bootlin.com/u-boot
git clone git@gitee.com:kong-ling/u-boot.git
# clone u-boot from giteegit tag -l 'v2019.07'
#查看tag v2019.07, 是bitbake中使用的versiongit show v2019.07
, 确认commit id
commit idcommit e5aee22e4be75e75a854ab64503fc80598bc2004 (HEAD, tag: v2019.07)
切换到tag: v2019.07
git checkout v2019.07
git am 0001xxxxx.patch
# patch u-boot, 打入补丁
修复mac 下 make menuconfig 的bug以及自定义make menuconfig界面
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
method 1
mkdir
/home/lcao/uboot_e21/
copy -r /home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/git /home/lcao/uboot_e21/
mv /home/lcao/uboot_e21/git /home/lcao/uboot_e21/src/
mkdir /home/lcao/uboot_e21/build/
copy your .config to /home/lcao/uboot_e21/build/
5.1 modify "Base ISA" by:
make -C /home/lcao/uboot_e21/src O=/home/lcao/uboot_e21/build/ menuconfig
RISC-V architecture-->Base ISA, modify to RV32I
then exit and save.cd /home/lcao/uboot_e21/build/, run:
make --sysroot=/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot" HOSTCC="gcc -isystem/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/usr/include
-O2 -pipe -L/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/usr/lib
-L/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/lib
-Wl,--enable-new-dtags -Wl,-rpath-link,/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath-link,/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/lib
-Wl,-rpath,/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath,/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/lib
-Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2"
PYTHON2=nativepython STAGING_INCDIR=/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/usr/include
STAGING_LIBDIR=/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/recipe-sysroot-native/usr/lib
V=1 -C/home/lcao/uboot_e21/src/ O=/home/lcao/uboot_e21/build/
for error "make[2]: *** [arch/riscv/dts/ux00_zsbl.dtb] Error 1"
copy ux00_zsbl.dtb /home/lcao/uboot_e21/build/arch/riscv/dts/
method 2
riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6 toolchains also can be used to generate uboot for E21:
mkdir
/home/lcao/uboot_unknown
/copy -r ``/home/lcao/offline/SiFive-OE/riscv-sifive/build/tmp-glibc/work/freedom_u540-oe-linux/u-boot/1_2019.07-r0/git
/home/lcao/uboot_unknown`/
mv
/home/lcao/uboot_unknown
/git/home/lcao/uboot_unknown
/src/mkdir
/home/lcao/uboot_unknown
/build/copy your .config to
/home/lcao/uboot_unknown
/build/
5.1 modify "Base ISA" by:
make -C/home/lcao/uboot_unknown
/src O=/home/lcao/uboot_unknown
/build/ menuconfig
RISC-V architecture-->Base ISA, modify to RV32I
then exit and save.modify
/home/lcao/uboot_unknown
/src/scripts/Makefile.lib file, Line 381, remove -shared
cmd_efi_ld = (EFI_LDS_PATH) -shared \modify ``/home/lcao/uboot_unknown
/src/arch/riscv/lib/crt0_riscv_efi.S
, Line 140, remove the line
lla a1, _DYNAMICmodify ``/home/lcao/uboot_unknown
/src/arch/riscv/config.mk
line 31, remove -pie
LDFLAGS_u-boot += --gc-sections -static -piemodify ``/home/lcao/uboot_unknown
/src/Makefile
, line 1574, remove the line
@tools/prelink-riscv $@ 0cd
/home/lcao/uboot_unknown
/build/, run:
make V=1 -C/home/lcao/uboot_unknown
/src O=/home/lcao/uboot_unknown
/build/for error "make[2]: *** [arch/riscv/dts/ux00_zsbl.dtb] Error 1"
copy ux00_zsbl.dtb/home/lcao/uboot_unknown
/build/arch/riscv/dts/
I donot know which image can run in haps, just try to run the two methods.
-
git show v2019.07
确认version
tag v2019.07
Tagger: Tom Rini <trini@konsulko.com>
Date: Mon Jul 8 15:23:38 2019 -0400
Prepare v2019.07
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJdI5g/AAoJEIf59jXTHXZSEP4P/iBMl0lzXzJ+39s4N5ThlzCb
37/RR/orbw8Upl5z2jYFH8Lbsy2Op4pzg0zT1PnoBg/0erXkAeH269yDdm0TZ+ey
6xjsUhKcu8G9XCWoPQnHfFbEpBCDItsDWJPCKKvyDeKrhjppPyoCT5ou3l2PEz9S
ETJWhrCQtlIK0Nkk8bK+dPCJQQfUfc1zRtMn9dLhv9cd6wQU7Aaya4IvNk7DK9NO
nTfImdd5DX3grKFPTBaDJLdoH+XT2zZQE2tQncnjC+Eq7wQioD+tyUQpnDwhNuUJ
FgrL4+utp7iQzgNP4cVHt/JZzppBi3wJqI4vgWIoaxO7J8zv4JKiZGYFynH2exsv
YaU0K0dwG7BDXlAC6V3/SocgAqOPUpZFuswrAS5Rufj9MJRG+IdFT+JMvmsFO2Ma
tIWrZjYpo58ZGiz7zKOjORdo/+oSI/pxSvK15TFFbQhTKKDUrxrkjAjhTFYVYz9k
EtJxSQhLn0eWINFjhrhiY5iGUZJXxpHDivhbTfJXmxhTtt65D28iErm7NFsykzEj
RSC95x7ef49FeoqWIs3UfpALTowX0cwAtnGv3vhgvI+5I4NldcNvTGct7AfpF97m
6NawTV0e89WXla67KMYN+/smn1xwymqdm/lFrddPGkV9MSRUzcPO9Sbkpi24VT60
5vbdF8oTsu0Esaeo/DRw
=KUtX
-----END PGP SIGNATURE-----
commit e5aee22e4be75e75a854ab64503fc80598bc2004 (HEAD, tag: v2019.07)
Author: Tom Rini <trini@konsulko.com>
Date: Mon Jul 8 15:23:28 2019 -0400
Prepare v2019.07
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/Makefile b/Makefile
index f3857ab6a9..516260f46d 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,7 @@
VERSION = 2019
PATCHLEVEL = 07
SUBLEVEL =
-EXTRAVERSION = -rc4
+EXTRAVERSION =
NAME =
# *DOCUMENTATION*