From 172e62986f27c97f9c0d853fbe87aab7c4fe2ee1 Mon Sep 17 00:00:00 2001 From: kszaq Date: Sun, 25 Feb 2018 20:58:35 +0100 Subject: [PATCH] projects/Amlogic: simplify aml_autoscript Modify the script to include only commands that are essential to boot LE with standard Amlogic u-boot. Remove s905_autoscript that we don't have to use. --- projects/Amlogic/install/aml_autoscript.src | 18 +++++++----------- projects/Amlogic/install/s905_autoscript.src | 6 ------ 2 files changed, 7 insertions(+), 17 deletions(-) delete mode 100644 projects/Amlogic/install/s905_autoscript.src diff --git a/projects/Amlogic/install/aml_autoscript.src b/projects/Amlogic/install/aml_autoscript.src index bd71da92a7..6d85670ab2 100644 --- a/projects/Amlogic/install/aml_autoscript.src +++ b/projects/Amlogic/install/aml_autoscript.src @@ -1,16 +1,12 @@ defenv -setenv bootfromrecovery 0 setenv bootfromnand 0 setenv upgrade_step 2 -setenv start_autoscript 'if mmcinfo; then run start_mmc_autoscript; fi; if usb start; then run start_usb_autoscript; fi;' -setenv start_mmc_autoscript 'if fatload mmc 0 1020000 s905_autoscript; then autoscr 1020000; fi;' -setenv start_usb_autoscript 'if fatload usb 0 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 1 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 2 1020000 s905_autoscript; then autoscr 1020000; fi; if fatload usb 3 1020000 s905_autoscript; then autoscr 1020000; fi;' -setenv sddtb 'if fatload mmc 0 ${dtb_mem_addr} dtb.img; then echo sd dtb.img loaded; else store dtb read $dtb_mem_addr; fi' -setenv usbdtb 'if fatload usb 0 ${dtb_mem_addr} dtb.img; then echo usb dtb.img loaded; else store dtb read $dtb_mem_addr; fi' -setenv librefromsd 'if mmcinfo; then if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi; fi' -setenv librefromusb 'if usb start 0; then if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi; fi' -setenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run start_autoscript; run librefromsd; run librefromusb; fi; run storeboot' +setenv libreelec 'run librefromsd; run librefromusb' +setenv sddtb 'if fatload mmc 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi' +setenv usbdtb 'if fatload usb 0 ${dtb_mem_addr} dtb.img; then else store dtb read $dtb_mem_addr; fi' +setenv librefromsd 'mmcinfo; if fatload mmc 0 ${loadaddr} kernel.img; then run sddtb; setenv bootargs ${bootargs} bootfromsd; bootm; fi' +setenv librefromusb 'usb start 0; if fatload usb 0 ${loadaddr} kernel.img; then run usbdtb; setenv bootargs ${bootargs} bootfromusb; bootm; fi' +setenv bootcmd 'if test ${bootfromnand} = 1; then setenv bootfromnand 0; saveenv; else run libreelec; fi; run storeboot' saveenv run storeargs -run librefromsd -run librefromusb +run libreelec diff --git a/projects/Amlogic/install/s905_autoscript.src b/projects/Amlogic/install/s905_autoscript.src deleted file mode 100644 index 3efc523193..0000000000 --- a/projects/Amlogic/install/s905_autoscript.src +++ /dev/null @@ -1,6 +0,0 @@ -setenv bootargs ${bootargs} bootfromext -if fatload mmc 0 ${loadaddr} kernel.img; then if fatload mmc 0 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi; -if fatload usb 0 ${loadaddr} kernel.img; then if fatload usb 0 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi; -if fatload usb 1 ${loadaddr} kernel.img; then if fatload usb 1 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi; -if fatload usb 2 ${loadaddr} kernel.img; then if fatload usb 2 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi; -if fatload usb 3 ${loadaddr} kernel.img; then if fatload usb 3 ${dtb_mem_addr} dtb.img; then bootm ${loadaddr}; else store dtb read ${dtb_mem_addr}; bootm ${loadaddr}; fi; fi;