Jump to content
Responses from Digilent staff may be delayed during the USA Thanksgiving holiday ×
  • 0

Petalinux freezes at starting kernel when using sd card rootfs


adanowitz

Question

I followed all the guidelines on Digilent’s petalinux github to boot Linux  from sd on my z7-20. Unfortunately on startup it hangs at “starting kernel.” It booted just fine when I used boot from initramfs. How do I fix? I’m looking to buy about 20 of these for a new college class I’m teaching but that depends on getting Linux working 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Thanks - this solution worked for me. I had exactly the same issue trying to install Linux on a ZYBO Z7 ZYNC-7020 board,  working through the instructions in Petalinux-Zybo-Z7-20/README.md (Zybo Z7-20 Petalinux BSP Project).

I assume there is some documentation somewhere for the tools installed by the petalinux installer, but I have not yet found anything that mentions the '-x mrproper' build cleaning option, so I think this probably should be added to the above mentioned document. Don't know how anyone would get the SD rootfs section working without this step.

 

Link to comment
Share on other sites

If you run the rootfs config first without running a build before the rootfs config, it should build fine.

mrproper is mentioned in the following Petalinux docs from Xilinx:

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_1/ug1144-petalinux-tools-reference-guide.pdf

https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_1/ug1157-petalinux-tools-command-line-guide.pdf

Link to comment
Share on other sites

Thanks Vicentiu,

That had occured to me, without help I probably would have ended up reinstalling to try it. The Petalinux-Zybo-Z7-20/README.md file that I was following (as presumably would anyone trying to put Linux on a digilent board for the first time) makes no mention of the possibility of running petalinux-config (is that what you mean by 'rootfs config'?)  until a petalinux-build has already been performed, and I wasn't planning to deviate from a slavish step by step following of the instructions on my first attempt to get something running. So I still think  a small update to that file could save a lot of first timers from needing help immediately...  

Thanks also for the document links - they look very useful. I had not come across them yet. I am still trying to identify all the relevent documents and work out the best order in which to read them. I now have have a petalinux kernel booting to an ubuntu user land, which gives me what I need for developing Linux application software. Next step is to find the source for the PL bit file included in the petalinux build and to work out how to modify and build it and then add support for the additions into my linux kernel. 

I have the Petalinux readme mentioned earlier, the Zybo Z7 Board Reference Manual and the Zynq-7000 Technical Reference Manual. Pages 28-29 of the latter lists some other documentation resources. Plus the ZYBO Z7 schematics. Plus now the two petalinux documents. If there is any other important introductory document I should be looking at that is not in the list, please let me know.. I still also have a lot to read in this forum, so I had better not ask too many questions yet.

Regards,

DigbyT

Link to comment
Share on other sites

On 10/24/2019 at 12:30 AM, DigbyT said:

The Petalinux-Zybo-Z7-20/README.md file ... makes no mention of the possibility of running petalinux-config (is that what you mean by 'rootfs config'?)  until a petalinux-build has already been performed

Sorry, I meant petalinux-config, not rootfs.

Actually, petalinux-config is always run before petalinux-build, but I can see why you thought otherwise... the "Configure SD rootfs" heading is the same size as the previous ones and makes it look as a continuous flow.

The Configure SD rootfs section is an alternate configuration from the step that are before it.

I changed the heading size in the document to hopefully imply a break and added a note about running mrproper.

Let me know if it's more clear now.

Link to comment
Share on other sites

Hello, and welcome to the forum.

Sounds like you built an image with initramfs (which works fine), then you changed the config to rootfs and rebuilt the image. Is this correct?

If so, did you clean the build after changing the config to rootfs?

petalinux-build -x mrproper

Petalinux leaves some build artifacts behind that are incompatible if you change from initramfs to rootfs.

Doing a clean build resolves many issues in Petalinux.

Link to comment
Share on other sites

That looks much clearer with the 'alternate build' and note which follows it. 

I assume it is the section starting from the title 'Build the petalinux project'  which could have a  'default ram rootfs configuration'  subheading.

Regards,

Digby.

  

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...