Browse Source

atmel-ngw100: fix sd card boot

Waldemar Brodkorb 1 year ago
parent
commit
e9bdfe7292

+ 11 - 4
scripts/install.sh

@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #-
-# Copyright © 2010-2022
+# Copyright © 2010-2023
 #	Waldemar Brodkorb <wbx@openadk.org>
 #	Thorsten Glaser <tg@mirbsd.org>
 #
@@ -155,7 +155,7 @@ tgt=$2
 src=$3
 
 case $target {
-(banana-pro|banana-pro-zero|orange-pi0|pcengines-apu|phytec-imx6|phytec-wega|raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi4-64|rockpi4-plus|solidrun-imx6|solidrun-clearfog|imgtec-ci20|default) ;;
+(atmel-ngw100|banana-pro|banana-pro-zero|orange-pi0|pcengines-apu|phytec-imx6|phytec-wega|raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi4|raspberry-pi4-64|rockpi4-plus|solidrun-imx6|solidrun-clearfog|imgtec-ci20|default) ;;
 (*)
 	print -u2 "Unknown target '$target', exiting"
 	exit 1 ;;
@@ -571,8 +571,15 @@ case $target {
 	;;
 }
 
-(( noformat )) || create_fs "$rootpart" ADKROOT ext4
-(( noformat )) || tune_fs "$rootpart"
+case $target {
+(atmel-ngw100)
+	(( noformat )) || create_fs "$rootpart" ADKROOT ext2
+	(( noformat )) || tune_fs "$rootpart"
+	;;
+(*)
+	(( noformat )) || create_fs "$rootpart" ADKROOT ext4
+	(( noformat )) || tune_fs "$rootpart"
+}
 
 (( quiet )) || print Extracting installation archive...
 mount_fs "$rootpart" "$R" ext4

+ 5 - 0
target/avr32/Makefile

@@ -11,6 +11,11 @@ KERNEL:=$(LINUX_DIR)/arch/avr32/boot/images/uImage
 ifeq ($(ADK_TARGET_FS),archive)
 targethelp:
 	@echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+	@echo "Use following command to install it on SD card:"
+	@echo "sudo ./scripts/install.sh $(ADK_TARGET_SYSTEM) /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)"
+	@echo "U-Boot commands:"
+	@echo "set bootargs 'console=ttyS0 root=/dev/mmcblk0p1 ro rootwait'"
+	@echo "ext2load mmc 0:1 0x10300000 /boot/kernel; bootm 0x10300000"
 endif
 ifeq ($(ADK_TARGET_FS),nfsroot)
 targethelp:

+ 1 - 0
target/avr32/systems/atmel-ngw100

@@ -6,6 +6,7 @@ config ADK_TARGET_SYSTEM_ATMEL_NGW100
 	select ADK_TARGET_WITH_NET
 	select ADK_TARGET_WITH_NETDEVICE
 	select ADK_TARGET_WITH_BLOCK
+	select ADK_TARGET_WITH_SD
 	select ADK_TARGET_KERNEL_UIMAGE
 	select ADK_TARGET_KERNEL_WITH_COMPRESSION
 	select ADK_HOST_BUILD_U_BOOT

+ 1 - 0
target/linux/config/Config.in.block

@@ -571,6 +571,7 @@ config ADK_LINUX_KERNEL_MMC_DW_ROCKCHIP
 	select ADK_LINUX_KERNEL_MMC_SDHCI_PLTFM
 	select ADK_LINUX_KERNEL_MMC_DW
 	select ADK_LINUX_KERNEL_MMC_DW_PLTFM
+	depends on ADK_TARGET_SYSTEM_ROCKPI4_PLUS
 	default y if ADK_TARGET_SYSTEM_ROCKPI4_PLUS
 	default n
 	help