Merge branch '2021-03-17-assorted-fixes'

- Make tests search /sbin for tools, don't use ENODATA in host tools to
  be more portable, avb fix when partition isn't found and a bugfix for
  mediatek mmc.
This commit is contained in:
Tom Rini 2021-03-18 12:53:35 -04:00
commit d65bd57073
5 changed files with 7 additions and 4 deletions

View File

@ -369,7 +369,7 @@ static struct mmc_part *get_partition(AvbOps *ops, const char *partition)
}
ret = part_get_info_by_name(mmc_blk, partition, &part->info);
if (!ret) {
if (ret < 0) {
printf("Can't find partition '%s'\n", partition);
goto err;
}

View File

@ -1651,7 +1651,7 @@ int fit_check_format(const void *fit, ulong size)
/* mandatory / node 'timestamp' property */
if (!fdt_getprop(fit, 0, FIT_TIMESTAMP_PROP, NULL)) {
log_debug("Wrong FIT format: no timestamp\n");
return -ENODATA;
return -EBADMSG;
}
}

View File

@ -1639,7 +1639,8 @@ static int msdc_drv_probe(struct udevice *dev)
else
cfg->f_min = host->src_clk_freq / (4 * 4095);
cfg->f_max = host->src_clk_freq;
if (cfg->f_max < cfg->f_min || cfg->f_max > host->src_clk_freq)
cfg->f_max = host->src_clk_freq;
cfg->b_max = 1024;
cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;

View File

@ -1158,7 +1158,7 @@ int fit_image_check_comp(const void *fit, int noffset, uint8_t comp);
* @fit: pointer to the FIT format image header
* @return 0 if OK, -ENOEXEC if not an FDT file, -EINVAL if the full FDT check
* failed (e.g. due to bad structure), -ENOMSG if the description is
* missing, -ENODATA if the timestamp is missing, -ENOENT if the /images
* missing, -EBADMSG if the timestamp is missing, -ENOENT if the /images
* path is missing
*/
int fit_check_format(const void *fit, ulong size);

View File

@ -414,6 +414,8 @@ def mk_env_ext4(state_test_env):
if os.path.exists(persistent):
c.log.action('Disk image file ' + persistent + ' already exists')
else:
# Some distributions do not add /sbin to the default PATH, where mkfs.ext4 lives
os.environ["PATH"] += os.pathsep + '/sbin'
try:
u_boot_utils.run_and_log(c, 'dd if=/dev/zero of=%s bs=1M count=16' % persistent)
u_boot_utils.run_and_log(c, 'mkfs.ext4 %s' % persistent)