kexec.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Arnaud Ferraris <arnaud.ferraris@gmail.com>
To: Bhupesh Sharma <bhsharma@redhat.com>
Cc: Thomas Perrot <thomas.perrot@sigfox.com>,
	Simon Horman <horms@verge.net.au>,
	kexec mailing list <kexec@lists.infradead.org>
Subject: Re: [PATCH 0/3] arm64: add support for loading kernel from FITimage
Date: Fri, 27 Jul 2018 10:17:03 +0200	[thread overview]
Message-ID: <affc6be0-08ea-4f7d-8cb1-736b51a971d9@gmail.com> (raw)
In-Reply-To: <598fab1c-3dbb-d11a-19e7-aa430509b1ee@sigfox.com>

Hello Bhupesh,

Did you have a chance to have a look at my email ?

Moreover, I'm addind Thomas Perrot to the conversation, as he wil be 
taking over my work at Sigfox, and will most probably want to follow 
this matter.

Best regards,

Arnaud


On 06/07/2018 16:39, Arnaud Ferraris wrote:
> Hello Bhupesh,
>
> Thanks for your answer.
>
> On 06/07/2018 08:37, Bhupesh Sharma wrote:
>> Hmm, I think I mentioned this earlier, but why do we need kexec to
>> support the FIT image format? See the FIT image (or the .itb file)
>> will be parsed by the u-boot bootloader and the respective components
>> will be loaded by it at the appropriate load addresses (for the kernel
>> Image it would be the load address mentioned in the 'loadaddr' u-boot
>> environment variable and for the dtb it would be as per the arm64
>> architecture dtb offset placement constraints).
>>
>> <...>
>>
>> So, I am trying to understand the use-case behind FIT image support in
>> kexec. Do we need kexec-tools to be aware of the FIT format when the
>> kernel itself it loaded in an uncompressed format (e.g. Image or
>> vmlinux).
>
> Ok, I'll do my best to explain our use case : U-boot indeed does a great
> job at parsing and loading the FIT image components at the appropriate
> addresses.
>
> However, we use kexec (with option -p) to load a crash kernel to be 
> executed
> in case of a panic. Moreover, we need to load this kernel along with 
> its own
> dtb AND initrd (the initrd is very important, as it contains a special 
> boot
> script which uses makedumpfile to create a dump of the crashed kernel for
> further analysis).
>
> The FIT image we load through kexec is not necessarily the same as the 
> one
> we load through u-boot, the initrd being different, but the kernel and 
> dtb
> could be specific too.
>
> All in all, this could be done by using a uImage for the kernel+dtb and a
> separate initrd file, but this is not an option in our case, due to the
> number of devices and architectures our build system supports, which 
> is why
> we need this FIT image support.
>
>> If you can share your .its file and explain the use case better (may
>> be with the u-boot logs) it would help in the review.
>
> Sure, the .its file contents follow.
>
> Best regards,
>
> Arnaud
>
> ---
> /dts-v1/;
>
> / {
>         description = "U-Boot fitImage for SIGFOX 
> TapOS/4.14.29+gitAUTOINC+8096079403/a3700";
>         #address-cells = <1>;
>
>         images {
>                 kernel@1 {
>                         description = "Linux kernel";
>                         data = /incbin/("linux.bin");
>                         type = "kernel";
>                         arch = "arm64";
>                         os = "linux";
>                         compression = "gzip";
>                         load = <0x00080000>;
>                         entry = <0x00080000>;
>                         hash@1 {
>                                 algo = "sha256";
>                         };
>                 };
>                 fdt@sigfox_sigfox-bs-a3700.dtb {
>                         description = "Flattened Device Tree blob";
>                         data = 
> /incbin/("arch/arm64/boot/dts/sigfox/sigfox-bs-a3700.dtb");
>                         type = "flat_dt";
>                         arch = "arm64";
>                         compression = "none";
>                         load = <0x01800000>;
>                         hash@1 {
>                                 algo = "sha256";
>                         };
>                 };
>                 ramdisk@1 {
>                         description = "tapos-image-initramfs";
>                         data = /incbin/(<path/to/initrd>);
>                         type = "ramdisk";
>                         arch = "arm64";
>                         os = "linux";
>                         compression = "gzip";
>                         load = <0x02000000>;
>                         entry = <0x02000000>;
>                         hash@1 {
>                                 algo = "sha256";
>                         };
>                 };
>     };
>
>         configurations {
>                 default = "conf@sigfox_sigfox-bs-a3700.dtb";
>                 conf@sigfox_sigfox-bs-a3700.dtb {
>             description = "1 Linux kernel, FDT blob, ramdisk";
>             kernel = "kernel@1";
>             fdt = "fdt@sigfox_sigfox-bs-a3700.dtb";
>             ramdisk = "ramdisk@1";
>
>                         hash@1 {
>                                 algo = "sha256";
>                         };
>                         signature@1 {
>                                 algo = "sha256,rsa2048";
>                                 key-name-hint = "kernel";
>                 sign-images = "kernel", "fdt", "ramdisk";
>                         };
>                 };
>     };
> };
>
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2018-07-27  8:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-05 12:55 [PATCH 0/3] arm64: add support for loading kernel from FITimage Arnaud Ferraris
2018-07-05 12:55 ` [PATCH 1/3] kexec: Move zlib buffer decompression function Arnaud Ferraris
2018-07-05 12:55 ` [PATCH 2/3] kexec: fitImage: Add fitImage parser and loader Arnaud Ferraris
2018-07-05 12:55 ` [PATCH 3/3] kexec: arm64: Add fitImage support Arnaud Ferraris
2018-07-06  6:37 ` [PATCH 0/3] arm64: add support for loading kernel from FITimage Bhupesh Sharma
2018-07-06 14:39   ` Arnaud Ferraris
2018-07-27  8:17     ` Arnaud Ferraris [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=affc6be0-08ea-4f7d-8cb1-736b51a971d9@gmail.com \
    --to=arnaud.ferraris@gmail.com \
    --cc=bhsharma@redhat.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=thomas.perrot@sigfox.com \
    /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;
as well as URLs for NNTP newsgroup(s).