diff options
author | Jason Kridner <jdk@ti.com> | 2011-10-26 21:36:01 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2011-10-27 21:57:52 -0400 |
commit | ed09701ebe89d4ce0802cf734aa25c29e94febe8 (patch) | |
tree | 1cc7a2de0ef12b5d0c925261e1a1d131de271071 /classes | |
parent | 076a1bd114881f9327e147555dd43e9b4915e913 (diff) | |
download | meta-ti-ed09701ebe89d4ce0802cf734aa25c29e94febe8.tar.gz |
sdcard_image: align partitions with flash pages
* Align partitions for SD card performance/wear optimization. For more
details, please see:
http://sakoman.com/OMAP/a-script-for-partitioningformatting-a-bootable-sdmicrosd-card.html
# Modifications to align partitioning by Steve Sakoman
# based on work by Arnd Bergmann
# Align partitions for SD card performance/wear optimization
# FAT partition size is 131072 sectors (64MB) less:
# MBR - 1 sector
# padding to align to the page size of the underlying flash - 127 sectors
# so we start the first partition at sector 128 and make it 131072 - 128 = 130944 sectors
# second partition starts at 131072 and continues to fill the card
Signed-off-by: Jason Kridner <jdk@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sdcard_image.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/sdcard_image.bbclass b/classes/sdcard_image.bbclass index 4ebc9986..9e4a959c 100644 --- a/classes/sdcard_image.bbclass +++ b/classes/sdcard_image.bbclass | |||
@@ -46,9 +46,9 @@ IMAGE_CMD_sdimg () { | |||
46 | SIZE=$(/sbin/fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}') | 46 | SIZE=$(/sbin/fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}') |
47 | CYLINDERS=$(echo $SIZE/255/63/512 | bc) | 47 | CYLINDERS=$(echo $SIZE/255/63/512 | bc) |
48 | { | 48 | { |
49 | echo ,9,0x0C,* | 49 | echo 128,130944,0x0C,* |
50 | echo ,,,- | 50 | echo 131072,,,- |
51 | } | /sbin/sfdisk -D -H 255 -S 63 -C ${CYLINDERS} ${LOOPDEV} | 51 | } | /sbin/sfdisk -D -uS -H 255 -S 63 -C ${CYLINDERS} ${LOOPDEV} |
52 | 52 | ||
53 | # Prepare loop devices for boot and filesystem partitions | 53 | # Prepare loop devices for boot and filesystem partitions |
54 | BOOT_OFFSET=32256 | 54 | BOOT_OFFSET=32256 |