The fdisk and mkfs was factored out into a shell function
so that it is easier to create dirfferent partition layouts.
The default case was left the same as the original script
The partitions can be specified as percentages of the
available space (after Qi reserved space has been taken out)
by providing a comma separated list of values:
e.g. 25,0,50
Which would create partitions 1 and 3 with 25% and 50%
of the usable capacity. Partitions 2 and 4 would not be
assigned.
Signed-off-by: Christopher Hall <hsw@openmoko.com>
Hello Andy,
I am in the process of making a modified 6410-partition.sh
and I wonder if there is a mistake in the VFAT partition size:
Shouldn't the "+ $REARSECTORS" in the FATSECTORS calculation
be a subtraction, otherwise the backupfs will overlap the
space reserved for Qi at the end of the SD Card.
Please look at this dif to see what I mean:
This patch uses fdisk instead of dmesg to determine the size of
the uSD card. This should be less fragile and is much simpler
than the previous solution.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
6410-partition-sd.sh didn't handle Debian, which is just like Ubuntu 7.
(Tested on "lenny". YMMV.)
Signed-off-by: Werner Almesberger <werner@openmoko.org>
On Ubuntu 8.04.1 there can be spaces inside the initial bracketed
uptime number after a reboot. These spaces disappear once the uptime
is large enough. Therefore, use sed to filter out these spaces so
that the cut command that extracts SD card size will always work.
Signed-off-by: Christopher Hall <hsw@openmoko.com>
The hack to find the number of sectors turns out to be
sensitive to the host kernel. This is a workaround until
we find something in /proc or /sys that has the same info
in a more accessible way.
Signed-off-by: Christopher Hall <hsw@openmoko.com>
This patch adds a small script that knows how to partition, format and
prepare with a bootloader image an SD Card for usage with SD Card boot
on 6410.
You use it like this:
./6410-partition-sd.sh sde sdhc ./image/qi-s3c6410-andy_495294c60f2f1432
This will prepare your card with three partitions and put the bootloader
images at the end as required by 6410 iROM.
If you put anything on the fourth parameter, it skips the fdisk and the
formatting stages and just updates the bootloader.
Signed-off-by: Andy Green <andy@openmoko.com>