Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FIT Image file handling
#1
Hi,

I went through this document:
http://events.linuxfoundation.org/sites/events/files/slides/U-Boot%20FIT%20for%20Xen.pdf
And I have a uImage.its, which was able to create a uImage.itb. When I use the “bootm” command, I get the following:
U-Boot-E6Kn>bootm 0x6000000:xen@1
Wrong Image Format for bootm command
ERROR: can't get kernel image!
 
I’m using “xen.ub”, for the node image. Is this the correct file?

I tried to attach my ".its" file, but couldn't, because of a file format problem. I'll attach it when I figure out how to? Huh

 
Thanks,
Dino
Reply
#2
Dino,

The issue does appear to be the format of your Xen image. When we have done this, we just use the xen elf image that gets generated as $XEN_ROOT/xen/xen, when you build Xen.

If you still need to display your .its file, you could change its extension to .txt on here and see if that helps.

Thanks,
Robbie VanVossen
Reply
#3
Thanks Robert!

I decided to simply and just boot the Linux kernel. I create a new uImage file, and used the image.elf file for my kernel subimage. Now it looks like I'm missing some U-Boot compilation flags for the bootm command:

U-Boot-E6Kn>bootm 0x80000:kernel@1 0x02cd3534:fdt@2
Wrong Image Format for bootm command
ERROR: can't get kernel image!
U-Boot-E6Kn>bootm 0x80000:kernel@1 0x02cd3534:fdt@2
## Loading kernel from FIT Image at 00080000 ...
   Trying kernel@1 kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x00080000
     Data Size:    46478256 Bytes = 44.3 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
   Verifying Hash Integrity ... OK
Unsupported Architecture
ERROR: can't get kernel image!

In bootm.c, the "Unsupported Architecture" happens when "HOSTCC" and "CONFIG_SANDBOX" are not defined?

Any comments on this one?

Thanks,
Dino
Reply
#4
Dino,

All I needed to add to the existing U-Boot defconfig for my platform was the following:

Code:
CONFIG_FIT=y

CONFIG_SANDBOX is just used when you want to run the U-Boot tests. HOST_CC should be defined when you pass in a value for CROSS_COMPILE when you build, for example:

Code:
$ make xilinx_zynqmp_zcu102_revB_defconfig 
$ make CROSS_COMPILE=arm-linux-gnueabihf-


Thanks,
Robbie VanVossen
Reply
#5
(11-01-2016, 07:37 PM)john_dino_dinatale Wrote: Unsupported Architecture
ERROR: can't get kernel image!

In bootm.c, the "Unsupported Architecture" happens when "HOSTCC" and "CONFIG_SANDBOX" are not defined?

The "Unsupported Architecture" error happens when the u-boot architecture does not match what is specified in your .its file.

Are you setting arch in your .its file to "arm" or "arm64"?  It should be set to the latter for 64-bit ARM platforms like the ZCU102.

     Nate

Attaching .its file renamed to .txt.

     Nate

Dino,

The terminal output you sent is included below.


Quote:U-Boot-E6Kn>bootm
## Loading kernel from FIT Image at 10000000 ...
   Using 'config@1' configuration
   Trying 'xen@1' kernel subimage
     Description:  XEN Kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000c8
     Data Size:    788000 Bytes = 769.5 KiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
   Verifying Hash Integrity ... OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'config@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  E6000n XEN device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x12d031a8
     Data Size:    29780 Bytes = 29.1 KiB
     Architecture: AArch64
   Verifying Hash Integrity ... OK
   Booting using the fdt blob at 0x12d031a8
## Loading loadables from FIT Image at 10000000 ...
   Trying 'kernel@1' loadables subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100c0794
     Data Size:    46410080 Bytes = 44.3 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00c80000
     Entry Point:  0x00c80000
   Verifying Hash Integrity ... OK
   Loading loadables from 0x100c0794 to 0x00c80000
   Loading Kernel Image ... OK
   Loading Device Tree to 0000000007ff5000, end 0000000007fff453 ... OK
 
Starting kernel ...
 
