Hello Sascha, thanks for the review. It was a bit more effort and especially the extra fit_get_image_address (I used one instead of separate ones for load and entry) moved quite some code around. But I posted a v5 that should fulfill the asked changes. The output for the four cases (load, entry set or not set) now looks like the following: barebox@sometarget:/mnt/mmc bootm -v -d fallback.itb FIT: Opened FIT image: Some Image FIT: No match found. Trying default. FIT: configuration 'conf-1': Boot Application with FDT blob FIT: image 'kernel': 'RTEMS Application' FIT: /images/kernel/hash-1: hash OK FIT: /images/kernel/load: 0x80500000 FIT: /images/kernel/entry: 0x80500000 Loading open firmware Device Tree flattened Binary 'fallback.itb' OS image not yet relocated Passing control to FIT image handler no initrd load address, defaulting to 0x82abb000 FIT: image 'fdt-1': 'Flattened Device Tree blob' FIT: /images/fdt-1/hash-1: hash OK commandline: console=ttymxc0,115200n8 Starting kernel at 0x80500000, oftree at 0x82abb000... Starting kernel in secure mode Dryrun. Aborted barebox@sometarget:/mnt/mmc bootm -v -d -e 0x10 fallback.itb FIT: Opened FIT image: Some Image FIT: No match found. Trying default. FIT: configuration 'conf-1': Boot Application with FDT blob FIT: image 'kernel': 'RTEMS Application' FIT: /images/kernel/hash-1: hash OK FIT: /images/kernel/load: 0x80500000 Loading open firmware Device Tree flattened Binary 'fallback.itb' OS image not yet relocated Passing control to FIT image handler no initrd load address, defaulting to 0x82abb000 FIT: image 'fdt-1': 'Flattened Device Tree blob' FIT: /images/fdt-1/hash-1: hash OK commandline: console=ttymxc0,115200n8 Starting kernel at 0x80500010, oftree at 0x82abb000... Starting kernel in secure mode Dryrun. Aborted barebox@sometarget:/mnt/mmc bootm -v -d -a 0x10 fallback.itb FIT: Opened FIT image: Some Image FIT: No match found. Trying default. FIT: configuration 'conf-1': Boot Application with FDT blob FIT: image 'kernel': 'RTEMS Application' FIT: /images/kernel/hash-1: hash OK FIT: /images/kernel/entry: 0x80500000 Loading open firmware Device Tree flattened Binary 'fallback.itb' OS image not yet relocated Passing control to FIT image handler Dryrun. Aborted handler failed with: Out of memory barebox@sometarget:/mnt/mmc bootm -v -d -a 0x10 -e 0x10 fallback.itb FIT: Opened FIT image: Some Image FIT: No match found. Trying default. FIT: configuration 'conf-1': Boot Application with FDT blob FIT: image 'kernel': 'RTEMS Application' FIT: /images/kernel/hash-1: hash OK Loading open firmware Device Tree flattened Binary 'fallback.itb' OS image not yet relocated Passing control to FIT image handler Dryrun. Aborted handler failed with: Out of memory barebox@sometarget:/mnt/mmc Best regards Christian On 14/07/2020 20:09, Sascha Hauer wrote: > Hi Christian, > > On Tue, Jul 14, 2020 at 11:11:39AM +0200, Christian Mauderer wrote: >> @@ -622,7 +622,8 @@ int bootm_boot(struct bootm_data *bootm_data) >> } >> >> ret = fit_open_image(data->os_fit, data->fit_config, "kernel", >> - &data->fit_kernel, &data->fit_kernel_size); >> + &data->fit_kernel, &data->fit_kernel_size, >> + &data->os_address, &data->os_entry); > > bootm has -a and -e options to specify the load address and the entry > point. If given, these should take precedence over the addresses given > in the FIT image. > >> int fit_open_image(struct fit_handle *handle, void *configuration, >> const char *name, const void **outdata, >> - unsigned long *outsize) >> + unsigned long *outsize, unsigned long *load, >> + unsigned long *entry) >> { > > fit_open_image() has many parameters already and the two new ones are > not always needed or used. I think it's better to make getting the > addresses a separate function, fit_get_load_address() and > fit_get_entry() maybe? > > Regards, > Sascha > -- -------------------------------------------- embedded brains GmbH Herr Christian Mauderer Dornierstr. 4 D-82178 Puchheim Germany email: christian.mauderer@xxxxxxxxxxxxxxxxxx Phone: +49-89-18 94 741 - 18 Fax: +49-89-18 94 741 - 08 PGP: Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox