summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 076a1bd)
raw | patch | inline | side by side (parent: 076a1bd)
author | Jason Kridner <jdk@ti.com> | |
Thu, 27 Oct 2011 01:36:01 +0000 (21:36 -0400) | ||
committer | Denys Dmytriyenko <denys@ti.com> | |
Fri, 28 Oct 2011 01:57:52 +0000 (21:57 -0400) |
* 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>
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>
classes/sdcard_image.bbclass | patch | blob | history |
index 4ebc9986aec153b4dbdc94a51947404d1f21f5c7..9e4a959c5847fe34d76687a1651e61f92b4ca14e 100644 (file)
SIZE=$(/sbin/fdisk -l ${LOOPDEV} | grep Disk | grep bytes | awk '{print $5}')
CYLINDERS=$(echo $SIZE/255/63/512 | bc)
{
- echo ,9,0x0C,*
- echo ,,,-
- } | /sbin/sfdisk -D -H 255 -S 63 -C ${CYLINDERS} ${LOOPDEV}
+ echo 128,130944,0x0C,*
+ echo 131072,,,-
+ } | /sbin/sfdisk -D -uS -H 255 -S 63 -C ${CYLINDERS} ${LOOPDEV}
# Prepare loop devices for boot and filesystem partitions
BOOT_OFFSET=32256