Re: Trying to kexec on Allwinner A80

2020-04-08 Thread Russell King - ARM Linux admin
On Wed, Apr 08, 2020 at 05:24:12PM +0200, Corentin Labbe wrote:
> On Wed, Apr 08, 2020 at 10:33:20AM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Wed, Apr 08, 2020 at 10:40:29AM +0200, Corentin Labbe wrote:
> > > This is the last boot:
> > > ## Loading init Ramdisk from Legacy Image at 2a00 ...
> > >Image Name:   
> > >Image Type:   ARM Linux RAMDisk Image (uncompressed)
> > >Data Size:8031928 Bytes = 7.7 MiB
> > >Load Address: 
> > >Entry Point:  
> > >Verifying Checksum ... OK
> > > ## Flattened Device Tree blob at 2300
> > >Booting using the fdt blob at 0x2300
> > >Loading Ramdisk to 29857000, end 29fffeb8 ... OK
> > >Loading Device Tree to 2984e000, end 29856fd1 ... OK
> > > Starting kernel ...
> > > ID:0x DT:0x2984E000
> > > Uncompressing Linux... done, booting the kernel.
> > > [...]
> > > fake uboot stuff
> > > [...]
> > > DEBUG: bootz: run kexec with --debug --kexec-syscall --force --initrd 
> > > /tmp/ramdisk --dtb /tmp/dtb --command-line='console=ttyS0,115200n8 
> > > root=/dev/ram0 earlycon=uart,mmio32,0x700 earlyprintk ip=dhcp'
> > > Set DEBUG!
> > > main:1417 OPT_KEXEC_SYSCALL
> > > main:1422 OPT_KEXEC_SYSCALL_AUTO
> > > arch_process_options:119
> > > main:1500
> > > main:1517 res=0 do_load=1
> > > main:1519 res=0 do_kexec_file_syscall=0
> > > my_load:713
> > > Try gzip decompression.
> > > kernel: 0xb6931008 kernel_size: 0x444fc8
> > > get_memory_ranges:36
> > > MEMORY RANGES
> > > 2000-9fff (0)
> > > zImage_arm_load:423
> > > zImage header: 0x016f2818 0x 0x00444fc8
> > > zImage size 0x444fc8, file size 0x444fc8
> > > zImage requires 0x00455fc8 bytes
> > >   offset 0x6738 tag 0x5a534c4b size 8
> > > Decompressed kernel sizes:
> > >  text+data 0x00b77958 bss 0x0003d428 total 0x00bb4d80
> > > Resulting kernel space: 0x00fcd920
> > > Kernel: address=0x20008000 size=0x00fcd920
> > > Initrd: address=0x20fd6000 size=0x016a6b97
> > > DT: address=0x2267d000 size=0x6043
> > > kexec_load: entry = 0x20008000 flags = 0x28
> > > nr_segments = 3
> > > segment[0].buf   = 0xb6931008
> > > segment[0].bufsz = 0x444fcc
> > > segment[0].mem   = 0x20008000
> > > segment[0].memsz = 0x445000
> > > segment[1].buf   = 0xb528a008
> > > segment[1].bufsz = 0x16a6b97
> > > segment[1].mem   = 0x20fd6000
> > > segment[1].memsz = 0x16a7000
> > > segment[2].buf   = 0x4ef88
> > > segment[2].bufsz = 0x6043
> > > segment[2].mem   = 0x2267d000
> > > segment[2].memsz = 0x7000
> > > main:1568 res=0[   32.098439] sun7i-dwmac 83.ethernet eth0: Link is 
> > > Down
> > > main:1582 res=0 do_exec=1
> > > [   32.113191] kexec_core: Starting new kernel
> > > [   32.460412] Bye!
> > > ID:0x DT:0x2267D000
> > > C:0x200080C0-0x2044CFE0->0x20B80500-0x20FC5420
> > > ID:0x DT:0x2267D000
> > > Uncompressing Linux... done, booting the kernel.
> > 
> > Okay, that looks fine:
> > - the DT is out of the way, so shouldn't be corrupted by the
> >   decompression process.
> > - the decompressor writes the kernel image to 0x20008000 to 0x20b7f958
> >   which is clear of the decompressor itself (which relocated itself
> >   to 0x20b80500).
> > - the ID doesn't matter for DT booting purposes.
> > 
> > I see you've gone back to using your own dtb rather than one derived
> > from the booting kernel. I strongly recommend against giving your own
> > dtb to kexec as if the boot loader modifies the DTB when calling the
> > first kernel (such as adding memory region information, adding MAC
> > addresses, enabling or disabling various devices) those modifications
> > will be lost if you supply your own DTB to kexec.
> > 
> > Please drop "--dtb /tmp/dtb".
> > 
> 
> Thanks it works now.
> 
> With a working setup I diffed dtb and the one given by uboot and it seems the 
> missing node for booting was /memory.

That is more or less expected - it seems kexec never adds the /memory
nodes to the dtb.  I've no idea whether it should or should not be doing
so, and is for others to thrash out the arguments for and against what
should be modified and how.

The upshot of the existing kexec behaviour is you can't take a dtb from
the kernel build and use it with kexec.

> For booting a different kernel, I fdtput the dtb (for memory and bootargs), 
> and it works until it try to mount the roofs which it find corrupt.

rootfs or initrd supplied to kexec?

> Since the rootfs I get by the fakeuboot is a "uboot legacy image" 
> (rootfs.cpio.gz modified by mkimage), I drop the first 64bytes but it seems 
> not sufficiant. (even if file say it is a good rootfs.cpio.gz)
> Or perhaps the kernel get an invalid initrd address.

Yep, the file given via --initrd or --ramdisk is loaded exactly as-is
into memory, no parsing of the file is done.  Neither the kernel, nor
kexec, does any u-boot parsing of the initrd/ramdisk file; they are
not u-boot.

