summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2023-02-13 17:58:26 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2023-02-19 14:22:38 +0100
commite9bdfe72927eb5e286ad1797d4afa81c82773f80 (patch)
treea5e5064d2406298ab5b48e658f2be5b47835cbb9
parent39492d1d2f90d66931802d76677f8d0d0091dbcf (diff)
atmel-ngw100: fix sd card boot
-rwxr-xr-xscripts/install.sh15
-rw-r--r--target/avr32/Makefile5
-rw-r--r--target/avr32/systems/atmel-ngw1001
-rw-r--r--target/linux/config/Config.in.block1
4 files changed, 18 insertions, 4 deletions
diff --git a/scripts/install.sh b/scripts/install.sh
index f62486155..8c7c4c938 100755
--- a/scripts/install.sh
+++ b/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
diff --git a/target/avr32/Makefile b/target/avr32/Makefile
index 1f055993d..75ec3679a 100644
--- a/target/avr32/Makefile
+++ b/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:
diff --git a/target/avr32/systems/atmel-ngw100 b/target/avr32/systems/atmel-ngw100
index 3c5808d90..28f06acf9 100644
--- a/target/avr32/systems/atmel-ngw100
+++ b/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
diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block
index b07ece645..534d731e1 100644
--- a/target/linux/config/Config.in.block
+++ b/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