Browse Source

more basic support for sd card creation for phytec-imx6

Waldemar Brodkorb 1 year ago
parent
commit
9e4231e908
2 changed files with 14 additions and 5 deletions
  1. 13 4
      scripts/install.sh
  2. 1 1
      target/arm/Makefile

+ 13 - 4
scripts/install.sh

@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 #-
-# Copyright © 2010-2017
+# Copyright © 2010-2019
 #	Waldemar Brodkorb <wbx@openadk.org>
 #	Thorsten Glaser <tg@mirbsd.org>
 #
@@ -155,7 +155,7 @@ tgt=$2
 src=$3
 
 case $target {
-(banana-pro|orange-pi0|pcengines-apu|phytec-wega|raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi3p|raspberry-pi3p-64|solidrun-imx6|solidrun-clearfog|default) ;;
+(banana-pro|orange-pi0|pcengines-apu|phytec-imx6|phytec-wega|raspberry-pi|raspberry-pi0|raspberry-pi2|raspberry-pi3|raspberry-pi3-64|raspberry-pi3p|raspberry-pi3p-64|solidrun-imx6|solidrun-clearfog|default) ;;
 (*)
 	print -u2 "Unknown target '$target', exiting"
 	exit 1 ;;
@@ -551,7 +551,7 @@ case $target {
 (solidrun-clearfog)
 	dd if="$fwdir/u-boot-spl.kwb" of="$tgt" bs=512 seek=1 > /dev/null 2>&1
 	;;
-(solidrun-imx6)
+(solidrun-imx6|phytec-imx6)
 	dd if="$fwdir/SPL" of="$tgt" bs=1024 seek=1 > /dev/null 2>&1
 	dd if="$fwdir/u-boot.img" of="$tgt" bs=1024 seek=69 > /dev/null 2>&1
 	;;
@@ -581,7 +581,7 @@ if (( datafssz )); then
 	(banana-pro|orange-pi0|solidrun-clearfog)
 		echo "/dev/mmcblk0p2	/data	ext4	rw	0	0" >> "$R"/etc/fstab
 	;;
-	(solidrun-imx6)
+	(solidrun-imx6|phytec-imx6)
 		echo "/dev/mmcblk1p2	/data	ext4	rw	0	0" >> "$R"/etc/fstab
 	;;
 	}
@@ -645,6 +645,15 @@ case $target {
 		-n "SolidrunImx6" \
 		-d $fwdir/boot.script.imx6 $R/boot/boot.scr.uimg
 	;;
+(phytec-imx6)
+	for x in "$fwdir"/*.dtb; do
+		[[ -e "$x" ]] && cp "$fwdir"/*.dtb "$R/boot/"
+		break
+	done
+	mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
+		-n "PhytecImx6" \
+		-d $fwdir/boot.script.phytec $R/boot/boot.scr.uimg
+	;;
 (orange-pi0)
 	for x in "$fwdir"/*.dtb; do
 		[[ -e "$x" ]] && cp "$fwdir"/*.dtb "$R/boot/"

+ 1 - 1
target/arm/Makefile

@@ -81,7 +81,7 @@ ifeq ($(ADK_TARGET_SYSTEM_PHYTEC_WEGA),y)
 endif
 ifeq ($(ADK_TARGET_SYSTEM_PHYTEC_IMX6),y)
 	@echo "Use following command to install it on SD card:"
-	@echo "sudo ./scripts/install.sh phytec-mira /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)"
+	@echo "sudo ./scripts/install.sh phytec-imx6 /dev/sdX $(FW_DIR)/$(ROOTFSTARBALL)"
 	@echo
 endif
 ifeq ($(ADK_TARGET_SYSTEM_BANANA_PRO),y)