If you want to try giving the kernel a bit more space, you can try
--image-size=$((0x0100

Re: Trying to kexec on Allwinner A80

2020-04-08 Thread Corentin Labbe
On Wed, Apr 08, 2020 at 10:33:20AM +0100, Russell King - ARM Linux admin wrote:
> On Wed, Apr 08, 2020 at 10:40:29AM +0200, Corentin Labbe wrote:
> > This is the last boot:
> > ## Loading init Ramdisk from Legacy Image at 2a00 ...
> >Image Name:   
> >Image Type:   ARM Linux RAMDisk Image (uncompressed)
> >Data Size:8031928 Bytes = 7.7 MiB
> >Load Address: 
> >Entry Point:  
> >Verifying Checksum ... OK
> > ## Flattened Device Tree blob at 2300
> >Booting using the fdt blob at 0x2300
> >Loading Ramdisk to 29857000, end 29fffeb8 ... OK
> >Loading Device Tree to 2984e000, end 29856fd1 ... OK
> > Starting kernel ...
> > ID:0x DT:0x2984E000
> > Uncompressing Linux... done, booting the kernel.
> > [...]
> > fake uboot stuff
> > [...]
> > DEBUG: bootz: run kexec with --debug --kexec-syscall --force --initrd 
> > /tmp/ramdisk --dtb /tmp/dtb --command-line='console=ttyS0,115200n8 
> > root=/dev/ram0 earlycon=uart,mmio32,0x700 earlyprintk ip=dhcp'
> > Set DEBUG!
> > main:1417 OPT_KEXEC_SYSCALL
> > main:1422 OPT_KEXEC_SYSCALL_AUTO
> > arch_process_options:119
> > main:1500
> > main:1517 res=0 do_load=1
> > main:1519 res=0 do_kexec_file_syscall=0
> > my_load:713
> > Try gzip decompression.
> > kernel: 0xb6931008 kernel_size: 0x444fc8
> > get_memory_ranges:36
> > MEMORY RANGES
> > 2000-9fff (0)
> > zImage_arm_load:423
> > zImage header: 0x016f2818 0x 0x00444fc8
> > zImage size 0x444fc8, file size 0x444fc8
> > zImage requires 0x00455fc8 bytes
> >   offset 0x6738 tag 0x5a534c4b size 8
> > Decompressed kernel sizes:
> >  text+data 0x00b77958 bss 0x0003d428 total 0x00bb4d80
> > Resulting kernel space: 0x00fcd920
> > Kernel: address=0x20008000 size=0x00fcd920
> > Initrd: address=0x20fd6000 size=0x016a6b97
> > DT: address=0x2267d000 size=0x6043
> > kexec_load: entry = 0x20008000 flags = 0x28
> > nr_segments = 3
> > segment[0].buf   = 0xb6931008
> > segment[0].bufsz = 0x444fcc
> > segment[0].mem   = 0x20008000
> > segment[0].memsz = 0x445000
> > segment[1].buf   = 0xb528a008
> > segment[1].bufsz = 0x16a6b97
> > segment[1].mem   = 0x20fd6000
> > segment[1].memsz = 0x16a7000
> > segment[2].buf   = 0x4ef88
> > segment[2].bufsz = 0x6043
> > segment[2].mem   = 0x2267d000
> > segment[2].memsz = 0x7000
> > main:1568 res=0[   32.098439] sun7i-dwmac 83.ethernet eth0: Link is Down
> > main:1582 res=0 do_exec=1
> > [   32.113191] kexec_core: Starting new kernel
> > [   32.460412] Bye!
> > ID:0x DT:0x2267D000
> > C:0x200080C0-0x2044CFE0->0x20B80500-0x20FC5420
> > ID:0x DT:0x2267D000
> > Uncompressing Linux... done, booting the kernel.
> 
> Okay, that looks fine:
> - the DT is out of the way, so shouldn't be corrupted by the
>   decompression process.
> - the decompressor writes the kernel image to 0x20008000 to 0x20b7f958
>   which is clear of the decompressor itself (which relocated itself
>   to 0x20b80500).
> - the ID doesn't matter for DT booting purposes.
> 
> I see you've gone back to using your own dtb rather than one derived
> from the booting kernel. I strongly recommend against giving your own
> dtb to kexec as if the boot loader modifies the DTB when calling the
> first kernel (such as adding memory region information, adding MAC
> addresses, enabling or disabling various devices) those modifications
> will be lost if you supply your own DTB to kexec.
> 
> Please drop "--dtb /tmp/dtb".
> 

Thanks it works now.

With a working setup I diffed dtb and the one given by uboot and it seems the 
missing node for booting was /memory.
So now I am able to boot the same kernel as the "fake uboot".

For booting a different kernel, I fdtput the dtb (for memory and bootargs), and 
it works until it try to mount the roofs which it find corrupt.
Since the rootfs I get by the fakeuboot is a "uboot legacy image" 
(rootfs.cpio.gz modified by mkimage), I drop the first 64bytes but it seems not 
sufficiant. (even if file say it is a good rootfs.cpio.gz)
Or perhaps the kernel get an invalid initrd address.

Anyway the main issue is fixed.
Thanks for your help

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


Re: Trying to kexec on Allwinner A80

2020-04-08 Thread Russell King - ARM Linux admin
On Wed, Apr 08, 2020 at 10:40:29AM +0200, Corentin Labbe wrote:
> This is the last boot:
> ## Loading init Ramdisk from Legacy Image at 2a00 ...
>Image Name:   
>Image Type:   ARM Linux RAMDisk Image (uncompressed)
>Data Size:8031928 Bytes = 7.7 MiB
>Load Address: 
>Entry Point:  
>Verifying Checksum ... OK
> ## Flattened Device Tree blob at 2300
>Booting using the fdt blob at 0x2300
>Loading Ramdisk to 29857000, end 29fffeb8 ... OK
>Loading Device Tree to 2984e000, end 29856fd1 ... OK
> Starting kernel ...
> ID:0x DT:0x2984E000
> Uncompressing Linux... done, booting the kernel.
> [...]
> fake uboot stuff
> [...]
> DEBUG: bootz: run kexec with --debug --kexec-syscall --force --initrd 
> /tmp/ramdisk --dtb /tmp/dtb --command-line='console=ttyS0,115200n8 
> root=/dev/ram0 earlycon=uart,mmio32,0x700 earlyprintk ip=dhcp'
> Set DEBUG!
> main:1417 OPT_KEXEC_SYSCALL
> main:1422 OPT_KEXEC_SYSCALL_AUTO
> arch_process_options:119
> main:1500
> main:1517 res=0 do_load=1
> main:1519 res=0 do_kexec_file_syscall=0
> my_load:713
> Try gzip decompression.
> kernel: 0xb6931008 kernel_size: 0x444fc8
> get_memory_ranges:36
> MEMORY RANGES
> 2000-9fff (0)
> zImage_arm_load:423
> zImage header: 0x016f2818 0x 0x00444fc8
> zImage size 0x444fc8, file size 0x444fc8
> zImage requires 0x00455fc8 bytes
>   offset 0x6738 tag 0x5a534c4b size 8
> Decompressed kernel sizes:
>  text+data 0x00b77958 bss 0x0003d428 total 0x00bb4d80
> Resulting kernel space: 0x00fcd920
> Kernel: address=0x20008000 size=0x00fcd920
> Initrd: address=0x20fd6000 size=0x016a6b97
> DT: address=0x2267d000 size=0x6043
> kexec_load: entry = 0x20008000 flags = 0x28
> nr_segments = 3
> segment[0].buf   = 0xb6931008
> segment[0].bufsz = 0x444fcc
> segment[0].mem   = 0x20008000
> segment[0].memsz = 0x445000
> segment[1].buf   = 0xb528a008
> segment[1].bufsz = 0x16a6b97
> segment[1].mem   = 0x20fd6000
> segment[1].memsz = 0x16a7000
> segment[2].buf   = 0x4ef88
> segment[2].bufsz = 0x6043
> segment[2].mem   = 0x2267d000
> segment[2].memsz = 0x7000
> main:1568 res=0[   32.098439] sun7i-dwmac 83.ethernet eth0: Link is Down
> main:1582 res=0 do_exec=1
> [   32.113191] kexec_core: Starting new kernel
> [   32.460412] Bye!
> ID:0x DT:0x2267D000
> C:0x200080C0-0x2044CFE0->0x20B80500-0x20FC5420
> ID:0x DT:0x2267D000
> Uncompressing Linux... done, booting the kernel.

Okay, that looks fine:
- the DT is out of the way, so shouldn't be corrupted by the
  decompression process.
- the decompressor writes the kernel image to 0x20008000 to 0x20b7f958
  which is clear of the decompressor itself (which relocated itself
  to 0x20b80500).
- the ID doesn't matter for DT booting purposes.

I see you've gone back to using your own dtb rather than one derived
from the booting kernel. I strongly recommend against giving your own
dtb to kexec as if the boot loader modifies the DTB when calling the
first kernel (such as adding memory region information, adding MAC
addresses, enabling or disabling various devices) those modifications
will be lost if you supply your own DTB to kexec.

Please drop "--dtb /tmp/dtb".

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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


Re: Trying to kexec on Allwinner A80

2020-04-08 Thread Corentin Labbe
On Tue, Apr 07, 2020 at 07:17:40PM +0100, Russell King - ARM Linux admin wrote:
> On Tue, Apr 07, 2020 at 03:48:49PM +0200, Corentin Labbe wrote:
> > On Tue, Apr 07, 2020 at 02:26:02PM +0100, Russell King - ARM Linux admin 
> > wrote:
> > > On Tue, Apr 07, 2020 at 03:05:59PM +0200, Corentin Labbe wrote:
> > > > On Tue, Apr 07, 2020 at 01:22:43PM +0100, Russell King - ARM Linux 
> > > > admin wrote:
> > > > > On Tue, Apr 07, 2020 at 01:34:54PM +0200, Corentin Labbe wrote:
> > > > > > On Tue, Apr 07, 2020 at 11:19:12AM +0100, Russell King - ARM Linux 
> > > > > > admin wrote:
> > > > > > > On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM 
> > > > > > > Linux admin wrote:
> > > > > > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > > > > > Hello
> > > > > > > > > 
> > > > > > > > > I am trying to add the last missing Allwinner Soc in 
> > > > > > > > > kernelci: the A80.
> > > > > > > > > But this SoC does not have any way to be used in kernelci, no 
> > > > > > > > > USB nor network in uboot.
> > > > > > > > > So I have tried to fake uboot since the kernel has network 
> > > > > > > > > support and run the new kernel via kexec.
> > > > > > > > > 
> > > > > > > > > But kexec 2.0.18 fail to work:
> > > > > > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb 
> > > > > > > > > /tmp/dtb --command-line='console=ttyS0,115200n8 
> > > > > > > > > root=/dev/ram0 earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > > > > > 
> > > > > > > > As I mentioned in my other reply, this apparent "kexec" command 
> > > > > > > > line
> > > > > > > > does not seem to reflect the arguments you actually used to 
> > > > > > > > invoke
> > > > > > > > the kexec output below.
> > > > > > > > 
> > > > > > > > > syscall kexec_file_load not available.
> > > > > > > > 
> > > > > > > > This message is produced by do_kexec_file_load().  This 
> > > > > > > > function is only
> > > > > > > > invoked if the do_kexec_file_syscall flag in main() is set.  
> > > > > > > > This flag
> > > > > > > > is only set if one of:
> > > > > > > > 
> > > > > > > > --kexec-file-syscall
> > > > > > > > --kexec-syscall
> > > > > > > > --kexec-syscall-auto
> > > > > > > > -s
> > > > > > > > -c
> > > > > > > > -a
> > > > > > > > 
> > > > > > > > are provided on the kexec command line.  Your command line 
> > > > > > > > above does
> > > > > > > > not contain any of those arguments, so either the command line 
> > > > > > > > is not
> > > > > > > > what you used, or you are using a patched kexec, or your 
> > > > > > > > compiler is
> > > > > > > > grossly miscompiling kexec.
> > > > > > > > 
> > > > > > > > > Try gzip decompression.
> > > > > > > > > kernel: 0xb6535008 kernel_size: 0x853200
> > > > > > > > > MEMORY RANGES
> > > > > > > > > 2000-9fff (0)
> > > > > > > > 
> > > > > > > > Then there's the debug output, which is only produced if the
> > > > > > > > kexec_debug global is set, which in turn is only set if --debug 
> > > > > > > > or -d
> > > > > > > > is supplied on the kexec command line - which again, your kexec
> > > > > > > > command line does not contain this.
> > > > > > > > 
> > > > > > > > > zImage header: 0x016f2818 0x 0x00853200
> > > > > > > > > zImage size 0x853200, file size 0x853200
> > > > > > > > > zImage requires 0x00864200 bytes
> > > > > > > > >   offset 0xbae4 tag 0x5a534c4b size 8
> > > > > > > > > Decompressed kernel sizes:
> > > > > > > > >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > > > > > > > > Resulting kernel space: 0x01def5a0
> > > > > > > > > Kernel: address=0x20008000 size=0x01def5a0
> > > > > > > > > Initrd: address=0x21df8000 size=0x0090b6fa
> > > > > > > > > DT: address=0x22704000 size=0x5c09
> > > > > > > > > kexec_load: entry = 0x20008000 flags = 0x28
> > > > > > > > > nr_segments = 3
> > > > > > > > > segment[0].buf   = 0xb6535008
> > > > > > > > > segment[0].bufsz = 0x853204
> > > > > > > > > segment[0].mem   = 0x20008000
> > > > > > > > > segment[0].memsz = 0x854000
> > > > > > > > > segment[1].buf   = 0xb5c29008
> > > > > > > > > segment[1].bufsz = 0x90b6fa
> > > > > > > > > segment[1].mem   = 0x21df8000
> > > > > > > > > segment[1].memsz = 0x90c000
> > > > > > > > > segment[2].buf   = 0x4db50
> > > > > > > > > segment[2].bufsz = 0x5c09
> > > > > > > > > segm[   71.039126] kexec_core: Starting new kernel
> > > > > > > > > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > > > > > > > > x22704000
> > > > > > > > > segment[2].memsz = 0x6000
> > > > > > > > > [   71.489070] Bye!
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > I have tried also kexec-2.0.20
> > > > > > > > > Try gzip decompression.
> > > > > > > > > zImage header: 0x 0x19b4 0x1000
> > > > > > > > > zImage requires 0x008641c0 bytes
> > > > > > > > > Could not find a free area of memory of 0x86c1c0 bytes...
> > > > > > > > > Cannot load /tmp/kernel
> > > > > >

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Tue, Apr 07, 2020 at 03:48:49PM +0200, Corentin Labbe wrote:
> On Tue, Apr 07, 2020 at 02:26:02PM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Tue, Apr 07, 2020 at 03:05:59PM +0200, Corentin Labbe wrote:
> > > On Tue, Apr 07, 2020 at 01:22:43PM +0100, Russell King - ARM Linux admin 
> > > wrote:
> > > > On Tue, Apr 07, 2020 at 01:34:54PM +0200, Corentin Labbe wrote:
> > > > > On Tue, Apr 07, 2020 at 11:19:12AM +0100, Russell King - ARM Linux 
> > > > > admin wrote:
> > > > > > On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM Linux 
> > > > > > admin wrote:
> > > > > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > > > > Hello
> > > > > > > > 
> > > > > > > > I am trying to add the last missing Allwinner Soc in kernelci: 
> > > > > > > > the A80.
> > > > > > > > But this SoC does not have any way to be used in kernelci, no 
> > > > > > > > USB nor network in uboot.
> > > > > > > > So I have tried to fake uboot since the kernel has network 
> > > > > > > > support and run the new kernel via kexec.
> > > > > > > > 
> > > > > > > > But kexec 2.0.18 fail to work:
> > > > > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > > > > 
> > > > > > > As I mentioned in my other reply, this apparent "kexec" command 
> > > > > > > line
> > > > > > > does not seem to reflect the arguments you actually used to invoke
> > > > > > > the kexec output below.
> > > > > > > 
> > > > > > > > syscall kexec_file_load not available.
> > > > > > > 
> > > > > > > This message is produced by do_kexec_file_load().  This function 
> > > > > > > is only
> > > > > > > invoked if the do_kexec_file_syscall flag in main() is set.  This 
> > > > > > > flag
> > > > > > > is only set if one of:
> > > > > > > 
> > > > > > >   --kexec-file-syscall
> > > > > > >   --kexec-syscall
> > > > > > >   --kexec-syscall-auto
> > > > > > >   -s
> > > > > > >   -c
> > > > > > >   -a
> > > > > > > 
> > > > > > > are provided on the kexec command line.  Your command line above 
> > > > > > > does
> > > > > > > not contain any of those arguments, so either the command line is 
> > > > > > > not
> > > > > > > what you used, or you are using a patched kexec, or your compiler 
> > > > > > > is
> > > > > > > grossly miscompiling kexec.
> > > > > > > 
> > > > > > > > Try gzip decompression.
> > > > > > > > kernel: 0xb6535008 kernel_size: 0x853200
> > > > > > > > MEMORY RANGES
> > > > > > > > 2000-9fff (0)
> > > > > > > 
> > > > > > > Then there's the debug output, which is only produced if the
> > > > > > > kexec_debug global is set, which in turn is only set if --debug 
> > > > > > > or -d
> > > > > > > is supplied on the kexec command line - which again, your kexec
> > > > > > > command line does not contain this.
> > > > > > > 
> > > > > > > > zImage header: 0x016f2818 0x 0x00853200
> > > > > > > > zImage size 0x853200, file size 0x853200
> > > > > > > > zImage requires 0x00864200 bytes
> > > > > > > >   offset 0xbae4 tag 0x5a534c4b size 8
> > > > > > > > Decompressed kernel sizes:
> > > > > > > >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > > > > > > > Resulting kernel space: 0x01def5a0
> > > > > > > > Kernel: address=0x20008000 size=0x01def5a0
> > > > > > > > Initrd: address=0x21df8000 size=0x0090b6fa
> > > > > > > > DT: address=0x22704000 size=0x5c09
> > > > > > > > kexec_load: entry = 0x20008000 flags = 0x28
> > > > > > > > nr_segments = 3
> > > > > > > > segment[0].buf   = 0xb6535008
> > > > > > > > segment[0].bufsz = 0x853204
> > > > > > > > segment[0].mem   = 0x20008000
> > > > > > > > segment[0].memsz = 0x854000
> > > > > > > > segment[1].buf   = 0xb5c29008
> > > > > > > > segment[1].bufsz = 0x90b6fa
> > > > > > > > segment[1].mem   = 0x21df8000
> > > > > > > > segment[1].memsz = 0x90c000
> > > > > > > > segment[2].buf   = 0x4db50
> > > > > > > > segment[2].bufsz = 0x5c09
> > > > > > > > segm[   71.039126] kexec_core: Starting new kernel
> > > > > > > > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > > > > > > > x22704000
> > > > > > > > segment[2].memsz = 0x6000
> > > > > > > > [   71.489070] Bye!
> > > > > > > > 
> > > > > > > > 
> > > > > > > > I have tried also kexec-2.0.20
> > > > > > > > Try gzip decompression.
> > > > > > > > zImage header: 0x 0x19b4 0x1000
> > > > > > > > zImage requires 0x008641c0 bytes
> > > > > > > > Could not find a free area of memory of 0x86c1c0 bytes...
> > > > > > > > Cannot load /tmp/kernel
> > > > > > > 
> > > > > > > kexec 2.0.20 doesn't appear to have changed anything to do with 
> > > > > > > how
> > > > > > > allocations are done.  The above output looks even more strange 
> > > > > > > and
> > > > > > > confusing.  "zImage header" is produced by debugging prints, which
> > > > > > > imply that kexec_debug was set.
> > > > 

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Corentin Labbe
On Tue, Apr 07, 2020 at 02:26:02PM +0100, Russell King - ARM Linux admin wrote:
> On Tue, Apr 07, 2020 at 03:05:59PM +0200, Corentin Labbe wrote:
> > On Tue, Apr 07, 2020 at 01:22:43PM +0100, Russell King - ARM Linux admin 
> > wrote:
> > > On Tue, Apr 07, 2020 at 01:34:54PM +0200, Corentin Labbe wrote:
> > > > On Tue, Apr 07, 2020 at 11:19:12AM +0100, Russell King - ARM Linux 
> > > > admin wrote:
> > > > > On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM Linux 
> > > > > admin wrote:
> > > > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > > > Hello
> > > > > > > 
> > > > > > > I am trying to add the last missing Allwinner Soc in kernelci: 
> > > > > > > the A80.
> > > > > > > But this SoC does not have any way to be used in kernelci, no USB 
> > > > > > > nor network in uboot.
> > > > > > > So I have tried to fake uboot since the kernel has network 
> > > > > > > support and run the new kernel via kexec.
> > > > > > > 
> > > > > > > But kexec 2.0.18 fail to work:
> > > > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > > > 
> > > > > > As I mentioned in my other reply, this apparent "kexec" command line
> > > > > > does not seem to reflect the arguments you actually used to invoke
> > > > > > the kexec output below.
> > > > > > 
> > > > > > > syscall kexec_file_load not available.
> > > > > > 
> > > > > > This message is produced by do_kexec_file_load().  This function is 
> > > > > > only
> > > > > > invoked if the do_kexec_file_syscall flag in main() is set.  This 
> > > > > > flag
> > > > > > is only set if one of:
> > > > > > 
> > > > > > --kexec-file-syscall
> > > > > > --kexec-syscall
> > > > > > --kexec-syscall-auto
> > > > > > -s
> > > > > > -c
> > > > > > -a
> > > > > > 
> > > > > > are provided on the kexec command line.  Your command line above 
> > > > > > does
> > > > > > not contain any of those arguments, so either the command line is 
> > > > > > not
> > > > > > what you used, or you are using a patched kexec, or your compiler is
> > > > > > grossly miscompiling kexec.
> > > > > > 
> > > > > > > Try gzip decompression.
> > > > > > > kernel: 0xb6535008 kernel_size: 0x853200
> > > > > > > MEMORY RANGES
> > > > > > > 2000-9fff (0)
> > > > > > 
> > > > > > Then there's the debug output, which is only produced if the
> > > > > > kexec_debug global is set, which in turn is only set if --debug or 
> > > > > > -d
> > > > > > is supplied on the kexec command line - which again, your kexec
> > > > > > command line does not contain this.
> > > > > > 
> > > > > > > zImage header: 0x016f2818 0x 0x00853200
> > > > > > > zImage size 0x853200, file size 0x853200
> > > > > > > zImage requires 0x00864200 bytes
> > > > > > >   offset 0xbae4 tag 0x5a534c4b size 8
> > > > > > > Decompressed kernel sizes:
> > > > > > >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > > > > > > Resulting kernel space: 0x01def5a0
> > > > > > > Kernel: address=0x20008000 size=0x01def5a0
> > > > > > > Initrd: address=0x21df8000 size=0x0090b6fa
> > > > > > > DT: address=0x22704000 size=0x5c09
> > > > > > > kexec_load: entry = 0x20008000 flags = 0x28
> > > > > > > nr_segments = 3
> > > > > > > segment[0].buf   = 0xb6535008
> > > > > > > segment[0].bufsz = 0x853204
> > > > > > > segment[0].mem   = 0x20008000
> > > > > > > segment[0].memsz = 0x854000
> > > > > > > segment[1].buf   = 0xb5c29008
> > > > > > > segment[1].bufsz = 0x90b6fa
> > > > > > > segment[1].mem   = 0x21df8000
> > > > > > > segment[1].memsz = 0x90c000
> > > > > > > segment[2].buf   = 0x4db50
> > > > > > > segment[2].bufsz = 0x5c09
> > > > > > > segm[   71.039126] kexec_core: Starting new kernel
> > > > > > > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > > > > > > x22704000
> > > > > > > segment[2].memsz = 0x6000
> > > > > > > [   71.489070] Bye!
> > > > > > > 
> > > > > > > 
> > > > > > > I have tried also kexec-2.0.20
> > > > > > > Try gzip decompression.
> > > > > > > zImage header: 0x 0x19b4 0x1000
> > > > > > > zImage requires 0x008641c0 bytes
> > > > > > > Could not find a free area of memory of 0x86c1c0 bytes...
> > > > > > > Cannot load /tmp/kernel
> > > > > > 
> > > > > > kexec 2.0.20 doesn't appear to have changed anything to do with how
> > > > > > allocations are done.  The above output looks even more strange and
> > > > > > confusing.  "zImage header" is produced by debugging prints, which
> > > > > > imply that kexec_debug was set.
> > > > > > 
> > > > > > However, the "MEMORY RANGES" output is missing - this has not gone
> > > > > > away with kexec 2.0.20, it's still there, and works for me (I've
> > > > > > just built and tested kexec 2.0.20).
> > > > > > 
> > > > > > Also, the values on the "zImage header" line are completely messed
> > > > > > up;

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Tue, Apr 07, 2020 at 03:05:59PM +0200, Corentin Labbe wrote:
> On Tue, Apr 07, 2020 at 01:22:43PM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Tue, Apr 07, 2020 at 01:34:54PM +0200, Corentin Labbe wrote:
> > > On Tue, Apr 07, 2020 at 11:19:12AM +0100, Russell King - ARM Linux admin 
> > > wrote:
> > > > On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM Linux 
> > > > admin wrote:
> > > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > > Hello
> > > > > > 
> > > > > > I am trying to add the last missing Allwinner Soc in kernelci: the 
> > > > > > A80.
> > > > > > But this SoC does not have any way to be used in kernelci, no USB 
> > > > > > nor network in uboot.
> > > > > > So I have tried to fake uboot since the kernel has network support 
> > > > > > and run the new kernel via kexec.
> > > > > > 
> > > > > > But kexec 2.0.18 fail to work:
> > > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > > 
> > > > > As I mentioned in my other reply, this apparent "kexec" command line
> > > > > does not seem to reflect the arguments you actually used to invoke
> > > > > the kexec output below.
> > > > > 
> > > > > > syscall kexec_file_load not available.
> > > > > 
> > > > > This message is produced by do_kexec_file_load().  This function is 
> > > > > only
> > > > > invoked if the do_kexec_file_syscall flag in main() is set.  This flag
> > > > > is only set if one of:
> > > > > 
> > > > >   --kexec-file-syscall
> > > > >   --kexec-syscall
> > > > >   --kexec-syscall-auto
> > > > >   -s
> > > > >   -c
> > > > >   -a
> > > > > 
> > > > > are provided on the kexec command line.  Your command line above does
> > > > > not contain any of those arguments, so either the command line is not
> > > > > what you used, or you are using a patched kexec, or your compiler is
> > > > > grossly miscompiling kexec.
> > > > > 
> > > > > > Try gzip decompression.
> > > > > > kernel: 0xb6535008 kernel_size: 0x853200
> > > > > > MEMORY RANGES
> > > > > > 2000-9fff (0)
> > > > > 
> > > > > Then there's the debug output, which is only produced if the
> > > > > kexec_debug global is set, which in turn is only set if --debug or -d
> > > > > is supplied on the kexec command line - which again, your kexec
> > > > > command line does not contain this.
> > > > > 
> > > > > > zImage header: 0x016f2818 0x 0x00853200
> > > > > > zImage size 0x853200, file size 0x853200
> > > > > > zImage requires 0x00864200 bytes
> > > > > >   offset 0xbae4 tag 0x5a534c4b size 8
> > > > > > Decompressed kernel sizes:
> > > > > >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > > > > > Resulting kernel space: 0x01def5a0
> > > > > > Kernel: address=0x20008000 size=0x01def5a0
> > > > > > Initrd: address=0x21df8000 size=0x0090b6fa
> > > > > > DT: address=0x22704000 size=0x5c09
> > > > > > kexec_load: entry = 0x20008000 flags = 0x28
> > > > > > nr_segments = 3
> > > > > > segment[0].buf   = 0xb6535008
> > > > > > segment[0].bufsz = 0x853204
> > > > > > segment[0].mem   = 0x20008000
> > > > > > segment[0].memsz = 0x854000
> > > > > > segment[1].buf   = 0xb5c29008
> > > > > > segment[1].bufsz = 0x90b6fa
> > > > > > segment[1].mem   = 0x21df8000
> > > > > > segment[1].memsz = 0x90c000
> > > > > > segment[2].buf   = 0x4db50
> > > > > > segment[2].bufsz = 0x5c09
> > > > > > segm[   71.039126] kexec_core: Starting new kernel
> > > > > > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > > > > > x22704000
> > > > > > segment[2].memsz = 0x6000
> > > > > > [   71.489070] Bye!
> > > > > > 
> > > > > > 
> > > > > > I have tried also kexec-2.0.20
> > > > > > Try gzip decompression.
> > > > > > zImage header: 0x 0x19b4 0x1000
> > > > > > zImage requires 0x008641c0 bytes
> > > > > > Could not find a free area of memory of 0x86c1c0 bytes...
> > > > > > Cannot load /tmp/kernel
> > > > > 
> > > > > kexec 2.0.20 doesn't appear to have changed anything to do with how
> > > > > allocations are done.  The above output looks even more strange and
> > > > > confusing.  "zImage header" is produced by debugging prints, which
> > > > > imply that kexec_debug was set.
> > > > > 
> > > > > However, the "MEMORY RANGES" output is missing - this has not gone
> > > > > away with kexec 2.0.20, it's still there, and works for me (I've
> > > > > just built and tested kexec 2.0.20).
> > > > > 
> > > > > Also, the values on the "zImage header" line are completely messed
> > > > > up; the first should be the zImage magic value and it is not - that
> > > > > suggests that the file being loaded is not a zImage file, or is
> > > > > corrupted.
> > > > 
> > > > Under a VM (the kernel doesn't have kexec support - but that's not a
> > > > problem, because the initial loading stages are the relevant parts
> > >

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Corentin Labbe
On Tue, Apr 07, 2020 at 01:22:43PM +0100, Russell King - ARM Linux admin wrote:
> On Tue, Apr 07, 2020 at 01:34:54PM +0200, Corentin Labbe wrote:
> > On Tue, Apr 07, 2020 at 11:19:12AM +0100, Russell King - ARM Linux admin 
> > wrote:
> > > On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM Linux admin 
> > > wrote:
> > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > Hello
> > > > > 
> > > > > I am trying to add the last missing Allwinner Soc in kernelci: the 
> > > > > A80.
> > > > > But this SoC does not have any way to be used in kernelci, no USB nor 
> > > > > network in uboot.
> > > > > So I have tried to fake uboot since the kernel has network support 
> > > > > and run the new kernel via kexec.
> > > > > 
> > > > > But kexec 2.0.18 fail to work:
> > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > 
> > > > As I mentioned in my other reply, this apparent "kexec" command line
> > > > does not seem to reflect the arguments you actually used to invoke
> > > > the kexec output below.
> > > > 
> > > > > syscall kexec_file_load not available.
> > > > 
> > > > This message is produced by do_kexec_file_load().  This function is only
> > > > invoked if the do_kexec_file_syscall flag in main() is set.  This flag
> > > > is only set if one of:
> > > > 
> > > > --kexec-file-syscall
> > > > --kexec-syscall
> > > > --kexec-syscall-auto
> > > > -s
> > > > -c
> > > > -a
> > > > 
> > > > are provided on the kexec command line.  Your command line above does
> > > > not contain any of those arguments, so either the command line is not
> > > > what you used, or you are using a patched kexec, or your compiler is
> > > > grossly miscompiling kexec.
> > > > 
> > > > > Try gzip decompression.
> > > > > kernel: 0xb6535008 kernel_size: 0x853200
> > > > > MEMORY RANGES
> > > > > 2000-9fff (0)
> > > > 
> > > > Then there's the debug output, which is only produced if the
> > > > kexec_debug global is set, which in turn is only set if --debug or -d
> > > > is supplied on the kexec command line - which again, your kexec
> > > > command line does not contain this.
> > > > 
> > > > > zImage header: 0x016f2818 0x 0x00853200
> > > > > zImage size 0x853200, file size 0x853200
> > > > > zImage requires 0x00864200 bytes
> > > > >   offset 0xbae4 tag 0x5a534c4b size 8
> > > > > Decompressed kernel sizes:
> > > > >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > > > > Resulting kernel space: 0x01def5a0
> > > > > Kernel: address=0x20008000 size=0x01def5a0
> > > > > Initrd: address=0x21df8000 size=0x0090b6fa
> > > > > DT: address=0x22704000 size=0x5c09
> > > > > kexec_load: entry = 0x20008000 flags = 0x28
> > > > > nr_segments = 3
> > > > > segment[0].buf   = 0xb6535008
> > > > > segment[0].bufsz = 0x853204
> > > > > segment[0].mem   = 0x20008000
> > > > > segment[0].memsz = 0x854000
> > > > > segment[1].buf   = 0xb5c29008
> > > > > segment[1].bufsz = 0x90b6fa
> > > > > segment[1].mem   = 0x21df8000
> > > > > segment[1].memsz = 0x90c000
> > > > > segment[2].buf   = 0x4db50
> > > > > segment[2].bufsz = 0x5c09
> > > > > segm[   71.039126] kexec_core: Starting new kernel
> > > > > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > > > > x22704000
> > > > > segment[2].memsz = 0x6000
> > > > > [   71.489070] Bye!
> > > > > 
> > > > > 
> > > > > I have tried also kexec-2.0.20
> > > > > Try gzip decompression.
> > > > > zImage header: 0x 0x19b4 0x1000
> > > > > zImage requires 0x008641c0 bytes
> > > > > Could not find a free area of memory of 0x86c1c0 bytes...
> > > > > Cannot load /tmp/kernel
> > > > 
> > > > kexec 2.0.20 doesn't appear to have changed anything to do with how
> > > > allocations are done.  The above output looks even more strange and
> > > > confusing.  "zImage header" is produced by debugging prints, which
> > > > imply that kexec_debug was set.
> > > > 
> > > > However, the "MEMORY RANGES" output is missing - this has not gone
> > > > away with kexec 2.0.20, it's still there, and works for me (I've
> > > > just built and tested kexec 2.0.20).
> > > > 
> > > > Also, the values on the "zImage header" line are completely messed
> > > > up; the first should be the zImage magic value and it is not - that
> > > > suggests that the file being loaded is not a zImage file, or is
> > > > corrupted.
> > > 
> > > Under a VM (the kernel doesn't have kexec support - but that's not a
> > > problem, because the initial loading stages are the relevant parts
> > > which all happen in userspace):
> > > 
> > > # build/sbin/kexec --version
> > > kexec-tools 2.0.20
> > > # build/sbin/kexec --debug --load virt-vmlinuz-5.4.0+
> > > Try gzip decompression.
> > > kernel: 0xb6a6c008 kernel_size: 0x407358
> > > MEMORY RANGES
> > > 4

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Tue, Apr 07, 2020 at 01:34:54PM +0200, Corentin Labbe wrote:
> On Tue, Apr 07, 2020 at 11:19:12AM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM Linux admin 
> > wrote:
> > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > Hello
> > > > 
> > > > I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> > > > But this SoC does not have any way to be used in kernelci, no USB nor 
> > > > network in uboot.
> > > > So I have tried to fake uboot since the kernel has network support and 
> > > > run the new kernel via kexec.
> > > > 
> > > > But kexec 2.0.18 fail to work:
> > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > 
> > > As I mentioned in my other reply, this apparent "kexec" command line
> > > does not seem to reflect the arguments you actually used to invoke
> > > the kexec output below.
> > > 
> > > > syscall kexec_file_load not available.
> > > 
> > > This message is produced by do_kexec_file_load().  This function is only
> > > invoked if the do_kexec_file_syscall flag in main() is set.  This flag
> > > is only set if one of:
> > > 
> > >   --kexec-file-syscall
> > >   --kexec-syscall
> > >   --kexec-syscall-auto
> > >   -s
> > >   -c
> > >   -a
> > > 
> > > are provided on the kexec command line.  Your command line above does
> > > not contain any of those arguments, so either the command line is not
> > > what you used, or you are using a patched kexec, or your compiler is
> > > grossly miscompiling kexec.
> > > 
> > > > Try gzip decompression.
> > > > kernel: 0xb6535008 kernel_size: 0x853200
> > > > MEMORY RANGES
> > > > 2000-9fff (0)
> > > 
> > > Then there's the debug output, which is only produced if the
> > > kexec_debug global is set, which in turn is only set if --debug or -d
> > > is supplied on the kexec command line - which again, your kexec
> > > command line does not contain this.
> > > 
> > > > zImage header: 0x016f2818 0x 0x00853200
> > > > zImage size 0x853200, file size 0x853200
> > > > zImage requires 0x00864200 bytes
> > > >   offset 0xbae4 tag 0x5a534c4b size 8
> > > > Decompressed kernel sizes:
> > > >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > > > Resulting kernel space: 0x01def5a0
> > > > Kernel: address=0x20008000 size=0x01def5a0
> > > > Initrd: address=0x21df8000 size=0x0090b6fa
> > > > DT: address=0x22704000 size=0x5c09
> > > > kexec_load: entry = 0x20008000 flags = 0x28
> > > > nr_segments = 3
> > > > segment[0].buf   = 0xb6535008
> > > > segment[0].bufsz = 0x853204
> > > > segment[0].mem   = 0x20008000
> > > > segment[0].memsz = 0x854000
> > > > segment[1].buf   = 0xb5c29008
> > > > segment[1].bufsz = 0x90b6fa
> > > > segment[1].mem   = 0x21df8000
> > > > segment[1].memsz = 0x90c000
> > > > segment[2].buf   = 0x4db50
> > > > segment[2].bufsz = 0x5c09
> > > > segm[   71.039126] kexec_core: Starting new kernel
> > > > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > > > x22704000
> > > > segment[2].memsz = 0x6000
> > > > [   71.489070] Bye!
> > > > 
> > > > 
> > > > I have tried also kexec-2.0.20
> > > > Try gzip decompression.
> > > > zImage header: 0x 0x19b4 0x1000
> > > > zImage requires 0x008641c0 bytes
> > > > Could not find a free area of memory of 0x86c1c0 bytes...
> > > > Cannot load /tmp/kernel
> > > 
> > > kexec 2.0.20 doesn't appear to have changed anything to do with how
> > > allocations are done.  The above output looks even more strange and
> > > confusing.  "zImage header" is produced by debugging prints, which
> > > imply that kexec_debug was set.
> > > 
> > > However, the "MEMORY RANGES" output is missing - this has not gone
> > > away with kexec 2.0.20, it's still there, and works for me (I've
> > > just built and tested kexec 2.0.20).
> > > 
> > > Also, the values on the "zImage header" line are completely messed
> > > up; the first should be the zImage magic value and it is not - that
> > > suggests that the file being loaded is not a zImage file, or is
> > > corrupted.
> > 
> > Under a VM (the kernel doesn't have kexec support - but that's not a
> > problem, because the initial loading stages are the relevant parts
> > which all happen in userspace):
> > 
> > # build/sbin/kexec --version
> > kexec-tools 2.0.20
> > # build/sbin/kexec --debug --load virt-vmlinuz-5.4.0+
> > Try gzip decompression.
> > kernel: 0xb6a6c008 kernel_size: 0x407358
> > MEMORY RANGES
> > 4000-7fff (0)
> > zImage header: 0x016f2818 0x 0x00407358
> > zImage size 0x407358, file size 0x407358
> > zImage requires 0x00418358 bytes
> >   offset 0x7178 tag 0x5a534c4b size 12
> > Decompressed kernel sizes:
> >  text+data 0x00c2ed24 bss 0x000319ec total 0x00c60710
> > Resulting kernel space: 0x0104707c
> > Kernel: addre

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Corentin Labbe
On Tue, Apr 07, 2020 at 11:19:12AM +0100, Russell King - ARM Linux admin wrote:
> On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > Hello
> > > 
> > > I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> > > But this SoC does not have any way to be used in kernelci, no USB nor 
> > > network in uboot.
> > > So I have tried to fake uboot since the kernel has network support and 
> > > run the new kernel via kexec.
> > > 
> > > But kexec 2.0.18 fail to work:
> > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > 
> > As I mentioned in my other reply, this apparent "kexec" command line
> > does not seem to reflect the arguments you actually used to invoke
> > the kexec output below.
> > 
> > > syscall kexec_file_load not available.
> > 
> > This message is produced by do_kexec_file_load().  This function is only
> > invoked if the do_kexec_file_syscall flag in main() is set.  This flag
> > is only set if one of:
> > 
> > --kexec-file-syscall
> > --kexec-syscall
> > --kexec-syscall-auto
> > -s
> > -c
> > -a
> > 
> > are provided on the kexec command line.  Your command line above does
> > not contain any of those arguments, so either the command line is not
> > what you used, or you are using a patched kexec, or your compiler is
> > grossly miscompiling kexec.
> > 
> > > Try gzip decompression.
> > > kernel: 0xb6535008 kernel_size: 0x853200
> > > MEMORY RANGES
> > > 2000-9fff (0)
> > 
> > Then there's the debug output, which is only produced if the
> > kexec_debug global is set, which in turn is only set if --debug or -d
> > is supplied on the kexec command line - which again, your kexec
> > command line does not contain this.
> > 
> > > zImage header: 0x016f2818 0x 0x00853200
> > > zImage size 0x853200, file size 0x853200
> > > zImage requires 0x00864200 bytes
> > >   offset 0xbae4 tag 0x5a534c4b size 8
> > > Decompressed kernel sizes:
> > >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > > Resulting kernel space: 0x01def5a0
> > > Kernel: address=0x20008000 size=0x01def5a0
> > > Initrd: address=0x21df8000 size=0x0090b6fa
> > > DT: address=0x22704000 size=0x5c09
> > > kexec_load: entry = 0x20008000 flags = 0x28
> > > nr_segments = 3
> > > segment[0].buf   = 0xb6535008
> > > segment[0].bufsz = 0x853204
> > > segment[0].mem   = 0x20008000
> > > segment[0].memsz = 0x854000
> > > segment[1].buf   = 0xb5c29008
> > > segment[1].bufsz = 0x90b6fa
> > > segment[1].mem   = 0x21df8000
> > > segment[1].memsz = 0x90c000
> > > segment[2].buf   = 0x4db50
> > > segment[2].bufsz = 0x5c09
> > > segm[   71.039126] kexec_core: Starting new kernel
> > > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > > x22704000
> > > segment[2].memsz = 0x6000
> > > [   71.489070] Bye!
> > > 
> > > 
> > > I have tried also kexec-2.0.20
> > > Try gzip decompression.
> > > zImage header: 0x 0x19b4 0x1000
> > > zImage requires 0x008641c0 bytes
> > > Could not find a free area of memory of 0x86c1c0 bytes...
> > > Cannot load /tmp/kernel
> > 
> > kexec 2.0.20 doesn't appear to have changed anything to do with how
> > allocations are done.  The above output looks even more strange and
> > confusing.  "zImage header" is produced by debugging prints, which
> > imply that kexec_debug was set.
> > 
> > However, the "MEMORY RANGES" output is missing - this has not gone
> > away with kexec 2.0.20, it's still there, and works for me (I've
> > just built and tested kexec 2.0.20).
> > 
> > Also, the values on the "zImage header" line are completely messed
> > up; the first should be the zImage magic value and it is not - that
> > suggests that the file being loaded is not a zImage file, or is
> > corrupted.
> 
> Under a VM (the kernel doesn't have kexec support - but that's not a
> problem, because the initial loading stages are the relevant parts
> which all happen in userspace):
> 
> # build/sbin/kexec --version
> kexec-tools 2.0.20
> # build/sbin/kexec --debug --load virt-vmlinuz-5.4.0+
> Try gzip decompression.
> kernel: 0xb6a6c008 kernel_size: 0x407358
> MEMORY RANGES
> 4000-7fff (0)
> zImage header: 0x016f2818 0x 0x00407358
> zImage size 0x407358, file size 0x407358
> zImage requires 0x00418358 bytes
>   offset 0x7178 tag 0x5a534c4b size 12
> Decompressed kernel sizes:
>  text+data 0x00c2ed24 bss 0x000319ec total 0x00c60710
> Resulting kernel space: 0x0104707c
> Kernel: address=0x40008000 size=0x0104707c
> DT: address=0x41051000 size=0x0010
> kexec_load: entry = 0x40008000 flags = 0x28
> nr_segments = 2
> segment[0].buf   = 0xb6a6c008
> segment[0].bufsz = 0x40735c
> segment[0].mem   = 0x40008000
> segment[0].memsz = 0x408000
> segment[1].buf   = 0xb

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Tue, Apr 07, 2020 at 11:02:03AM +0100, Russell King - ARM Linux admin wrote:
> On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > Hello
> > 
> > I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> > But this SoC does not have any way to be used in kernelci, no USB nor 
> > network in uboot.
> > So I have tried to fake uboot since the kernel has network support and run 
> > the new kernel via kexec.
> > 
> > But kexec 2.0.18 fail to work:
> > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > earlycon=uart,mmio32,0x700 ip=dhcp'
> 
> As I mentioned in my other reply, this apparent "kexec" command line
> does not seem to reflect the arguments you actually used to invoke
> the kexec output below.
> 
> > syscall kexec_file_load not available.
> 
> This message is produced by do_kexec_file_load().  This function is only
> invoked if the do_kexec_file_syscall flag in main() is set.  This flag
> is only set if one of:
> 
>   --kexec-file-syscall
>   --kexec-syscall
>   --kexec-syscall-auto
>   -s
>   -c
>   -a
> 
> are provided on the kexec command line.  Your command line above does
> not contain any of those arguments, so either the command line is not
> what you used, or you are using a patched kexec, or your compiler is
> grossly miscompiling kexec.
> 
> > Try gzip decompression.
> > kernel: 0xb6535008 kernel_size: 0x853200
> > MEMORY RANGES
> > 2000-9fff (0)
> 
> Then there's the debug output, which is only produced if the
> kexec_debug global is set, which in turn is only set if --debug or -d
> is supplied on the kexec command line - which again, your kexec
> command line does not contain this.
> 
> > zImage header: 0x016f2818 0x 0x00853200
> > zImage size 0x853200, file size 0x853200
> > zImage requires 0x00864200 bytes
> >   offset 0xbae4 tag 0x5a534c4b size 8
> > Decompressed kernel sizes:
> >  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> > Resulting kernel space: 0x01def5a0
> > Kernel: address=0x20008000 size=0x01def5a0
> > Initrd: address=0x21df8000 size=0x0090b6fa
> > DT: address=0x22704000 size=0x5c09
> > kexec_load: entry = 0x20008000 flags = 0x28
> > nr_segments = 3
> > segment[0].buf   = 0xb6535008
> > segment[0].bufsz = 0x853204
> > segment[0].mem   = 0x20008000
> > segment[0].memsz = 0x854000
> > segment[1].buf   = 0xb5c29008
> > segment[1].bufsz = 0x90b6fa
> > segment[1].mem   = 0x21df8000
> > segment[1].memsz = 0x90c000
> > segment[2].buf   = 0x4db50
> > segment[2].bufsz = 0x5c09
> > segm[   71.039126] kexec_core: Starting new kernel
> > ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> > x22704000
> > segment[2].memsz = 0x6000
> > [   71.489070] Bye!
> > 
> > 
> > I have tried also kexec-2.0.20
> > Try gzip decompression.
> > zImage header: 0x 0x19b4 0x1000
> > zImage requires 0x008641c0 bytes
> > Could not find a free area of memory of 0x86c1c0 bytes...
> > Cannot load /tmp/kernel
> 
> kexec 2.0.20 doesn't appear to have changed anything to do with how
> allocations are done.  The above output looks even more strange and
> confusing.  "zImage header" is produced by debugging prints, which
> imply that kexec_debug was set.
> 
> However, the "MEMORY RANGES" output is missing - this has not gone
> away with kexec 2.0.20, it's still there, and works for me (I've
> just built and tested kexec 2.0.20).
> 
> Also, the values on the "zImage header" line are completely messed
> up; the first should be the zImage magic value and it is not - that
> suggests that the file being loaded is not a zImage file, or is
> corrupted.

