ci: testbed: OSPv1: cleanup LCM data partition during flashing

There is now dedicated LCM data partition mounted under /lcm which is
not cleared up after each test, thus containers used in previous tests
persist during the DUT reboot and flashing procedure, violating test
imdepotence and making consecutive test fail.

So lets fix it by clearing up the LCM data partition during DUT firmware
flashing procedure, clearing just ext4 filesystem metadata, not erasing
complete 3 GiB and saving some time.

 20     0x000f6800      0x006f67ff      "lcm_data"
        attrs:  0x0000000000000000
        type:   ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
        guid:   c5cde408-0b88-48ba-8701-eed060c51309

The 0xf6800 is the starting eMMC block of that partition and 0x400 is
eMMC erase group size, thus minimal size we can erase.

References: PCF-1101, PCF-1267
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
This commit is contained in:
Petr Štetiar 2024-07-31 05:43:12 +00:00
parent 324c728be3
commit 3a444050ee
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -279,7 +279,9 @@ targets:
init_commands:
- setenv serverip 192.168.1.2
- setenv ipaddr 192.168.1.1
- setenv lcm_data_block_start 0xf6800
- setenv fullimage prplos-intel_x86-lgm-PRPL_OSP_TB341-osp_tb341_fullimage.img
- mmc dev 0 && mmc erase ${lcm_data_block_start} 0x400
- mmc dev 0 && mmc erase ${rootfs_data_block_start} ${rootfs_data_block_size} && run update_fullimage
UBootStrategy: {}