Xen 4.7.0-rc
(XEN) Xen version 4.7.0-rc (ddinatale@arrs.arrisi.com) (aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)) debug=y Thu Nov  3 17:14:09 EDT 2016
(XEN) Latest ChangeSet:
(XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4
(XEN) 64-bit Execution:
(XEN)   Processor Features: 0000000000002222 0000000000000000
(XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN)     Extensions: FloatingPoint AdvancedSIMD
(XEN)   Debug Features: 0000000010305106 0000000000000000
(XEN)   Auxiliary Features: 0000000000000000 0000000000000000
(XEN)   Memory Model Features: 0000000000001122 0000000000000000
(XEN)   ISA Features:  0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00000131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 03010066
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10201105 40000000 01260000 02102211
(XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Using PSCI-1.0 for SMP bringup
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 100000 KHz
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=00000000f9010000
(XEN)         gic_cpu_addr=00000000f902f000
(XEN)         gic_hyp_addr=00000000f9040000
(XEN)         gic_vcpu_addr=00000000f906f000
(XEN)         gic_maintenance_irq=25
(XEN) GICv2: 192 lines, 4 cpus, secure (IID 0200143b).
(XEN) GICv2: WARNING: CPU0: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU0: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU0: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 32 KiB.
(XEN) Bringing up CPU1
(XEN) GICv2: WARNING: CPU1: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU1: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU1: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) CPU 1 booted.
(XEN) Bringing up CPU2
(XEN) GICv2: WARNING: CPU2: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU2: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU2: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
(XEN) GICv2: WARNING: CPU3: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU3: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU3: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) CPU 3 booted.
(XEN) Brought up 4 CPUs
(XEN) P2M: 40-bit IPA with 40-bit PA
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
(XEN) smmu: /amba/smmu@fd800000: probing hardware configuration...
(XEN) smmu: /amba/smmu@fd800000: SMMUv2 with:
(XEN) smmu: /amba/smmu@fd800000:        stage 2 translation
(XEN) smmu: /amba/smmu@fd800000:        stream matching with 48 register groups, mask 0x7fff
(XEN) smmu: /amba/smmu@fd800000:        16 context banks (0 stage-2 only)
(XEN) smmu: /amba/smmu@fd800000:        Stage-2: 40-bit IPA -> 48-bit PA
(XEN) smmu: /amba/smmu@fd800000: registered 4 master devices
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) Interrupt remapping enabled
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading kernel from boot module @ 0000000000080000
(XEN) Allocating 1:1 mappings totalling 512MB for dom0:
(XEN) BANK[0] 0x00000020000000-0x00000040000000 (512MB)
(XEN) Grant table range: 0x0000006fe00000-0x0000006fe5e000
(XEN) smmu: /amba/smmu@fd800000: d0: p2maddr 0x000000087ff84000
(XEN) Loading zImage from 0000000000080000 to 0000000020000000-0000000023100000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading dom0 DTB to 0x0000000028000000-0x0000000028005e64
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 276kB init memory.


        Based on the output, it looks like your kernel load address is not be consistent between your .its and .dts.  The .its is telling u-boot to load the kernel to 0x00C8000 but your device tree is telling Xen that the kernel is being loaded to 0x00080000.

Quote:   Trying 'kernel@1' loadables subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100c0794
     Data Size:    46410080 Bytes = 44.3 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00c80000


Quote:(XEN) Loading kernel from boot module @ 0000000000080000

     Nate


Attached Files
.txt   e6000n_image.txt (Size: 1.57 KB / Downloads: 2)
Reply
#6
Hi Nate, 

I got the loading mixed up. I should have loaded the XEN kernel above the Linux kernel. So I’ve fixed that, so that XEN kernel is 64 Meg above the load address of our Linux kernel. I was able to bring up our XEN image from the FIT file. Thanks for your help!

Thanks,
Dino


(11-18-2016, 08:00 PM)Nathan.Studer Wrote:
(11-01-2016, 07:37 PM)john_dino_dinatale Wrote: Unsupported Architecture
ERROR: can't get kernel image!

In bootm.c, the "Unsupported Architecture" happens when "HOSTCC" and "CONFIG_SANDBOX" are not defined?

The "Unsupported Architecture" error happens when the u-boot architecture does not match what is specified in your .its file.

Are you setting arch in your .its file to "arm" or "arm64"?  It should be set to the latter for 64-bit ARM platforms like the ZCU102.

     Nate

Attaching .its file renamed to .txt.

     Nate

Dino,

The terminal output you sent is included below.


Quote:U-Boot-E6Kn>bootm
## Loading kernel from FIT Image at 10000000 ...
   Using 'config@1' configuration
   Trying 'xen@1' kernel subimage
     Description:  XEN Kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000c8
     Data Size:    788000 Bytes = 769.5 KiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00080000
     Entry Point:  0x00080000
   Verifying Hash Integrity ... OK