Under a VM (the kernel doesn't have kexec support - but that's not a
problem, because the initial loading stages are the relevant parts
which all happen in userspace):

# build/sbin/kexec --version
kexec-tools 2.0.20
# build/sbin/kexec --debug --load virt-vmlinuz-5.4.0+
Try gzip decompression.
kernel: 0xb6a6c008 kernel_size: 0x407358
MEMORY RANGES
4000-7fff (0)
zImage header: 0x016f2818 0x 0x00407358
zImage size 0x407358, file size 0x407358
zImage requires 0x00418358 bytes
  offset 0x7178 tag 0x5a534c4b size 12
Decompressed kernel sizes:
 text+data 0x00c2ed24 bss 0x000319ec total 0x00c60710
Resulting kernel space: 0x0104707c
Kernel: address=0x40008000 size=0x0104707c
DT: address=0x41051000 size=0x0010
kexec_load: entry = 0x40008000 flags = 0x28
nr_segments = 2
segment[0].buf   = 0xb6a6c008
segment[0].bufsz = 0x40735c
segment[0].mem   = 0x40008000
segment[0].memsz = 0x408000
segment[1].buf   = 0xb696b008
segment[1].bufsz = 0x10
segment[1].mem   = 0x41051000
segment[1].memsz = 0x10
kexec_load failed: Function not implemented
entry   = 0x40008000 flags = 0x28
nr_segments = 2
segment[0].buf   = 0xb6aa0008
segment[0].bufsz = 0x40735c
segment[0].mem   = 0x40008000
segment[0].memsz = 0x408000
segment

Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> Hello
> 
> I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> But this SoC does not have any way to be used in kernelci, no USB nor network 
> in uboot.
> So I have tried to fake uboot since the kernel has network support and run 
> the new kernel via kexec.
> 
> But kexec 2.0.18 fail to work:
> kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> earlycon=uart,mmio32,0x700 ip=dhcp'

