diff options
author | Daniel Golle <daniel@makrotopia.org> | 2021-03-17 17:39:46 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-03-17 19:55:38 +0000 |
commit | 41af8735d4b00c98a7cffc409d4db752b09577e7 (patch) | |
tree | fb508418cc5115dffd32fdf612df93c36b1747b1 | |
parent | b40f707f71d4e1fee9b2c20d62e235c5aba5533b (diff) | |
download | upstream-41af8735d4b00c98a7cffc409d4db752b09577e7.tar.gz upstream-41af8735d4b00c98a7cffc409d4db752b09577e7.tar.bz2 upstream-41af8735d4b00c98a7cffc409d4db752b09577e7.zip |
uboot-mediatek: bpi-r64: make use of FIT configuration selection
Allow selecting either SATA or PCIE functionality using uImage.FIT
configurations and device-tree overlays.
By default, PCIE1 is selected (as it has been before this change).
To select SATA instead, you can do this now:
fw_setenv bootconf config-mt7622-bananapi-bpi-r64-sata
and reboot.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r-- | package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch b/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch index 03a1a71064..73f2533364 100644 --- a/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch +++ b/package/boot/uboot-mediatek/patches/403-add-bananapi_bpi-r64_defconfigs.patch @@ -147,12 +147,15 @@ +CONFIG_USB_STORAGE=y --- /dev/null +++ b/bananapi_bpi-r64-sdmmc_env -@@ -0,0 +1,57 @@ +@@ -0,0 +1,60 @@ +ipaddr=192.168.1.1 +serverip=192.168.1.254 +loadaddr=0x4007ff28 +bootcmd=run boot_sdmmc +bootargs=root=/dev/mmcblk1p6 ++bootconf=config-mt7622-bananapi-bpi-r64-pcie1 ++bootconf_pcie=config-mt7622-bananapi-bpi-r64-pcie1 ++bootconf_sata=config-mt7622-bananapi-bpi-r64-sata +bootdelay=0 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb +bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb @@ -174,12 +177,12 @@ +bootmenu_8=Reset all settings to factory defaults.=run reset_factory ; reset +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; run boot_tftp_forever +boot_first=if button reset ; then run boot_tftp_forever ; fi ; setenv flag_recover 1 ; bootmenu -+boot_production=led bpi-r64:pio:green on ; run sdmmc_read_production && bootm $loadaddr -+boot_recovery=led bpi-r64:pio:green off ; run sdmmc_read_recovery && bootm $loadaddr ++boot_production=led bpi-r64:pio:green on ; run sdmmc_read_production && bootm $loadaddr#$bootconf ++boot_recovery=led bpi-r64:pio:green off ; run sdmmc_read_recovery && bootm $loadaddr#$bootconf +boot_sdmmc=run boot_production ; run boot_recovery +boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done -+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi -+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr +emmc_write_bl2=mmc dev 0 1 && mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $loadaddr 0x0 0x100 ; mmc partconf 0 1 1 0 +emmc_write_hdr=mmc dev 0 0 && mmc erase 0x0 0x40 && mmc write $loadaddr 0x0 0x40 @@ -354,12 +357,15 @@ +CONFIG_USB_STORAGE=y --- /dev/null +++ b/bananapi_bpi-r64-emmc_env -@@ -0,0 +1,43 @@ +@@ -0,0 +1,46 @@ +ipaddr=192.168.1.1 +serverip=192.168.1.254 +loadaddr=0x4007ff28 +bootcmd=run boot_emmc +bootargs=root=/dev/mmcblk0p5 ++bootconf=config-mt7622-bananapi-bpi-r64-pcie1 ++bootconf_pcie=config-mt7622-bananapi-bpi-r64-pcie1 ++bootconf_sata=config-mt7622-bananapi-bpi-r64-sata +bootdelay=0 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb +bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb @@ -378,12 +384,12 @@ +bootmenu_7=Reset all settings to factory defaults.=run reset_factory ; reset +boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; run boot_tftp_forever +boot_first=if button reset ; then run boot_tftp_forever ; fi ; setenv flag_recover 1 ; bootmenu -+boot_production=led bpi-r64:pio:green on ; run emmc_read_production && bootm $loadaddr -+boot_recovery=led bpi-r64:pio:green off ; run emmc_read_recovery && bootm $loadaddr ++boot_production=led bpi-r64:pio:green on ; run emmc_read_production && bootm $loadaddr#$bootconf ++boot_recovery=led bpi-r64:pio:green off ; run emmc_read_recovery && bootm $loadaddr#$bootconf +boot_emmc=run boot_production ; run boot_recovery +boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done -+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi -+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr +emmc_write_production=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol +emmc_write_recovery=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol |