From patchwork Thu Aug 17 00:15:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 110286 Delivered-To: patches@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp1489884obb; Wed, 16 Aug 2017 17:15:14 -0700 (PDT) X-Received: by 10.84.194.1 with SMTP id g1mr3710681pld.26.1502928914383; Wed, 16 Aug 2017 17:15:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502928914; cv=none; d=google.com; s=arc-20160816; b=j/PneI4RMLcD+UUJQBrf6Sa/SmwFHbhL5VvzG6KyBEL5JxsucLPcX73IzE77RIaFya 4HiRE2R35F7MA0OcjUKZ6RQUpDMVcA2c85wyo0IjHRraBjFeuuSXn8xcAAMeGtiU4cMZ ogSr+a0u6rIkAs9sIUazv7o2Pi/uTusxvDXfS/R7v6ZXc7JhLpirCwPBt9oEkRqaViyX qRlqM9ma72JdTlmLJimRQDUC24iHE/8mS3bArRPK4lBfGuDq0tYM3jvjOTl/I1dw7VtW +SvAXiTkWyxE88ZnJbCucCSOgyI5M4TTyx8z+bRPELchl967hLb7SIr+wUViVsIyVD38 KBJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=tLVItHnrHgfVpcYXB3hMAYKBzqyZgDt47L3tpVxNeY4=; b=aqbAjH41RtlYzupvxfADVY98A4RG4mUcryBtsaNKjZHvSwJW5XBeBUawtwCFgWzpjv R/bTC8SCtUWp+6kepAW4zzFknhkz5vfuO+CMLEF111TlcOFdck7gwXlksr0LMFanzI7v /gRz5mFXRpU3YmoO1Mc4jpp6nxbpGSItu8VE7cRnLQQ/Fw2bV6qFhlJ8sarXSNVvfUW5 T82jwS3VY2C/TDxgYf7JaB5x90caoGCXSstB+Z+DeOzHtA6lLMhY8rwk4euJP1H65QHt ds8c2KQ3PUOSI4Ap39/IuaqOTsJX284tYaMtNwDYeh0SUqFZi5Vt/UGu76s0RtFrP1w9 NRtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f1wYqmEw; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::234 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-pg0-x234.google.com (mail-pg0-x234.google.com. [2607:f8b0:400e:c05::234]) by mx.google.com with ESMTPS id c72si1208088pfk.227.2017.08.16.17.15.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Aug 2017 17:15:14 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::234 as permitted sender) client-ip=2607:f8b0:400e:c05::234; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f1wYqmEw; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::234 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x234.google.com with SMTP id y129so31124082pgy.4 for ; Wed, 16 Aug 2017 17:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=tLVItHnrHgfVpcYXB3hMAYKBzqyZgDt47L3tpVxNeY4=; b=f1wYqmEwGhaV+IJKRQjg2VcMs+/gQe5C24fo/lka4Klf/johFhoIx0R8lMzlygM2fM 52jLgiTVBzT1ZajIW6EGFwY9KeHx9CcFG0+wWECWICa28eEtYnEYLi71glZG5sQqk8Yc LJdLbzeZ4zrxaKriW1/mbtn3fg8mnYqD3Tqkk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=tLVItHnrHgfVpcYXB3hMAYKBzqyZgDt47L3tpVxNeY4=; b=i1MsDGr7+j5RwJNJB1GrhdLRyrGqYD9vK7i7IcSCIqQauR5xqPUoreY9WGrkAdOTWK LdmyXGx43e5He71O6l0lAUajMkltTLlGR+h1zpLpaqhCFTVjAyU2mfiN8V3woPGV6MBQ IbalBL4P2h/WPT1LjSrsGewKqT9/P1Hyuq2qXu18BGSpkxgJzghjH7YRmCpzQ72JzpJP Ua4Ihq+ncNfh4kqlyJVY2nz8jaESNXk1lDpck9z4Yc8opIXCM3GUj29HcAZ6NgmS0R5b DWVa/jjnCnsEHdGo7Zf8ajhUNcefOq1S6urkzZUd97FTWJztQNpaWmA8eVlZuVtP+XyZ 7DpQ== X-Gm-Message-State: AHYfb5jHnBVkcjHpx/xLKIWEwlQh7vOuFeu6ltI2aPHdhy2culA2uJWP qUIPsazSIjWcSzooE6s= X-Received: by 10.99.126.87 with SMTP id o23mr3285826pgn.443.1502928913987; Wed, 16 Aug 2017 17:15:13 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id w66sm4113539pfi.63.2017.08.16.17.15.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Aug 2017 17:15:12 -0700 (PDT) From: John Stultz To: Haojian Zhuang Cc: Mark Salyzyn Subject: [PATCH 1/2] generate_ptable.sh add swap-8g (aosp + 1.5GB of swap) Date: Wed, 16 Aug 2017 17:15:10 -0700 Message-Id: <1502928911-3220-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 From: Mark Salyzyn Partition Name Block Device Size blocks & bytes Start block vrl /dev/block/mmcblk0p1 2048 1MB 2048 vrl_backup /dev/block/mmcblk0p2 2048 1MB 4096 mcuimage /dev/block/mmcblk0p3 2048 1MB 6144 fastboot /dev/block/mmcblk0p4 16384 8MB 8192 nvme /dev/block/mmcblk0p5 4096 2MB 24576 ---- below differs from aosp-8g ---- boot /dev/block/mmcblk0p6 131072 64MB 28672 cache /dev/block/mmcblk0p7 524288 256MB 159744 swap /dev/block/mmcblk0p8 3145728 1.5GB 684032 system /dev/block/mmcblk0p9 3145728 1.5GB 3829760 userdata /dev/block/mmcblk0p10 8294367 4.0GB 6975488 If flashing over from aosp-8g with flashall, make sure cache is flashed first since it changed location and would otherwise be untouched. userdata image is constructed correctly for the smaller with: make TARGET_WITH_SWAP=true. Test: manual flash ptable and flashall -w, hikey boots. Bug: 38446744 Change-Id: Ib27f4d8ab9c756f220bc7da049e550e6c7d46dfc --- hikey/BoardConfig.mk | 6 +++++- l-loader/Makefile | 2 +- l-loader/generate_ptable.sh | 27 ++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/hikey/BoardConfig.mk b/hikey/BoardConfig.mk index 7844ecb..b490a1f 100644 --- a/hikey/BoardConfig.mk +++ b/hikey/BoardConfig.mk @@ -17,10 +17,14 @@ BOARD_KERNEL_CMDLINE += printk.devkmsg=on TARGET_NO_DTIMAGE := true BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 -ifeq ($(TARGET_USERDATAIMAGE_4GB), true) +ifeq ($(TARGET_USERDATAIMAGE_4GB), true) # to build for aosp-4g partition table BOARD_USERDATAIMAGE_PARTITION_SIZE := 1595915776 else +ifeq ($(TARGET_WITH_SWAP), true) # to build for swap-8g partition table +BOARD_USERDATAIMAGE_PARTITION_SIZE := 4246715904 +else BOARD_USERDATAIMAGE_PARTITION_SIZE := 5588893184 endif +endif BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456 BOARD_FLASH_BLOCK_SIZE := 131072 diff --git a/l-loader/Makefile b/l-loader/Makefile index 93afcd1..692cd82 100644 --- a/l-loader/Makefile +++ b/l-loader/Makefile @@ -4,7 +4,7 @@ CFLAGS=-march=armv7-a LD=$(CROSS_COMPILE)ld OBJCOPY=$(CROSS_COMPILE)objcopy BL1=bl1.bin -PTABLE_LST:=aosp-4g aosp-8g linux-4g linux-8g +PTABLE_LST:=aosp-4g aosp-8g linux-4g linux-8g swap-8g all: l-loader.bin ptable.img diff --git a/l-loader/generate_ptable.sh b/l-loader/generate_ptable.sh index 3bc232e..80254f8 100755 --- a/l-loader/generate_ptable.sh +++ b/l-loader/generate_ptable.sh @@ -4,6 +4,7 @@ # tiny: for testing purpose. # aosp: 10 entries (same as linux with userdata). # linux: 9 entries (same as aosp without userdata). +# swap: 10 entries (similar to aosp, drop reserved, 1.5G of swap). PTABLE=${PTABLE:-aosp} SECTOR_SIZE=512 @@ -16,7 +17,7 @@ case ${PTABLE} in aosp-4g|linux-4g) SECTOR_NUMBER=7471104 ;; - aosp-8g|linux-8g) + aosp-8g|linux-8g|swap-8g) SECTOR_NUMBER=15269888 ;; esac @@ -78,6 +79,30 @@ case ${PTABLE} in #[9: system: 590M-End] sgdisk -n -E -t 9:8300 -u 9:FC56E345-2E8E-49AE-B2F8-5B9D263FE377 -c 9:"system" ${TEMP_FILE} ;; + swap*) + dd if=/dev/zero of=${TEMP_FILE} bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} + sgdisk -U 2CB85345-6A91-4043-8203-723F0D28FBE8 -v ${TEMP_FILE} + #[1: vrl: 1M-2M] + sgdisk -n 1:0:+1M -t 1:0700 -u 1:496847AB-56A1-4CD5-A1AD-47F4ACF055C9 -c 1:"vrl" ${TEMP_FILE} + #[2: vrl_backup: 2M-3M] + sgdisk -n 2:0:+1M -t 2:0700 -u 2:61A36FC1-8EFB-4899-84D8-B61642EFA723 -c 2:"vrl_backup" ${TEMP_FILE} + #[3: mcuimage: 3M-4M] + sgdisk -n 3:0:+1M -t 3:0700 -u 3:65007411-962D-4781-9B2C-51DD7DF22CC3 -c 3:"mcuimage" ${TEMP_FILE} + #[4: fastboot: 4M-12M] + sgdisk -n 4:0:+8M -t 4:EF02 -u 4:496847AB-56A1-4CD5-A1AD-47F4ACF055C9 -c 4:"fastboot" ${TEMP_FILE} + #[5: nvme: 12M-14M] + sgdisk -n 5:0:+2M -t 5:0700 -u 5:00354BCD-BBCB-4CB3-B5AE-CDEFCB5DAC43 -c 5:"nvme" ${TEMP_FILE} + #[6: boot: 14M-78M] + sgdisk -n 6:0:+64M -t 6:EF00 -u 6:5C0F213C-17E1-4149-88C8-8B50FB4EC70E -c 6:"boot" ${TEMP_FILE} + #[7: cache: 78M-384M] + sgdisk -n 7:0:+256M -t 7:8301 -u 7:A092C620-D178-4CA7-B540-C4E26BD6D2E2 -c 7:"cache" ${TEMP_FILE} + #[8: swap: 384M-1920M] + sgdisk -n 8:0:+1536M -t 8:8200 -u 8:FC56E344-2E8E-49AE-B2F8-5B9D263FE377 -c 8:"swap" ${TEMP_FILE} + #[9: system: 1920M-3556M] + sgdisk -n 9:0:+1536M -t 9:8300 -u 9:FC56E345-2E8E-49AE-B2F8-5B9D263FE377 -c 9:"system" ${TEMP_FILE} + #[10: userdata: 3556M-End] + sgdisk -n -E -t 10:8300 -u 10:064111F6-463B-4CE1-876B-13F3684CE164 -c 10:"userdata" -p ${TEMP_FILE} + ;; esac # get the main and the backup parts of the partition table From patchwork Thu Aug 17 00:15:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 110287 Delivered-To: patches@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp1489902obb; Wed, 16 Aug 2017 17:15:15 -0700 (PDT) X-Received: by 10.98.103.69 with SMTP id b66mr3309875pfc.171.1502928915561; Wed, 16 Aug 2017 17:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502928915; cv=none; d=google.com; s=arc-20160816; b=mfYBJTPXQZCQq51kFc1qQ/jlZzZUkj8joQIhWYcL/3gPQHBsSdUij7HefQHFdkhRye 2Gpr9Mz4xe87gR/rnxCyy6qV49jw9v2aj3fsWlH5QiM4+IFD9KEkHqKPYDbQemkiwQ6A JM3RVou72woTVUu+4J+sgjnrq1DPJoVRld3jznBIu6gBOT865eQWDDFPhJvKulDFjj5q ocmHQa1iIAm68n9fb5l/FhrAqNA21Nv5lpAnoIuXXXk55r3aCi4MsyjMDDGrF2y1jMl1 de1vUq3GwBCzxweljlrny/gvxlZbnx/75tzuOzYr9QFauktFxOnGVxb+aarvR3oXXYrH atOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Uxc83wBQ38Bk8yybRBA4TFZiddUadLz35tVORSARUhA=; b=a/QTjgcjHXFz4Mw929+0sCw/XVgNtlUunZ3bs+CEvM49yt4ylpo47DT6qeqEPiVzfD IzP7wssj5PHgVXh6TLZ4lMIgkaPI+vkYGklCeIP79Fz5jbGfTIpXSULXOmcLPNdYDRAP TOJFNq0AE4G0BufUgevMX9LXgSlVGM1Lin6FbFpDQrJpZICBE4BNsVioQcVagZICx4Ki 1t3h+bSFuxq5f0PuzALDL/iC0Hly1ewRZIQ3oL+VozEfPgdI/zElesag1fgd4+tSoBaK SqczqgTa2GNyyTQBpqK9WatKAimJrSPnEodRMBb7busZkhrdnsiykQ7hHpoGsSGr7NMz acWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e9h+yuq+; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::230 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-pg0-x230.google.com (mail-pg0-x230.google.com. [2607:f8b0:400e:c05::230]) by mx.google.com with ESMTPS id u3si1129156pgo.886.2017.08.16.17.15.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Aug 2017 17:15:15 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::230 as permitted sender) client-ip=2607:f8b0:400e:c05::230; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e9h+yuq+; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::230 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x230.google.com with SMTP id i12so31167969pgr.3 for ; Wed, 16 Aug 2017 17:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Uxc83wBQ38Bk8yybRBA4TFZiddUadLz35tVORSARUhA=; b=e9h+yuq+TEOyGhvwaLNIEw6LE88VZP6BQbFf/jpAxXbb0jeljI9hB2aV23jyLEZ+se R0xqdLbYVfJ5FNzZDHOULpDNdsFVvTSrLHOE2eUJugFoUkUh0DcebL6JzvkrB8WBKQEi Hb3yFYUb36oIb5fogSeLZpNpmvkcZ7S7gtwpo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Uxc83wBQ38Bk8yybRBA4TFZiddUadLz35tVORSARUhA=; b=dNWC5WmckJfVgNVAkJwwV6v9OMZEmYX8Yb6U54bxP1B1ZLIrmK9DEQB7TG8bo2WJDO U60YcKmVRdX3tWhrQbWMdZBCxw9ZWbIXhOcm6HNs5hCYHjBVOnrd+ooAtUGHVfSbuA0H +7a4I6p/oMH81yq9Pk8lPmjjJjEhoLojkN91AM650i8Gv+rFHcfleqyduCFXtDjh4ag9 MgPYiJ1g+u1e39iwhq59EIflFg13/IijC4xyClMFhnKvsScvwIijXRMZ+x3+NDFKKxGd LH0ptwFpfPC92jsC2BoS5F0ajXyZgdZKkIDGiftQhOyiOt5U6uejl3QxIKNTynq5UnnY 8shA== X-Gm-Message-State: AHYfb5hPQuhfi0kvTZLxjBRFAftH2ya8ovlGUIK4FSJpo13G2N/B75rk kIu2xUKZ8bB/488zyV8= X-Received: by 10.99.98.68 with SMTP id w65mr3355941pgb.268.1502928915256; Wed, 16 Aug 2017 17:15:15 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id w66sm4113539pfi.63.2017.08.16.17.15.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Aug 2017 17:15:14 -0700 (PDT) From: John Stultz To: Haojian Zhuang Cc: Mark Salyzyn Subject: [PATCH 2/2] generate_ptable.sh Use dd conv=sparse Date: Wed, 16 Aug 2017 17:15:11 -0700 Message-Id: <1502928911-3220-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502928911-3220-1-git-send-email-john.stultz@linaro.org> References: <1502928911-3220-1-git-send-email-john.stultz@linaro.org> From: Mark Salyzyn When constructing the image, by using sparse we do not place too much stress on the /tmp/ filesystem. Test: manual, ensure all images compare before and after Bug: 38446744 Change-Id: I72593e2a5176b7a8f0373ed54d2e626220373307 --- l-loader/generate_ptable.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.7.4 diff --git a/l-loader/generate_ptable.sh b/l-loader/generate_ptable.sh index 80254f8..779700f 100755 --- a/l-loader/generate_ptable.sh +++ b/l-loader/generate_ptable.sh @@ -28,13 +28,13 @@ echo ${BK_PTABLE_LBA} # get the partition table case ${PTABLE} in tiny) - dd if=/dev/zero of=${TEMP_FILE} bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} + dd if=/dev/zero of=${TEMP_FILE} conv=sparse bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} sgdisk -U -R -v ${TEMP_FILE} sgdisk -n 1:2048:4095 -t 1:0700 -u 1:F9F21F01-A8D4-5F0E-9746-594869AEC3E4 -c 1:"vrl" -p ${TEMP_FILE} sgdisk -n 2:4096:6143 -t 2:0700 -u 2:F9F21F02-A8D4-5F04-9746-594869AEC3E4 -c 2:"vrl_backup" -p ${TEMP_FILE} ;; aosp*) - dd if=/dev/zero of=${TEMP_FILE} bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} + dd if=/dev/zero of=${TEMP_FILE} conv=sparse bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} sgdisk -U 2CB85345-6A91-4043-8203-723F0D28FBE8 -v ${TEMP_FILE} #[1: vrl: 1M-2M] sgdisk -n 1:0:+1M -t 1:0700 -u 1:496847AB-56A1-4CD5-A1AD-47F4ACF055C9 -c 1:"vrl" ${TEMP_FILE} @@ -58,7 +58,7 @@ case ${PTABLE} in sgdisk -n -E -t 10:8300 -u 10:064111F6-463B-4CE1-876B-13F3684CE164 -c 10:"userdata" -p ${TEMP_FILE} ;; linux*) - dd if=/dev/zero of=${TEMP_FILE} bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} + dd if=/dev/zero of=${TEMP_FILE} conv=sparse bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} sgdisk -U 2CB85345-6A91-4043-8203-723F0D28FBE8 -v ${TEMP_FILE} #[1: vrl: 1M-2M] sgdisk -n 1:0:+1M -t 1:0700 -u 1:496847AB-56A1-4CD5-A1AD-47F4ACF055C9 -c 1:"vrl" ${TEMP_FILE} @@ -80,7 +80,7 @@ case ${PTABLE} in sgdisk -n -E -t 9:8300 -u 9:FC56E345-2E8E-49AE-B2F8-5B9D263FE377 -c 9:"system" ${TEMP_FILE} ;; swap*) - dd if=/dev/zero of=${TEMP_FILE} bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} + dd if=/dev/zero of=${TEMP_FILE} conv=sparse bs=${SECTOR_SIZE} count=${SECTOR_NUMBER} sgdisk -U 2CB85345-6A91-4043-8203-723F0D28FBE8 -v ${TEMP_FILE} #[1: vrl: 1M-2M] sgdisk -n 1:0:+1M -t 1:0700 -u 1:496847AB-56A1-4CD5-A1AD-47F4ACF055C9 -c 1:"vrl" ${TEMP_FILE} @@ -106,7 +106,7 @@ case ${PTABLE} in esac # get the main and the backup parts of the partition table -dd if=${TEMP_FILE} of=prm_ptable.img bs=${SECTOR_SIZE} count=34 -dd if=${TEMP_FILE} of=sec_ptable.img skip=${BK_PTABLE_LBA} bs=${SECTOR_SIZE} count=33 +dd if=${TEMP_FILE} of=prm_ptable.img conv=sparse bs=${SECTOR_SIZE} count=34 +dd if=${TEMP_FILE} of=sec_ptable.img conv=sparse skip=${BK_PTABLE_LBA} bs=${SECTOR_SIZE} count=33 rm -f ${TEMP_FILE}