As I mentioned in my other reply, this apparent "kexec" command line
does not seem to reflect the arguments you actually used to invoke
the kexec output below.

> syscall kexec_file_load not available.

This message is produced by do_kexec_file_load().  This function is only
invoked if the do_kexec_file_syscall flag in main() is set.  This flag
is only set if one of:

--kexec-file-syscall
--kexec-syscall
--kexec-syscall-auto
-s
-c
-a

are provided on the kexec command line.  Your command line above does
not contain any of those arguments, so either the command line is not
what you used, or you are using a patched kexec, or your compiler is
grossly miscompiling kexec.

> Try gzip decompression.
> kernel: 0xb6535008 kernel_size: 0x853200
> MEMORY RANGES
> 2000-9fff (0)

Then there's the debug output, which is only produced if the
kexec_debug global is set, which in turn is only set if --debug or -d
is supplied on the kexec command line - which again, your kexec
command line does not contain this.

> zImage header: 0x016f2818 0x 0x00853200
> zImage size 0x853200, file size 0x853200
> zImage requires 0x00864200 bytes
>   offset 0xbae4 tag 0x5a534c4b size 8
> Decompressed kernel sizes:
>  text+data 0x0158b3a0 bss 0x000632f0 total 0x015ee690
> Resulting kernel space: 0x01def5a0
> Kernel: address=0x20008000 size=0x01def5a0
> Initrd: address=0x21df8000 size=0x0090b6fa
> DT: address=0x22704000 size=0x5c09
> kexec_load: entry = 0x20008000 flags = 0x28
> nr_segments = 3
> segment[0].buf   = 0xb6535008
> segment[0].bufsz = 0x853204
> segment[0].mem   = 0x20008000
> segment[0].memsz = 0x854000
> segment[1].buf   = 0xb5c29008
> segment[1].bufsz = 0x90b6fa
> segment[1].mem   = 0x21df8000
> segment[1].memsz = 0x90c000
> segment[2].buf   = 0x4db50
> segment[2].bufsz = 0x5c09
> segm[   71.039126] kexec_core: Starting new kernel
> ent[2].mem   = 0[   71.044712] Disabling non-boot CPUs ...
> x22704000
> segment[2].memsz = 0x6000
> [   71.489070] Bye!
> 
> 
> I have tried also kexec-2.0.20
> Try gzip decompression.
> zImage header: 0x 0x19b4 0x1000
> zImage requires 0x008641c0 bytes
> Could not find a free area of memory of 0x86c1c0 bytes...
> Cannot load /tmp/kernel

