diff options
author | Christopher Haster <chaster@utexas.edu> | 2020-11-26 20:24:19 +0300 |
---|---|---|
committer | Christopher Haster <chaster@utexas.edu> | 2020-11-29 05:11:36 +0300 |
commit | 30ed816febdedd71fecbe925e2c157ce6cb003ce (patch) | |
tree | 9bc72cca5edd0f23d11b593ff7dd780ae438b6ae /scripts | |
parent | a7cdd563f650337ba4dd24b3be94d644f221cb57 (diff) |
Standardized on externally provided config structs in the block devices
I have another branch where I tried exploring inlined config structs
backed by RAM, but this did not work out due to additional RAM and ROM costs.
Changing the bds to follow this was surprisingly annoying, as they had a
lot of shared geometry that was previously in a single shared config
object, and the way that testbd contains either of rambd and filebd made
configuring all three of these a bit complicated.
Ended up settling on a lfs_testbd_cfg that contains optional pointers to
lfs_rambd_cfg and lfs_filebd_cfg. These can be NULL, but only if that
bd goes unused.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/test.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/test.py b/scripts/test.py index 5750c2e..b6fb3eb 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -112,6 +112,20 @@ PROLOGUE = """ }; __attribute__((unused)) const struct lfs_testbd_cfg bdcfg = { + .rambd_cfg = &(const struct lfs_rambd_cfg){ + .read_size = LFS_READ_SIZE, + .prog_size = LFS_PROG_SIZE, + .erase_size = LFS_BLOCK_SIZE, + .erase_count = LFS_BLOCK_COUNT, + .erase_value = LFS_ERASE_VALUE, + }, + .filebd_cfg = &(const struct lfs_filebd_cfg){ + .read_size = LFS_READ_SIZE, + .prog_size = LFS_PROG_SIZE, + .erase_size = LFS_BLOCK_SIZE, + .erase_count = LFS_BLOCK_COUNT, + .erase_value = LFS_ERASE_VALUE, + }, .read_size = LFS_READ_SIZE, .prog_size = LFS_PROG_SIZE, .erase_size = LFS_BLOCK_SIZE, |