From 0ff008b13a6f819755416375004fd5d4962613d3 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Thu, 12 Dec 2013 13:23:52 -0600 Subject: [PATCH] add: --no-swap option from: https://groups.google.com/d/msg/beagleboard/KdcMGFJKvuc/PPN0xgw0VXQJ Reported-by: David Lambert Signed-off-by: Robert Nelson --- mk_mmc.sh | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/mk_mmc.sh b/mk_mmc.sh index 0b9f2a3..c157ec8 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -909,22 +909,34 @@ finish_installing_device () { } setup_parition_recipe () { - if [ ! "${conf_swapsize_mb}" ] ; then - conf_swapsize_mb=1024 - fi #This (so far) has been leaving the first Partition Alone... + if [ "x${no_swap}" = "xenabled" ] ; cat > ${TEMPDIR}/initrd-tree/partition_recipe <<-__EOF__ 500 1000 -1 ext4 method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } label{ rootfs } options/noatime{ noatime } . - - 128 1200 ${conf_swapsize_mb} linux-swap - method{ swap } - format{ } . __EOF__ + else + if [ ! "${conf_swapsize_mb}" ] ; then + conf_swapsize_mb=1024 + fi + + cat > ${TEMPDIR}/initrd-tree/partition_recipe <<-__EOF__ + 500 1000 -1 ext4 + method{ format } format{ } + use_filesystem{ } filesystem{ ext4 } + mountpoint{ / } label{ rootfs } + options/noatime{ noatime } . + + 128 1200 ${conf_swapsize_mb} linux-swap + method{ swap } + format{ } . + + __EOF__ + fi } initrd_preseed_settings () { @@ -1664,6 +1676,9 @@ while [ ! -z "$1" ] ; do check_root check_mmc ;; + --no-swap) + no_swap="enabled" + ;; --uboot) checkparm $2 UBOOT_TYPE="$2"