kexec 2.0.20 doesn't appear to have changed anything to do with how
allocations are done.  The above output looks even more strange and
confusing.  "zImage header" is produced by debugging prints, which
imply that kexec_debug was set.

However, the "MEMORY RANGES" output is missing - this has not gone
away with kexec 2.0.20, it's still there, and works for me (I've
just built and tested kexec 2.0.20).

Also, the values on the "zImage header" line are completely messed
up; the first should be the zImage magic value and it is not - that
suggests that the file being loaded is not a zImage file, or is
corrupted.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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


Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Tue, Apr 07, 2020 at 11:32:53AM +0200, Corentin Labbe wrote:
> On Tue, Apr 07, 2020 at 09:12:57AM +0100, Russell King - ARM Linux admin 
> wrote:
> > That was not reflected in the command lines given to kexec that you
> > quoted previously, so I'm now wondering if you're giving me the full
> > information.
> > 
> > In any case, based on the information you've supplied thus far, I have
> > no further suggetsions to make.
> > 
> 
> Sorry I have added --debug after my initial mail.
> But I am surprised that no debug output like "MEMORY RANGES" is done (like I 
> got in my first try).
> I have started to patch kexec-tools to check it, and debug is enabled.
> Furthermore, I got in locate_hole:237 memory_ranges=0.
> So the memory region in struct kexec_info is not initialized (and so cannot 
> be printed)

