mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
u-boot: nanopi r2s: add bootcmd and 2nd mac address
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
boot/boot.cmd
|
||||
boot/boot.mk
|
||||
boot/boot.scr
|
||||
boot/uEnv.txt
|
||||
boot/uboot.env
|
||||
boot/u-boot-rpi3.bin
|
||||
boot/u-boot-rpi4.bin
|
||||
boot/uEnv.txt
|
||||
boot/uboot.env
|
||||
#usr/share/u-boot
|
||||
#usr/share/u-boot/nanopi_r2s
|
||||
usr/share/u-boot/nanopi_r2s/u-boot-rockchip.bin
|
||||
#usr/share/u-boot/rpi
|
||||
usr/share/u-boot/rpi/u-boot-rpi3.bin
|
||||
usr/share/u-boot/rpi/u-boot-rpi4.bin
|
||||
|
||||
@@ -183,6 +183,7 @@ else
|
||||
cd $(DIR_APP) && make distclean
|
||||
|
||||
# Nanopi R2S
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/u-boot/rockchip/generate-2-ethaddr.diff
|
||||
cd $(DIR_APP) && rm -rf arm-trusted-firmware-2.5
|
||||
cd $(DIR_APP) && tar axf $(DIR_DL)/arm-trusted-firmware-2.5.tar.gz
|
||||
cd $(DIR_APP)/arm-trusted-firmware-2.5 && make PLAT=rk3328 ARCH=aarch64 DEBUG=0 bl31
|
||||
@@ -191,6 +192,7 @@ else
|
||||
-mkdir -pv /usr/share/u-boot/nanopi_r2s
|
||||
cd $(DIR_APP) && make CROSS_COMPILE="" nanopi-r2s-rk3328_config
|
||||
cd $(DIR_APP) && sed -i -e 's!^CONFIG_IDENT_STRING=.*!CONFIG_IDENT_STRING=" Nanopi R2S - IPFire.org"!' .config
|
||||
cd $(DIR_APP) && sed -i -e 's!^CONFIG_BOOTCOMMAND=.*!CONFIG_BOOTCOMMAND="console=ttyS2,115200n8;run distro_bootcmd"!' .config
|
||||
cd $(DIR_APP) && sed -i -e 's!^CONFIG_BAUDRATE=.*!CONFIG_BAUDRATE=115200"!' .config
|
||||
cd $(DIR_APP) && make CROSS_COMPILE="" HOSTCC="gcc $(CFLAGS)"
|
||||
cd $(DIR_APP) && install -v -m 644 u-boot-rockchip.bin \
|
||||
|
||||
18
src/patches/u-boot/rockchip/generate-2-ethaddr.diff
Normal file
18
src/patches/u-boot/rockchip/generate-2-ethaddr.diff
Normal file
@@ -0,0 +1,18 @@
|
||||
diff -Naur u-boot-2021.07.org/arch/arm/mach-rockchip/misc.c u-boot-2021.07/arch/arm/mach-rockchip/misc.c
|
||||
--- u-boot-2021.07.org/arch/arm/mach-rockchip/misc.c 2021-07-05 15:11:28.000000000 +0000
|
||||
+++ u-boot-2021.07/arch/arm/mach-rockchip/misc.c 2021-10-08 10:47:13.704806367 +0000
|
||||
@@ -49,9 +49,12 @@
|
||||
memcpy(mac_addr, hash, 6);
|
||||
|
||||
/* Make this a valid MAC address and set it */
|
||||
- mac_addr[0] &= 0xfe; /* clear multicast bit */
|
||||
- mac_addr[0] |= 0x02; /* set local assignment bit (IEEE802) */
|
||||
+ mac_addr[0] = 0x02; /* set local assignment bit (IEEE802) */
|
||||
eth_env_set_enetaddr("ethaddr", mac_addr);
|
||||
+ if (env_get("eth1addr"))
|
||||
+ return 0;
|
||||
+ mac_addr[0] = 0x12; /* set local assignment bit (IEEE802) */
|
||||
+ eth_env_set_enetaddr("eth1addr", mac_addr);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user