[openwrt/openwrt] uboot-at91: use sdmmc0 as booting media for sama5d27_som1_ek

LEDE Commits lede-commits at lists.infradead.org
Fri Sep 2 12:44:26 PDT 2022


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/c53fea7a8ab9a622ce8dc0e9922b8cead8b34b68

commit c53fea7a8ab9a622ce8dc0e9922b8cead8b34b68
Author: Claudiu Beznea <claudiu.beznea at microchip.com>
AuthorDate: Thu Jul 28 13:12:34 2022 +0300

    uboot-at91: use sdmmc0 as booting media for sama5d27_som1_ek
    
    Commit adc69fe (""uboot-at91: changed som1 ek default defconfigs")
    changed the booting media to sdmmc1 as default booting w/o any reason.
    The Microchip releases for the rest of supported distributions (Buildroot,
    Yocto Project) uses sdmmc0 as default booting media for this board.
    Thus change it back to sdmmc0. With this remove references to sdmmc1
    config. The initial commit cannot be cleanly reverted.
    
    Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
    (cherry picked from commit 9a49788008c18fd4fe6fefe9697962c102fb14c6)
---
 package/boot/uboot-at91/Makefile      |  6 +++---
 target/linux/at91/image/sama5.mk      | 16 +++++-----------
 target/linux/at91/image/uboot-env.txt |  4 ++--
 3 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index d75e3ba3af..f75a387836 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -107,8 +107,8 @@ define U-Boot/sama5d4_xplained_nandflash
   BUILD_DEVICES:=microchip_sama5d3-xplained
 endef
 
-define U-Boot/sama5d27_som1_ek_mmc1
-  NAME:=SAMA5D27 SOM1 Ek (SDCard1)
+define U-Boot/sama5d27_som1_ek_mmc
+  NAME:=SAMA5D27 SOM1 Ek (SDCard0)
   BUILD_SUBTARGET:=sama5
   BUILD_DEVICES:=microchip_sama5d27-som1-ek
 endef
@@ -163,7 +163,7 @@ UBOOT_TARGETS := \
 	sama5d4_xplained_mmc \
 	sama5d4_xplained_spiflash \
 	sama5d4_xplained_nandflash\
-	sama5d27_som1_ek_mmc1 \
+	sama5d27_som1_ek_mmc \
 	sama5d27_som1_ek_qspiflash \
 	sama5d27_wlsom1_ek_mmc \
 	sama5d27_wlsom1_ek_qspiflash \
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index 9078db525f..d108d27908 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -15,23 +15,17 @@ define Build/at91-sdcard
 	$(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
 	::$(DEVICE_NAME)-fit.itb
 
-  $(if $(findstring sama5d27-som1-ek,$@), \
-      mcopy -i $@.boot \
-          $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc1/u-boot.bin \
-          ::u-boot.bin
-      mcopy -i $@.boot \
-          $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd1_uboot/at91bootstrap.bin \
-          ::BOOT.bin,
-      mcopy -i $@.boot \
-          $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc/u-boot.bin \
-          ::u-boot.bin
+  mcopy -i $@.boot \
+	$(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc/u-boot.bin \
+	::u-boot.bin
+
       $(if $(findstring sama5d4-xplained,$@), \
           mcopy -i $@.boot \
               $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot_secure/at91bootstrap.bin \
               ::BOOT.bin,
           mcopy -i $@.boot \
               $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot/at91bootstrap.bin \
-              ::BOOT.bin))
+              ::BOOT.bin)
 
   $(CP) uboot-env.txt $@-uboot-env.txt
   sed -i '2d;3d' $@-uboot-env.txt
diff --git a/target/linux/at91/image/uboot-env.txt b/target/linux/at91/image/uboot-env.txt
index 14f983d039..c30bf42ec3 100644
--- a/target/linux/at91/image/uboot-env.txt
+++ b/target/linux/at91/image/uboot-env.txt
@@ -6,8 +6,8 @@ bootargsd2=console=ttyS0,115200 earlyprintk root=/dev/mmcblk1p2 rw rootwait root
 bootargsxx=console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rw rootwait rootfstype=ext4
 bootcmd=run setloadaddr; run setbootargs; run fatload_mmc; bootm ${loadaddr}
 bootdelay=1
-fatload_mmc=if test ${board_name} = atmel,sama5d2-xplained || test ${board_name} = atmel,sama5d27-som1-ek || test ${board_name} = microchip,sama7g5ek; then fatload mmc 1:1 ${loadaddr} ${board}-fit.itb; else fatload mmc 0:1 ${loadaddr} ${board}-fit.itb; fi
-setbootargs=if test ${board_name} = atmel,sama5d2-xplained || test ${board_name} = atmel,sama5d27-som1-ek || test ${board_name} = microchip,sama7g5ek; then setenv bootargs ${bootargsd2}; else setenv bootargs ${bootargsxx}; fi
+fatload_mmc=if test ${board_name} = atmel,sama5d2-xplained || test ${board_name} = microchip,sama7g5ek; then fatload mmc 1:1 ${loadaddr} ${board}-fit.itb; else fatload mmc 0:1 ${loadaddr} ${board}-fit.itb; fi
+setbootargs=if test ${board_name} = atmel,sama5d2-xplained || test ${board_name} = microchip,sama7g5ek; then setenv bootargs ${bootargsd2}; else setenv bootargs ${bootargsxx}; fi
 setloadaddr=if test ${board_name} = microchip,sama7g5ek; then setenv loadaddr 0x63000000; else setenv loadaddr 0x21000000; fi
 ethact=gmac0
 stderr=serial




More information about the lede-commits mailing list