## Loading fdt from FIT Image at 10000000 ...
   Using 'config@1' configuration
   Trying 'fdt@1' fdt subimage
     Description:  E6000n XEN device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x12d031a8
     Data Size:    29780 Bytes = 29.1 KiB
     Architecture: AArch64
   Verifying Hash Integrity ... OK
   Booting using the fdt blob at 0x12d031a8
## Loading loadables from FIT Image at 10000000 ...
   Trying 'kernel@1' loadables subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100c0794
     Data Size:    46410080 Bytes = 44.3 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00c80000
     Entry Point:  0x00c80000
   Verifying Hash Integrity ... OK
   Loading loadables from 0x100c0794 to 0x00c80000
   Loading Kernel Image ... OK
   Loading Device Tree to 0000000007ff5000, end 0000000007fff453 ... OK
 
Starting kernel ...
 
Xen 4.7.0-rc
(XEN) Xen version 4.7.0-rc (ddinatale@arrs.arrisi.com) (aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)) debug=y Thu Nov  3 17:14:09 EDT 2016
(XEN) Latest ChangeSet:
(XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4
(XEN) 64-bit Execution:
(XEN)   Processor Features: 0000000000002222 0000000000000000
(XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN)     Extensions: FloatingPoint AdvancedSIMD
(XEN)   Debug Features: 0000000010305106 0000000000000000
(XEN)   Auxiliary Features: 0000000000000000 0000000000000000
(XEN)   Memory Model Features: 0000000000001122 0000000000000000
(XEN)   ISA Features:  0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00000131:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 03010066
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10201105 40000000 01260000 02102211
(XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Using PSCI-1.0 for SMP bringup
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 100000 KHz
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=00000000f9010000
(XEN)         gic_cpu_addr=00000000f902f000
(XEN)         gic_hyp_addr=00000000f9040000
(XEN)         gic_vcpu_addr=00000000f906f000
(XEN)         gic_maintenance_irq=25
(XEN) GICv2: 192 lines, 4 cpus, secure (IID 0200143b).
(XEN) GICv2: WARNING: CPU0: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU0: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU0: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) Using scheduler: SMP Credit Scheduler (credit)
(XEN) Allocated console ring of 32 KiB.
(XEN) Bringing up CPU1
(XEN) GICv2: WARNING: CPU1: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU1: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU1: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) CPU 1 booted.
(XEN) Bringing up CPU2
(XEN) GICv2: WARNING: CPU2: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU2: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU2: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
(XEN) GICv2: WARNING: CPU3: Failed to configure IRQ26 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU3: Failed to configure IRQ27 as Edge-triggered. H/w forces to Level-triggered.
(XEN) GICv2: WARNING: CPU3: Failed to configure IRQ30 as Edge-triggered. H/w forces to Level-triggered.
(XEN) CPU 3 booted.
(XEN) Brought up 4 CPUs
(XEN) P2M: 40-bit IPA with 40-bit PA
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
(XEN) smmu: /amba/smmu@fd800000: probing hardware configuration...
(XEN) smmu: /amba/smmu@fd800000: SMMUv2 with:
(XEN) smmu: /amba/smmu@fd800000:        stage 2 translation
(XEN) smmu: /amba/smmu@fd800000:        stream matching with 48 register groups, mask 0x7fff
(XEN) smmu: /amba/smmu@fd800000:        16 context banks (0 stage-2 only)
(XEN) smmu: /amba/smmu@fd800000:        Stage-2: 40-bit IPA -> 48-bit PA
(XEN) smmu: /amba/smmu@fd800000: registered 4 master devices
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) Interrupt remapping enabled
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading kernel from boot module @ 0000000000080000
(XEN) Allocating 1:1 mappings totalling 512MB for dom0:
(XEN) BANK[0] 0x00000020000000-0x00000040000000 (512MB)
(XEN) Grant table range: 0x0000006fe00000-0x0000006fe5e000
(XEN) smmu: /amba/smmu@fd800000: d0: p2maddr 0x000000087ff84000
(XEN) Loading zImage from 0000000000080000 to 0000000020000000-0000000023100000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading dom0 DTB to 0x0000000028000000-0x0000000028005e64
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen)
(XEN) Freed 276kB init memory.


        Based on the output, it looks like your kernel load address is not be consistent between your .its and .dts.  The .its is telling u-boot to load the kernel to 0x00C8000 but your device tree is telling Xen that the kernel is being loaded to 0x00080000.

Quote:   Trying 'kernel@1' loadables subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100c0794
     Data Size:    46410080 Bytes = 44.3 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x00c80000


Quote:(XEN) Loading kernel from boot module @ 0000000000080000

     Nate


 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)