Full working uboot+linux

This commit is contained in:
Giulio 2020-09-16 21:54:34 +02:00
parent 233b7f2936
commit f7690e653f
2 changed files with 5201 additions and 5201 deletions

View File

@ -30,6 +30,10 @@ cp -R conf/* target/overlay # copy target system config files
cp -R webpanel/* target/overlay/var/www/html # copy the webpanel cp -R webpanel/* target/overlay/var/www/html # copy the webpanel
cp -R update/update.sh target/overlay #copy the update script and certificate cp -R update/update.sh target/overlay #copy the update script and certificate
echo "[+] Adding firmware"
mkdir -p target/overlay/lib
cp -R firmware target/overlay/lib/ # adding binary firmware for wifi driver
echo "[+] Writing flags" echo "[+] Writing flags"
sed -i "s/##FLAG1##/$flag1/g" target/overlay/var/www/html/includes/config.php sed -i "s/##FLAG1##/$flag1/g" target/overlay/var/www/html/includes/config.php
echo $flag2 > target/overlay/flag echo $flag2 > target/overlay/flag
@ -42,7 +46,7 @@ chmod 400 target/overlay/root/flag
echo "[+] Building the keygen" echo "[+] Building the keygen"
mkdir -p target/overlay/usr/sbin mkdir -p target/overlay/usr/sbin
aarch64-linux-gnu-gcc -o target/overlay/usr/sbin/cfgbin keygen/keygen.c -static -lm aarch64-linux-gnu-gcc -o target/overlay/usr/sbin/cfgbin keygen/keygen.c -static -lm
strip target/overlay/usr/sbin/cfgbin aarch64-linux-gnu-strip target/overlay/usr/sbin/cfgbin
echo "[+] Generating Update Key" echo "[+] Generating Update Key"
mkdir -p target/keys mkdir -p target/keys

View File

@ -4503,7 +4503,7 @@ Index: u-boot-imx/include/configs/tgr.h
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ u-boot-imx/include/configs/tgr.h +++ u-boot-imx/include/configs/tgr.h
@@ -0,0 +1,361 @@ @@ -0,0 +1,357 @@
+/* +/*
+ * Copyright 2018 NXP + * Copyright 2018 NXP
+ * + *
@ -4657,8 +4657,8 @@ Index: u-boot-imx/include/configs/tgr.h
+ "root=ubi0:nandrootfs rootfstype=ubifs " \ + "root=ubi0:nandrootfs rootfstype=ubifs " \
+ MFG_NAND_PARTITION \ + MFG_NAND_PARTITION \
+ "\0" \ + "\0" \
+ "bootcmd=nand read ${loadaddr} 0x5000000 0x2000000;"\ + "bootcmd=fatload mmc 1:1 ${fdt_addr} fsl-imx8mm-tgr.dtb;"\
+ "nand read ${fdt_addr} 0x7000000 0x100000;"\ + "fatload mmc 1:1 ${loadaddr} Image;"\
+ "booti ${loadaddr} - ${fdt_addr}" + "booti ${loadaddr} - ${fdt_addr}"
+ +
+#else +#else
@ -4681,13 +4681,9 @@ Index: u-boot-imx/include/configs/tgr.h
+ "mmcautodetect=yes\0" + "mmcautodetect=yes\0"
+ +
+#define CONFIG_BOOTCOMMAND \ +#define CONFIG_BOOTCOMMAND \
+ "mmc dev ${mmcdev}; " \ + "fatload mmc 1:1 ${fdt_addr} fsl-imx8mm-tgr.dtb;" \
+ "if mmc rescan; then " \ + "fatload mmc 1:1 ${loadaddr} Image;" \
+ "ext4load mmc 1:2 ${loadaddr} boot/Image; " \ + "booti ${loadaddr} - ${fdt_addr}; "
+ "ext4load mmc 1:2 ${fdt_addr} usr/lib/linux-image-4.14.98-tgr/freescale/fsl-imx8mm-tgr.dtb; " \
+ "ext4load mmc 1:2 ${initrd_addr} boot/initramfs.uImage; " \
+ "booti ${loadaddr} ${initrd_addr} ${fdt_addr}; " \
+ "else echo Cannot boot from emmc; fi"
+#endif +#endif
+ +
+/* Link Definitions */ +/* Link Definitions */