diff options
author | Juan RP <xtraeme@gmail.com> | 2014-12-05 05:46:05 +0100 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2014-12-05 05:46:31 +0100 |
commit | 1c603437d3765477a16863752e4813974e53db95 (patch) | |
tree | 9e22ff2b9de03121e8df785bf8ac19f4df45637b | |
parent | 15c2b8e9b2d93b1363718e515e7f74c11a2cba60 (diff) | |
download | hrmpf-1c603437d3765477a16863752e4813974e53db95.tar.gz hrmpf-1c603437d3765477a16863752e4813974e53db95.tar.xz hrmpf-1c603437d3765477a16863752e4813974e53db95.zip |
mk{image,rootfs}: add beaglebone platform support.
-rw-r--r-- | mkimage.sh.in | 11 | ||||
-rw-r--r-- | mkrootfs.sh.in | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/mkimage.sh.in b/mkimage.sh.in index 11e1362..89a0f62 100644 --- a/mkimage.sh.in +++ b/mkimage.sh.in @@ -119,7 +119,7 @@ fi # double check PLATFORM is supported... case "$PLATFORM" in - cubieboard2|odroid-u2|rpi);; + beaglebone|cubieboard2|odroid-u2|rpi);; *) die "The $PLATFORM is not supported, exiting..." esac @@ -157,24 +157,27 @@ case "$ROOT_FSTYPE" in esac mkfs.${ROOT_FSTYPE} $disable_journal ${LOOPDEV}p2 >/dev/null 2>&1 -info_msg "Unpacking rootfs tarball ..." ROOTFSDIR=$(mktemp -d) mount ${LOOPDEV}p2 $ROOTFSDIR mkdir -p ${ROOTFSDIR}/boot mount ${LOOPDEV}p1 ${ROOTFSDIR}/boot +if [ "$PLATFORM" = "beaglebone" ]; then + dd if=${ROOTFSDIR}/boot/MLO of=${LOOPDEV}p1 >/dev/null 2>&1 +fi + +info_msg "Unpacking rootfs tarball ..." tar xfp $ROOTFS_TARBALL -C $ROOTFSDIR BOOT_UUID=$(blkid -o value -s UUID ${LOOPDEV}p1) ROOT_UUID=$(blkid -o value -s UUID ${LOOPDEV}p2) -echo "UUID=$BOOT_UUID /boot $BOOT_FSTYPE defaults 0 0" >> ${ROOTFSDIR}/etc/fstab echo "UUID=$ROOT_UUID / $ROOT_FSTYPE defaults 0 1" >> ${ROOTFSDIR}/etc/fstab +echo "UUID=$BOOT_UUID /boot $BOOT_FSTYPE defaults 0 2" >> ${ROOTFSDIR}/etc/fstab if [ -s ${ROOTFSDIR}/boot/cmdline.txt ]; then sed -e "s,rootfstype=ext4,rootfstype=${ROOT_FSTYPE}," -i ${ROOTFSDIR}/boot/cmdline.txt fi -# For cubieboard we need to flash u-boot to the image. if [ "$PLATFORM" = "cubieboard2" ]; then dd if=${ROOTFSDIR}/boot/u-boot-sunxi-with-spl.bin of=${LOOPDEV} bs=1024 seek=8 >/dev/null 2>&1 elif [ "$PLATFORM" = "odroid-u2" ]; then diff --git a/mkrootfs.sh.in b/mkrootfs.sh.in index acfb58f..d8c1821 100644 --- a/mkrootfs.sh.in +++ b/mkrootfs.sh.in @@ -45,7 +45,7 @@ usage() { cat <<_EOF Usage: $PROGNAME [options] <platform> -Supported platforms: cubieboard2, odroid-u2, rpi +Supported platforms: beaglebone, cubieboard2, odroid-u2, rpi Options -b <syspkg> Set an alternative base-system package (defaults to base-system) @@ -125,6 +125,7 @@ if [ -z "$PLATFORM" ]; then fi case "$PLATFORM" in + beaglebone) _ARCH="armv7l"; QEMU_BIN=qemu-arm-static;; cubieboard2) _ARCH="armv7l"; QEMU_BIN=qemu-arm-static;; odroid-u2) _ARCH="armv7l"; QEMU_BIN=qemu-arm-static;; rpi) _ARCH="armv6l"; QEMU_BIN=qemu-arm-static;; |