rpi-eeprom-config: Make padding more robust.

Make it explicit that a modifiable file is stored withing a
single 4K sector (for erase) and that this includes the 20
byte header.

When modifying a file pad up to the next section instead of
just to an alignment size. This enables future changes to be
more flexible in terms of alignment and padding. Although,
files/sections with different padding requirements will likely
get a different magic.
This commit is contained in:
Tim Gover
2022-11-25 16:09:00 +00:00
parent d2cbfbc292
commit 214cb6ffd4
6 changed files with 129 additions and 71 deletions

View File

@@ -135,7 +135,7 @@ check_conf_size_large()
{
echo "check maximum config file size"
image="${script_dir}/$1"
conf="bootconf-2024.txt"
conf="bootconf-4076.txt"
expected_md5="$(md5sum "${conf}" | awk '{print $1}')"
@@ -154,7 +154,7 @@ check_conf_size_too_large()
{
echo "check config file which exceeds the maximum size"
image="${script_dir}/$1"
conf="bootconf-2025.txt"
conf="bootconf-4077.txt"
expected_md5="$(md5sum "${conf}" | awk '{print $1}')"