Jump to content
  • 0

increase linux kernel size on zybo z7-20 to 256 MB


mbritton

Question

Hello:

 

I'm trying to enable boost, cairo, pango, libusb1 and usbutils under petalinux-config, recompile the petalinux kernel, and boot a zybo z7-20 board.  

 

I find that the resulting image.ub file is of size 179792176 bytes.  This exceeds what I think is the default kernel size of 128MB.  For comparison, the pre-built image.ub file is of size 78889272.

 

I am able to program the SD card with the root filesystem and the BOOT.BIN, boot.scr, and image.ub files from the pre-built image and boot the zybo board.

 

When I attempt to repeat this procedure using the version built with the packages I've enabled, I receive a kernel panic warning, the tail of which is appended below.  I assume this arises from the image.ub exceeding 128MB, but I'm not sure.

 

After searching the web, I tried modifying project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg to

CONFIG_SYS_CONFIG_NAME="platform-top"
CONFIG_BOOT_SCRIPT_OFFSET=0x9C0000
CONFIG_SYS_BOOTM_LEN=0x10000000

and project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h to

#include <configs/zynq-common.h>
#define CONFIG_SYS_BOOTM_LEN 0x10000000

 

This did not resolve the kernel panic. 

Can you pls suggest how to increase kernel size beyond 128 MB?

RAMDISK: Couldn't find valid RAM disk image starting at 0.
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
0100           16384 ram0 
 (driver?)
0101           16384 ram1 
 (driver?)
0102           16384 ram2 
 (driver?)
0103           16384 ram3 
 (driver?)
0104           16384 ram4 
 (driver?)
0105           16384 ram5 
 (driver?)
0106           16384 ram6 
 (driver?)
0107           16384 ram7 
 (driver?)
0108           16384 ram8 
 (driver?)
0109           16384 ram9 
 (driver?)
010a           16384 ram10 
 (driver?)
010b           16384 ram11 
 (driver?)
010c           16384 ram12 
 (driver?)
010d           16384 ram13 
 (driver?)
010e           16384 ram14 
 (driver?)
010f           16384 ram15 
 (driver?)
1f00           16384 mtdblock0 
 (driver?)
b300        61069312 mmcblk0 
 driver: mmcblk
  b301         1953792 mmcblk0p1 a9c90b46-01

  b302        59114496 mmcblk0p2 a9c90b46-02

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.15.19-xilinx-v2022.1 #1
Hardware name: Xilinx Zynq Platform
[<c010d090>] (unwind_backtrace) from [<c0108ee4>] (show_stack+0x10/0x14)
[<c0108ee4>] (show_stack) from [<c0727b90>] (dump_stack_lvl+0x40/0x4c)
[<c0727b90>] (dump_stack_lvl) from [<c010b680>] (do_handle_IPI+0x80/0x140)
[<c010b680>] (do_handle_IPI) from [<c010b754>] (ipi_handler+0x14/0x20)
[<c010b754>] (ipi_handler) from [<c015cdb4>] (handle_percpu_devid_irq+0x4c/0xe8)
[<c015cdb4>] (handle_percpu_devid_irq) from [<c0157d44>] (handle_irq_desc+0x24/0x34)
[<c0157d44>] (handle_irq_desc) from [<c01583c8>] (handle_domain_irq+0x40/0x54)
[<c01583c8>] (handle_domain_irq) from [<c0360a68>] (gic_handle_irq+0x68/0x78)
[<c0360a68>] (gic_handle_irq) from [<c0100afc>] (__irq_svc+0x5c/0x90)
Exception stack(0xc0c01ed8 to 0xc0c01f20)
1ec0:                                                       00000000 00000003
1ee0: 2458b000 e50cc540 e50cb878 6250c668 00000003 00000000 00000000 c1268da0
1f00: 621dfcfe 00000000 00000015 c0c01f28 c058c09c c058c0c0 60000013 ffffffff
[<c0100afc>] (__irq_svc) from [<c058c0c0>] (cpuidle_enter_state+0x110/0x27c)
[<c058c0c0>] (cpuidle_enter_state) from [<c058c268>] (cpuidle_enter+0x28/0x38)
[<c058c268>] (cpuidle_enter) from [<c014071c>] (do_idle+0x23c/0x264)
[<c014071c>] (do_idle) from [<c01408b4>] (cpu_startup_entry+0x18/0x1c)
[<c01408b4>] (cpu_startup_entry) from [<c0b00e20>] (start_kernel+0x504/0x5d4)
[<c0b00e20>] (start_kernel) from [<00000000>] (0x0)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi @mbritton,

I've reached out to another engineer more familiar with our Petalinux material since it sounds like you already made the recommended size changes to the bsp.cfg mentioned by the Xilinx documentation here: https://docs.xilinx.com/r/en-US/ug1144-petalinux-tools-reference-guide/Steps-for-Managing-Image-Size.

Thanks,
JColvin

Link to comment
Share on other sites

  • 0

JColvin:

 

Thank you for your note.  I think that I have modified the bsp.cfg file according to the link you sent.  I also modified platform-top.h based on another piece of documentation.  Not sure if this was necessary/advisable.

 

I will await word from your Petalinux engineer and follow any advice they can offer.

 

Many thanks

Matthew

Link to comment
Share on other sites

  • 0

It appears that `bsp.conf` is not included anywhere. However  CONFIG_SYS_BOOTM_LEN  is defined in zynq-common.h to (60*1024*1024) so if you need change the value you need to redefine it after including zynq-common.h in platform-top.h

Link to comment
Share on other sites

  • 0

Another solution is to make an ext4 partiton on the card and place the rootfs there. This way you are no longer constrained by the size of the RAM available on the board.

https://docs.xilinx.com/r/2022.1-English/ug1144-petalinux-tools-reference-guide/Configuring-SD-Card-ext-File-System-Boot

Make sure to select corresponding version of this User Guide for your petalinux version (in this case 2022.1

Link to comment
Share on other sites

  • 0

Thank you for your note. 

I was already preparing the SD card as described in the manual:

image.png.e16a9ec04d408443650e3b37a3355a52.png

In the test I originally posted, I had followed the procedure in your first response:

On 3/5/2023 at 10:18 AM, mbritton said:

After searching the web, I tried modifying project-spec/meta-user/recipes-bsp/u-boot/files/bsp.cfg to

CONFIG_SYS_CONFIG_NAME="platform-top"
CONFIG_BOOT_SCRIPT_OFFSET=0x9C0000
CONFIG_SYS_BOOTM_LEN=0x10000000

and project-spec/meta-user/recipes-bsp/u-boot/files/platform-top.h to

#include <configs/zynq-common.h>
#define CONFIG_SYS_BOOTM_LEN 0x10000000

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...