summaryrefslogtreecommitdiff
path: root/board/atmel
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@atmel.com>2016-04-08 16:30:39 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-04-13 23:47:42 +0200
commit6e9bd4a2bc5f9fdb5dbea527d9c10e747aa6555f (patch)
tree6b4c624bcdd30e6a77e387833b680956bfc14236 /board/atmel
parent7aca6ab78836cf9a8cf3be43262daf02fba7aa78 (diff)
configs: atmel: add sama5d4 xplained sd card image generation
Use genimage to generate a sd card with a fat partition (at91bootstrap, u-boot, kernel, dtbs) and an ext4 partition (rootfs). Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'board/atmel')
-rw-r--r--board/atmel/sama5d4_xplained_mmc/genimage.cfg34
-rwxr-xr-xboard/atmel/sama5d4_xplained_mmc/post-image.sh14
2 files changed, 48 insertions, 0 deletions
diff --git a/board/atmel/sama5d4_xplained_mmc/genimage.cfg b/board/atmel/sama5d4_xplained_mmc/genimage.cfg
new file mode 100644
index 000000000..b23ebe470
--- /dev/null
+++ b/board/atmel/sama5d4_xplained_mmc/genimage.cfg
@@ -0,0 +1,34 @@
+# Image for SD card boot on Atmel SAMA5D4 Xplained boards
+#
+image boot.vfat {
+ vfat {
+ files = {
+ "zImage",
+ "at91-sama5d4_xplained.dtb",
+ "at91-sama5d4_xplained_hdmi.dtb",
+ "at91-sama5d4_xplained_pda4.dtb",
+ "at91-sama5d4_xplained_pda7.dtb",
+ "at91-sama5d4_xplained_pda7b.dtb",
+ "boot.bin",
+ "u-boot.bin"
+ }
+ }
+ size = 16M
+}
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition boot {
+ partition-type = 0xC
+ bootable = "true"
+ image = "boot.vfat"
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ size = 512M
+ }
+}
diff --git a/board/atmel/sama5d4_xplained_mmc/post-image.sh b/board/atmel/sama5d4_xplained_mmc/post-image.sh
new file mode 100755
index 000000000..359b4c9e7
--- /dev/null
+++ b/board/atmel/sama5d4_xplained_mmc/post-image.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"