mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Christian Mauderer <christian.mauderer@embedded-brains.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org, a.fatoum@pengutronix.de
Subject: Re: [PATCH v4] FIT: Parse `load` and `entry` addresses.
Date: Wed, 15 Jul 2020 11:30:52 +0200	[thread overview]
Message-ID: <9cfeb3a0-bb95-deb7-fbd4-d42ef48947b7@embedded-brains.de> (raw)
In-Reply-To: <20200714180949.GS15485@pengutronix.de>

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@embedded-brains.de
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2020-07-15  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  9:11 Christian Mauderer
2020-07-14  9:15 ` Ahmad Fatoum
2020-07-14  9:15   ` Christian Mauderer
2020-07-14 18:09 ` Sascha Hauer
2020-07-15  9:30   ` Christian Mauderer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cfeb3a0-bb95-deb7-fbd4-d42ef48947b7@embedded-brains.de \
    --to=christian.mauderer@embedded-brains.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox