aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/at91/image/sama5.mk
diff options
context:
space:
mode:
authorSandeep Sheriker M <sandeep.sheriker@microchip.com>2019-08-14 00:42:15 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2019-08-17 23:08:55 +0200
commit575950e37698b5d59f7a30a44f92327844c58b99 (patch)
tree5c4faf1f9fd2178fe660c018563c705b7b956d7e /target/linux/at91/image/sama5.mk
parent32d4e4226d7de48f0a156e7bc298667119405b84 (diff)
downloadupstream-575950e37698b5d59f7a30a44f92327844c58b99.tar.gz
upstream-575950e37698b5d59f7a30a44f92327844c58b99.tar.bz2
upstream-575950e37698b5d59f7a30a44f92327844c58b99.zip
at91: add uboot environments
add uboot environments to sdcard image Signed-off-by: Sandeep Sheriker M <sandeep.sheriker@microchip.com>
Diffstat (limited to 'target/linux/at91/image/sama5.mk')
-rw-r--r--target/linux/at91/image/sama5.mk11
1 files changed, 10 insertions, 1 deletions
diff --git a/target/linux/at91/image/sama5.mk b/target/linux/at91/image/sama5.mk
index d02f51a1db..4fee464a00 100644
--- a/target/linux/at91/image/sama5.mk
+++ b/target/linux/at91/image/sama5.mk
@@ -27,6 +27,15 @@ define Build/at91-sdcard
$(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd_uboot/at91bootstrap.bin \
::BOOT.bin)
+ $(CP) uboot-env.txt $@-uboot-env.txt
+ sed -i '2d;3d' $@-uboot-env.txt
+ sed -i '2i board='"$(DEVICE_NAME:at91-%=%)"'' $@-uboot-env.txt
+ sed -i '3i board_name='"$(DEVICE_NAME:at91-%=%)"'' $@-uboot-env.txt
+
+ mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
+
+ mcopy -i $@.boot $@-uboot.env ::uboot.env
+
./gen_at91_sdcard_img.sh \
$@.img \
$@.boot \
@@ -36,7 +45,7 @@ define Build/at91-sdcard
gzip -nc9 $@.img > $@
- rm -f $@.img $@.boot )
+ rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
endef
define Device/at91-sama5d2_xplained