UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

Petalinux please check Kernel config and bootloader

Highlighted
Adventurer
Posts: 89
Registered: ‎03-09-2017

Petalinux please check Kernel config and bootloader

Unable to boot the kernel.

IMG_1775.jpg
Voyager
Posts: 1,383
Registered: ‎06-24-2013

Re: Petalinux please check Kernel config and bootloader

[ Edited ]

Hey @jenny_august13,

 

It seems like your device tree is missing the information about the architecture (or it is wrongly set to ~0)

Note that it could also be caused by the bootloader not passing the correct information to the kernel.

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
Adventurer
Posts: 89
Registered: ‎03-09-2017

Re: Petalinux please check Kernel config and bootloader

I have selected initramfs in petalinux image packaging option then while booting my board i have my BOOT.BIN and image.ub copied into sdcard. Do i need to copy devicetree.dtb also? Everytime i keep only these two files in the sdcard to boot up the board.
Voyager
Posts: 1,383
Registered: ‎06-24-2013

Re: Petalinux please check Kernel config and bootloader

Hey @jenny_august13,

 

The image.ub is an archive containing several files, so it is very likely to contain a devicetree as well.

You can use the dumpimage tool from U-Boot to investigate ...

 

Check the content of image.ub file:

dumpimage -l image.ub

 

Extract image X from image.ub file:

dumpimage -T flat_dt -i image.ub -p X <outputfile>

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
Adventurer
Posts: 89
Registered: ‎03-09-2017

Re: Petalinux please check Kernel config and bootloader

FIT description: U-Boot fitImage for plnx_arm kernel
Created: Thu Sep 14 16:01:34 2017
Image 0 (kernel@0)
Description: Linux Kernel
Created: Thu Sep 14 16:01:34 2017
Type: Kernel Image
Compression: uncompressed
Data Size: 3737440 Bytes = 3649.84 kB = 3.56 MB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: 7a02cf3f922d132dde1e3ddc94a68d0ab6952ee8
Image 1 (fdt@0)
Description: Flattened Device Tree blob
Created: Thu Sep 14 16:01:34 2017
Type: Flat Device Tree
Compression: uncompressed
Data Size: 24018 Bytes = 23.46 kB = 0.02 MB
Architecture: ARM
Hash algo: sha1
Hash value: d85c5aa726dcf8ec3975a698d3ddf73438f146ee
Image 2 (ramdisk@0)
Description: ramdisk
Created: Thu Sep 14 16:01:34 2017
Type: RAMDisk Image
Compression: uncompressed
Data Size: 129193714 Bytes = 126165.74 kB = 123.21 MB
Architecture: ARM
OS: Linux
Load Address: unavailable
Entry Point: unavailable
Hash algo: sha1
Hash value: b146687dfcfcafeb86cdf8fd474d5056dfd80014
Default Configuration: 'conf@1'
Configuration 0 (conf@1)
Description: Boot Linux kernel with FDT blob + ramdisk
Kernel: kernel@0
Init Ramdisk: ramdisk@0
FDT: fdt@0
Configuration 1 (conf@2)
Description: Boot Linux kernel with FDT blob
Kernel: kernel@0
FDT: fdt@0

and next when i use
dumpimage -T flat_dt -l image.ub -p X newfile.txt

following error is displayed
invalid file position dumpimage
Voyager
Posts: 1,383
Registered: ‎06-24-2013

Re: Petalinux please check Kernel config and bootloader

Hey @jenny_august13,

 

The 'X' in '-p X' is the position in the archive, e.g. 0 (kernel), 1 (devicetree) , 2 (ramdisk)

 

Hope this helps,

Herbert

-------------- Yes, I do this for fun!
Adventurer
Posts: 89
Registered: ‎03-09-2017

Re: Petalinux please check Kernel config and bootloader

dumpimage -T flat_dt -l image.ub -p 1 newfile.txt
FIT description: U-Boot fitImage for plnx_arm kernel
Created: Thu Sep 14 16:01:34 2017
Image 0 (kernel@0)
Description: Linux Kernel
Created: Thu Sep 14 16:01:34 2017
Type: Kernel Image
Compression: uncompressed
Data Size: 3737440 Bytes = 3649.84 kB = 3.56 MB
Architecture: ARM
OS: Linux
Load Address: 0x00008000
Entry Point: 0x00008000
Hash algo: sha1
Hash value: 7a02cf3f922d132dde1e3ddc94a68d0ab6952ee8
Image 1 (fdt@0)
Description: Flattened Device Tree blob
Created: Thu Sep 14 16:01:34 2017
Type: Flat Device Tree
Compression: uncompressed
Data Size: 24018 Bytes = 23.46 kB = 0.02 MB
Architecture: ARM
Hash algo: sha1
Hash value: d85c5aa726dcf8ec3975a698d3ddf73438f146ee
Image 2 (ramdisk@0)
Description: ramdisk
Created: Thu Sep 14 16:01:34 2017
Type: RAMDisk Image
Compression: uncompressed
Data Size: 129193714 Bytes = 126165.74 kB = 123.21 MB
Architecture: ARM
OS: Linux
Load Address: unavailable
Entry Point: unavailable
Hash algo: sha1
Hash value: b146687dfcfcafeb86cdf8fd474d5056dfd80014
Default Configuration: 'conf@1'
Configuration 0 (conf@1)
Description: Boot Linux kernel with FDT blob + ramdisk
Kernel: kernel@0
Init Ramdisk: ramdisk@0
FDT: fdt@0
Configuration 1 (conf@2)
Description: Boot Linux kernel with FDT blob
Kernel: kernel@0


is being displayed but nothing is written into newfile.txt
Voyager
Posts: 1,383
Registered: ‎06-24-2013

Re: Petalinux please check Kernel config and bootloader

Hey @jenny_august13,

 

is being displayed but nothing is written into newfile.txt

This is because you are using -l (list) instead of -i (image) in your command.

 

best,

Herbert

-------------- Yes, I do this for fun!
Adventurer
Posts: 89
Registered: ‎03-09-2017

Re: Petalinux please check Kernel config and bootloader

[ Edited ]

yes I got the device tree extracted into newfile.txt, what has to be done next?

Voyager
Posts: 1,383
Registered: ‎06-24-2013

Re: Petalinux please check Kernel config and bootloader

[ Edited ]

Hey @jenny_august13,

 

what has to be done next?

I checked the device tree by converting it back to readable form with ...

mv newfile.txt devicetree.dtb
dtc -I dtb -O dts -o devicetree.dts devicetree.dtb

... and it looks good at first glance.

 

Still the error suggests that the devicetree cannot be found by the Linux kernel, which is probably related to a misconfiguration of the kernel itself (my guess is that maybe a fixed location for the device tree has been set).

 

Could you upload your Kernel .config file for further inspection?

 

Best,

Herbert

-------------- Yes, I do this for fun!