The memory region information is initialised by get_memory_ranges()
in kexec/arch/arm/kexec-arm.c, which reads /proc/iomem.

That is called from my_load(), which checks that info.memory_ranges
is non-zero.  If it's zero, it errors out with "Could not get memory
layout".

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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


Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Corentin Labbe
On Tue, Apr 07, 2020 at 09:12:57AM +0100, Russell King - ARM Linux admin wrote:
> On Tue, Apr 07, 2020 at 10:01:44AM +0200, Corentin Labbe wrote:
> > On Tue, Apr 07, 2020 at 08:31:17AM +0100, Russell King - ARM Linux admin 
> > wrote:
> > > On Mon, Apr 06, 2020 at 10:10:53PM +0200, Corentin Labbe wrote:
> > > > On Mon, Apr 06, 2020 at 10:37:29AM +0100, Russell King - ARM Linux 
> > > > admin wrote:
> > > > > On Mon, Apr 06, 2020 at 11:25:40AM +0200, Corentin Labbe wrote:
> > > > > > On Mon, Apr 06, 2020 at 10:16:00AM +0100, Russell King - ARM Linux 
> > > > > > admin wrote:
> > > > > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > > > > Hello
> > > > > > > > 
> > > > > > > > I am trying to add the last missing Allwinner Soc in kernelci: 
> > > > > > > > the A80.
> > > > > > > > But this SoC does not have any way to be used in kernelci, no 
> > > > > > > > USB nor network in uboot.
> > > > > > > > So I have tried to fake uboot since the kernel has network 
> > > > > > > > support and run the new kernel via kexec.
> > > > > > > > 
> > > > > > > > But kexec 2.0.18 fail to work:
> > > > > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > > > > 
> > > > > > > What happens if you omit the dtb argument?
> > > > > > > 
> > > > > > 
> > > > > > No change without dtb
> > > > > > 
> > > > > > I have also tried to add --mem-mim and --mem-max without any change.
> > > > > > I given mem according to what I saw in /proc/iomem
> > > > > > 2000-9fff : System RAM
> > > > > >   20008000-207f : Kernel code
> > > > > >   2090-209a0c87 : Kernel data
> > > > > > So I gave --mem-min 0x3000 --mem-max 0x9fff
> > > > > > Anyway, the result is always the same.
> > > > > 
> > > > > The next step is to enable the early debugging - first in the
> > > > > decompressor - add #define DEBUG to the top of
> > > > > arch/arm/boot/compressed/head.S
> > > > > 
> > > > > Also enable DEBUG_LL in the kernel and use earlyprintk to see if you 
> > > > > can
> > > > > get anything from the new kernel.
> > > > > 
> > > > 
> > > > I dont know what happened, but now I always get "Could not find a free 
> > > > area of memory of 0x86c1c0 bytes..." (even with kexec 2.0.18)
> > > > Furthermore, I have added crashkernel=128M to the cmdlist
> > > > I have verified that the reservation is working:
> > > > 2000-9fff : System RAM
> > > >   20008000-207f : Kernel code
> > > >   2090-209a0c87 : Kernel data
> > > >   4000-47ff : Crash kernel
> > > > But even with this reservation, no change.
> > > 
> > > crashkernel is only necessary if you're loading a kenrel image to be
> > > booted when the existing one has crashed. For the problem you're
> > > seeing, it's an unnecessary additional change; please drop that.
> > > 
> > > You could try running kexec with debug enabled to see more information.
> > > 
> > 
> > I am already running with --debug
> 
> That was not reflected in the command lines given to kexec that you
> quoted previously, so I'm now wondering if you're giving me the full
> information.
> 
> In any case, based on the information you've supplied thus far, I have
> no further suggetsions to make.
> 

