File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -322,6 +322,7 @@ cbmem_check_if_me_disabled_mock() {
322322TEST_VBOOT_ENABLED=" ${TEST_VBOOT_ENABLED:- } "
323323TEST_ROMHOLE_MIGRATION=" ${TEST_ROMHOLE_MIGRATION:- } "
324324TEST_DIFFERENT_FMAP=" ${TEST_DIFFERENT_FMAP:- } "
325+ TEST_IS_SEABIOS=" ${TEST_IS_SEABIOS:- } "
325326
326327cbfstool_layout_mock () {
327328 # Emulating some fields in Coreboot Files System layout table:
@@ -354,10 +355,18 @@ cbfstool_read_bios_conffile_mock() {
354355 local _file_to_write_into
355356 _file_to_write_into=$( parse_for_arg_return_next " -f" " $@ " )
356357
358+ cat /dev/null > " $_file_to_write_into "
359+
357360 if [ " $TEST_VBOOT_ENABLED " = " true" ]; then
358361 # Emulating VBOOT presence, check firmware_pre_installation_routine and
359362 # firmware_pre_updating_routine funcs for more inf.:
360- echo " CONFIG_VBOOT=y" > " $_file_to_write_into "
363+ echo " CONFIG_VBOOT=y" >> " $_file_to_write_into "
364+ fi
365+
366+ if [ " $TEST_IS_SEABIOS " = " true" ]; then
367+ # Emulating SeaBIOS payload presence, check function choose_version for more
368+ # inf..
369+ echo " CONFIG_PAYLOAD_SEABIOS=y" >> " $_file_to_write_into "
361370 fi
362371
363372 echo " " >> " $_file_to_write_into "
Original file line number Diff line number Diff line change @@ -249,10 +249,10 @@ choose_version() {
249249 tmp_rom=$( mktemp --dry-run)
250250 config=/tmp/config
251251 # get current firmware
252- $FLASHROM -p " $PROGRAMMER_BIOS " ${FLASH_CHIP_SELECT} -r " $tmp_rom " >> " $FLASH_INFO_FILE " 2>> " $ERR_LOG_FILE "
252+ $FLASHROM flashrom_read_firm_mock -p " $PROGRAMMER_BIOS " ${FLASH_CHIP_SELECT} -r " $tmp_rom " >> " $FLASH_INFO_FILE " 2>> " $ERR_LOG_FILE "
253253 if [ -f " $tmp_rom " ]; then
254254 # extract config
255- $CBFSTOOL " $tmp_rom " extract -n config -f " $config " 2>> " $ERR_LOG_FILE "
255+ $CBFSTOOL read_bios_conffile_mock " $tmp_rom " extract -n config -f " $config " 2>> " $ERR_LOG_FILE "
256256 # check if current firmware is seabios, if yes then we can offer update
257257 if grep -q " CONFIG_PAYLOAD_SEABIOS=y" " $config " ; then
258258 if check_for_firmware_access seabios; then
You can’t perform that action at this time.
0 commit comments