Open
Description
Creating a ffs image with this configuration:
@0,0x0,
FIRST,0x400,0x100,,,/dev/zero
$ touch test.ffs
$ ./ffspart -s 0x1000 -c 10 -i test.csv -p test.ffs
$ pflash -i -F test.ffs
Flash info:
-----------
Name = /home/joel/dev/skiboot/external/ffspart/test.ffs
Total size = 0MB Flags E:ECC, P:PRESERVED, R:READONLY, B:BACKUP
Erase granule = 0KB F:REPROVISION, V:VOLATILE, C:CLEARECC
TOC@0x00000000 Partitions:
-----------
ID=00 part 0x00000000..0x00001000 (actual=0x00001000) [----------]
ID=01 FIRST 0x00000000..0x00000000 (actual=0x00000100) [----------]
FIRST
should start at 0x400, but as eraseblock size 0x1000 > 0x400, the toc (named 'part') is placed there first, and everything is broken from then on.
While it's a bad idea to have any partition smaller than the eraseblock size, ffspart should still create the image, and perhaps warn the user when creating the partition boundry when it is not eraseblock aligned.
Metadata
Assignees
Labels
No labels
Activity