Sorry I have added --debug after my initial mail.
But I am surprised that no debug output like "MEMORY RANGES" is done (like I 
got in my first try).
I have started to patch kexec-tools to check it, and debug is enabled.
Furthermore, I got in locate_hole:237 memory_ranges=0.
So the memory region in struct kexec_info is not initialized (and so cannot be 
printed)


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


Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Tue, Apr 07, 2020 at 10:01:44AM +0200, Corentin Labbe wrote:
> On Tue, Apr 07, 2020 at 08:31:17AM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Mon, Apr 06, 2020 at 10:10:53PM +0200, Corentin Labbe wrote:
> > > On Mon, Apr 06, 2020 at 10:37:29AM +0100, Russell King - ARM Linux admin 
> > > wrote:
> > > > On Mon, Apr 06, 2020 at 11:25:40AM +0200, Corentin Labbe wrote:
> > > > > On Mon, Apr 06, 2020 at 10:16:00AM +0100, Russell King - ARM Linux 
> > > > > admin wrote:
> > > > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > > > Hello
> > > > > > > 
> > > > > > > I am trying to add the last missing Allwinner Soc in kernelci: 
> > > > > > > the A80.
> > > > > > > But this SoC does not have any way to be used in kernelci, no USB 
> > > > > > > nor network in uboot.
> > > > > > > So I have tried to fake uboot since the kernel has network 
> > > > > > > support and run the new kernel via kexec.
> > > > > > > 
> > > > > > > But kexec 2.0.18 fail to work:
> > > > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > > > 
> > > > > > What happens if you omit the dtb argument?
> > > > > > 
> > > > > 
> > > > > No change without dtb
> > > > > 
> > > > > I have also tried to add --mem-mim and --mem-max without any change.
> > > > > I given mem according to what I saw in /proc/iomem
> > > > > 2000-9fff : System RAM
> > > > >   20008000-207f : Kernel code
> > > > >   2090-209a0c87 : Kernel data
> > > > > So I gave --mem-min 0x3000 --mem-max 0x9fff
> > > > > Anyway, the result is always the same.
> > > > 
> > > > The next step is to enable the early debugging - first in the
> > > > decompressor - add #define DEBUG to the top of
> > > > arch/arm/boot/compressed/head.S
> > > > 
> > > > Also enable DEBUG_LL in the kernel and use earlyprintk to see if you can
> > > > get anything from the new kernel.
> > > > 
> > > 
> > > I dont know what happened, but now I always get "Could not find a free 
> > > area of memory of 0x86c1c0 bytes..." (even with kexec 2.0.18)
> > > Furthermore, I have added crashkernel=128M to the cmdlist
> > > I have verified that the reservation is working:
> > > 2000-9fff : System RAM
> > >   20008000-207f : Kernel code
> > >   2090-209a0c87 : Kernel data
> > >   4000-47ff : Crash kernel
> > > But even with this reservation, no change.
> > 
> > crashkernel is only necessary if you're loading a kenrel image to be
> > booted when the existing one has crashed. For the problem you're
> > seeing, it's an unnecessary additional change; please drop that.
> > 
> > You could try running kexec with debug enabled to see more information.
> > 
> 
> I am already running with --debug

That was not reflected in the command lines given to kexec that you
quoted previously, so I'm now wondering if you're giving me the full
information.

