commit | c7c5592858590e0a0d57883992a6967b1e708165 | [log] [tgz] |
---|---|---|
author | Potin Lai <potin.lai@quantatw.com> | Thu Feb 16 10:33:55 2023 +0800 |
committer | Potin Lai <potin.lai@quantatw.com> | Tue Mar 28 15:52:35 2023 +0800 |
tree | e33b26f43b67560c1646af57101b8dcd35d15bb0 | |
parent | dcde04e0bcb94375368315c6178e1665e3e7f3fe [diff] |
apphandler: add firmware version aux bytes parsing Default regex string only tries to match Major and Minor version. To match more firmware version info, platforms need to define it own regex string to match more strings, and assign correct mapping index in matches array. matches[0]: matched index for major ver matches[1]: matched index for minor ver matches[2]: matched index for aux[0] (set 0 to skip) matches[3]: matched index for aux[1] (set 0 to skip) matches[4]: matched index for aux[2] (set 0 to skip) matches[5]: matched index for aux[3] (set 0 to skip) Test Results: ``` regex = "([\d]+).([\d]+).([\d]+)-dev-([\d]+)-g([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})" matches = {1,2,5,6,7,8} version = 2.14.0-dev-750-g37a7c5ad1-dirty ^ ^ ^ ^ ^ ^ ^ ^ | | | | | | | | | | | | | | | |-- Aux byte 3 (0xAD), index 8 | | | | | | |---- Aux byte 2 (0xC5), index 7 | | | | | |------ Aux byte 1 (0xA7), index 6 | | | | |-------- Aux byte 0 (0x37), index 5 | | | |------------- Not used, index 4 | | |------------------- Not used, index 3 | |---------------------- Minor (14), index 2 |------------------------ Major (2), index 1 ``` rev.major: 2 rev.minor: 14 rev.aux[0]: 55 (0x37) rev.aux[1]: 167 (0xA7) rev.aux[2]: 197 (0xC5) rev.aux[3]: 173 (0xAD) Change-Id: I01c4d6b7468cea04d5046bbc4a60c4db20a7f2a9 Signed-off-by: Potin Lai <potin.lai@quantatw.com>
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage