aboutsummaryrefslogtreecommitdiff
path: root/board/raspberrypi/post-image.sh
diff options
context:
space:
mode:
authorGravatar Gustavo Zacarias <gustavo@zacarias.com.ar>2015-12-31 10:28:08 -0300
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-31 15:22:48 +0100
commit8dd797a05498692b89841c570b97b9d10467399a (patch)
tree6c41822fbea3f25d80be3641524c60a29a5bd391 /board/raspberrypi/post-image.sh
parent217171565fe7c1d8b3bdfe538da11ed190f46b28 (diff)
downloadbuildroot-8dd797a05498692b89841c570b97b9d10467399a.tar.gz
buildroot-8dd797a05498692b89841c570b97b9d10467399a.tar.bz2
configs/raspberrypi*: update them to use genimage
Update the raspberrypi and raspberrypi2 configs to use genimage directly to build the image. Update the documentation to reflect this, and drop the volatile rootfs option since it doesn't make much sense and it's not easily integrated with the genimage configurations. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'board/raspberrypi/post-image.sh')
-rwxr-xr-xboard/raspberrypi/post-image.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
new file mode 100755
index 0000000000..73ffd658e7
--- /dev/null
+++ b/board/raspberrypi/post-image.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+BOARD_DIR="$(dirname $0)"
+BOARD_NAME="$(basename ${BOARD_DIR})"
+GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+# Mark the kernel as DT-enabled
+mkdir -p "${BINARIES_DIR}/kernel-marked"
+${HOST_DIR}/usr/bin/mkknlimg "${BINARIES_DIR}/zImage" \
+ "${BINARIES_DIR}/kernel-marked/zImage"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
+
+exit $?