In any case, based on the information you've supplied thus far, I have
no further suggetsions to make.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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


Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Corentin Labbe
On Tue, Apr 07, 2020 at 08:31:17AM +0100, Russell King - ARM Linux admin wrote:
> On Mon, Apr 06, 2020 at 10:10:53PM +0200, Corentin Labbe wrote:
> > On Mon, Apr 06, 2020 at 10:37:29AM +0100, Russell King - ARM Linux admin 
> > wrote:
> > > On Mon, Apr 06, 2020 at 11:25:40AM +0200, Corentin Labbe wrote:
> > > > On Mon, Apr 06, 2020 at 10:16:00AM +0100, Russell King - ARM Linux 
> > > > admin wrote:
> > > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > > Hello
> > > > > > 
> > > > > > I am trying to add the last missing Allwinner Soc in kernelci: the 
> > > > > > A80.
> > > > > > But this SoC does not have any way to be used in kernelci, no USB 
> > > > > > nor network in uboot.
> > > > > > So I have tried to fake uboot since the kernel has network support 
> > > > > > and run the new kernel via kexec.
> > > > > > 
> > > > > > But kexec 2.0.18 fail to work:
> > > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > > 
> > > > > What happens if you omit the dtb argument?
> > > > > 
> > > > 
> > > > No change without dtb
> > > > 
> > > > I have also tried to add --mem-mim and --mem-max without any change.
> > > > I given mem according to what I saw in /proc/iomem
> > > > 2000-9fff : System RAM
> > > >   20008000-207f : Kernel code
> > > >   2090-209a0c87 : Kernel data
> > > > So I gave --mem-min 0x3000 --mem-max 0x9fff
> > > > Anyway, the result is always the same.
> > > 
> > > The next step is to enable the early debugging - first in the
> > > decompressor - add #define DEBUG to the top of
> > > arch/arm/boot/compressed/head.S
> > > 
> > > Also enable DEBUG_LL in the kernel and use earlyprintk to see if you can
> > > get anything from the new kernel.
> > > 
> > 
> > I dont know what happened, but now I always get "Could not find a free area 
> > of memory of 0x86c1c0 bytes..." (even with kexec 2.0.18)
> > Furthermore, I have added crashkernel=128M to the cmdlist
> > I have verified that the reservation is working:
> > 2000-9fff : System RAM
> >   20008000-207f : Kernel code
> >   2090-209a0c87 : Kernel data
> >   4000-47ff : Crash kernel
> > But even with this reservation, no change.
> 
> crashkernel is only necessary if you're loading a kenrel image to be
> booted when the existing one has crashed. For the problem you're
> seeing, it's an unnecessary additional change; please drop that.
> 
> You could try running kexec with debug enabled to see more information.
> 

I am already running with --debug

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


Re: Trying to kexec on Allwinner A80

2020-04-07 Thread Russell King - ARM Linux admin
On Mon, Apr 06, 2020 at 10:10:53PM +0200, Corentin Labbe wrote:
> On Mon, Apr 06, 2020 at 10:37:29AM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Mon, Apr 06, 2020 at 11:25:40AM +0200, Corentin Labbe wrote:
> > > On Mon, Apr 06, 2020 at 10:16:00AM +0100, Russell King - ARM Linux admin 
> > > wrote:
> > > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > > Hello
> > > > > 
> > > > > I am trying to add the last missing Allwinner Soc in kernelci: the 
> > > > > A80.
> > > > > But this SoC does not have any way to be used in kernelci, no USB nor 
> > > > > network in uboot.
> > > > > So I have tried to fake uboot since the kernel has network support 
> > > > > and run the new kernel via kexec.
> > > > > 
> > > > > But kexec 2.0.18 fail to work:
> > > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > > 
> > > > What happens if you omit the dtb argument?
> > > > 
> > > 
> > > No change without dtb
> > > 
> > > I have also tried to add --mem-mim and --mem-max without any change.
> > > I given mem according to what I saw in /proc/iomem
> > > 2000-9fff : System RAM
> > >   20008000-207f : Kernel code
> > >   2090-209a0c87 : Kernel data
> > > So I gave --mem-min 0x3000 --mem-max 0x9fff
> > > Anyway, the result is always the same.
> > 
> > The next step is to enable the early debugging - first in the
> > decompressor - add #define DEBUG to the top of
> > arch/arm/boot/compressed/head.S
> > 
> > Also enable DEBUG_LL in the kernel and use earlyprintk to see if you can
> > get anything from the new kernel.
> > 
> 
> I dont know what happened, but now I always get "Could not find a free area 
> of memory of 0x86c1c0 bytes..." (even with kexec 2.0.18)
> Furthermore, I have added crashkernel=128M to the cmdlist
> I have verified that the reservation is working:
> 2000-9fff : System RAM
>   20008000-207f : Kernel code
>   2090-209a0c87 : Kernel data
>   4000-47ff : Crash kernel
> But even with this reservation, no change.

crashkernel is only necessary if you're loading a kenrel image to be
booted when the existing one has crashed. For the problem you're
seeing, it's an unnecessary additional change; please drop that.

You could try running kexec with debug enabled to see more information.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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


Re: Trying to kexec on Allwinner A80

2020-04-06 Thread Corentin Labbe
On Mon, Apr 06, 2020 at 10:37:29AM +0100, Russell King - ARM Linux admin wrote:
> On Mon, Apr 06, 2020 at 11:25:40AM +0200, Corentin Labbe wrote:
> > On Mon, Apr 06, 2020 at 10:16:00AM +0100, Russell King - ARM Linux admin 
> > wrote:
> > > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > > Hello
> > > > 
> > > > I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> > > > But this SoC does not have any way to be used in kernelci, no USB nor 
> > > > network in uboot.
> > > > So I have tried to fake uboot since the kernel has network support and 
> > > > run the new kernel via kexec.
> > > > 
> > > > But kexec 2.0.18 fail to work:
> > > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > > 
> > > What happens if you omit the dtb argument?
> > > 
> > 
> > No change without dtb
> > 
> > I have also tried to add --mem-mim and --mem-max without any change.
> > I given mem according to what I saw in /proc/iomem
> > 2000-9fff : System RAM
> >   20008000-207f : Kernel code
> >   2090-209a0c87 : Kernel data
> > So I gave --mem-min 0x3000 --mem-max 0x9fff
> > Anyway, the result is always the same.
> 
> The next step is to enable the early debugging - first in the
> decompressor - add #define DEBUG to the top of
> arch/arm/boot/compressed/head.S
> 
> Also enable DEBUG_LL in the kernel and use earlyprintk to see if you can
> get anything from the new kernel.
> 

I dont know what happened, but now I always get "Could not find a free area of 
memory of 0x86c1c0 bytes..." (even with kexec 2.0.18)
Furthermore, I have added crashkernel=128M to the cmdlist
I have verified that the reservation is working:
2000-9fff : System RAM
  20008000-207f : Kernel code
  2090-209a0c87 : Kernel data
  4000-47ff : Crash kernel
But even with this reservation, no change.


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


Re: Trying to kexec on Allwinner A80

2020-04-06 Thread Russell King - ARM Linux admin
On Mon, Apr 06, 2020 at 11:25:40AM +0200, Corentin Labbe wrote:
> On Mon, Apr 06, 2020 at 10:16:00AM +0100, Russell King - ARM Linux admin 
> wrote:
> > On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > > Hello
> > > 
> > > I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> > > But this SoC does not have any way to be used in kernelci, no USB nor 
> > > network in uboot.
> > > So I have tried to fake uboot since the kernel has network support and 
> > > run the new kernel via kexec.
> > > 
> > > But kexec 2.0.18 fail to work:
> > > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > > earlycon=uart,mmio32,0x700 ip=dhcp'
> > 
> > What happens if you omit the dtb argument?
> > 
> 
> No change without dtb
> 
> I have also tried to add --mem-mim and --mem-max without any change.
> I given mem according to what I saw in /proc/iomem
> 2000-9fff : System RAM
>   20008000-207f : Kernel code
>   2090-209a0c87 : Kernel data
> So I gave --mem-min 0x3000 --mem-max 0x9fff
> Anyway, the result is always the same.

The next step is to enable the early debugging - first in the
decompressor - add #define DEBUG to the top of
arch/arm/boot/compressed/head.S

Also enable DEBUG_LL in the kernel and use earlyprintk to see if you can
get anything from the new kernel.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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


Re: Trying to kexec on Allwinner A80

2020-04-06 Thread Corentin Labbe
On Mon, Apr 06, 2020 at 10:16:00AM +0100, Russell King - ARM Linux admin wrote:
> On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> > Hello
> > 
> > I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> > But this SoC does not have any way to be used in kernelci, no USB nor 
> > network in uboot.
> > So I have tried to fake uboot since the kernel has network support and run 
> > the new kernel via kexec.
> > 
> > But kexec 2.0.18 fail to work:
> > kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> > --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> > earlycon=uart,mmio32,0x700 ip=dhcp'
> 
> What happens if you omit the dtb argument?
> 

No change without dtb

I have also tried to add --mem-mim and --mem-max without any change.
I given mem according to what I saw in /proc/iomem
2000-9fff : System RAM
  20008000-207f : Kernel code
  2090-209a0c87 : Kernel data
So I gave --mem-min 0x3000 --mem-max 0x9fff
Anyway, the result is always the same.

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


Re: Trying to kexec on Allwinner A80

2020-04-06 Thread Russell King - ARM Linux admin
On Mon, Apr 06, 2020 at 10:27:20AM +0200, Corentin Labbe wrote:
> Hello
> 
> I am trying to add the last missing Allwinner Soc in kernelci: the A80.
> But this SoC does not have any way to be used in kernelci, no USB nor network 
> in uboot.
> So I have tried to fake uboot since the kernel has network support and run 
> the new kernel via kexec.
> 
> But kexec 2.0.18 fail to work:
> kexec --force /tmp/kernel --initrd /tmp/ramdisk --dtb /tmp/dtb 
> --command-line='console=ttyS0,115200n8 root=/dev/ram0 
> earlycon=uart,mmio32,0x700 ip=dhcp'

What happens if you omit the dtb argument?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up

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