Struggle to Load the kernel

I have gotten uboot to attempt to load the kernel. :slight_smile:

At this point, depending on what I do, 1 of 2 things will happen.

  1. It hangs at uncompressing Linux … done, booting kernel.

  2. It trips the watchdog and continually resets the board.

Any ideas on where to start?

Are you loading the correct dtb, is the console= entry correct and points to a existing (serial) tty ?

Is there a chance you could show us your gadget source code ?

Ogra,

I am sorry for the long response. I have made major headway in this. For the problem above my bootargs ended up being the problem.

The kernel boots and I can see some logs. It hangs at waiting for root device/dev/disk/system-label/writable. What should this path be? Is it as named or is a generic label?

Thank you for your help.

It is the label ubuntu-image creates during image creation for the writable partition of the Image. The links in /dev/disk are created by udev, so make sure your kernel has proper udev support …

Has some hints about all the required kernel config options you need…

Ogra,

CONFIG_DEFAULT_SECURITY_APPARMOR
CONFIG_DEBUG_ROTA
CONFIG_DEBUG_SET_MODULE_RONX

These are the only options my kernel is missing, are any of these important to what was talked about above ^^ or can I go without them.

Thanks for the support

As a side note, should I be able to see my file system in my sd card?

Apparmor is absolutely essential and needs to be on the right version (see the link above, it also points to apparmor patchsets for older kernels), the other ones, being debug settings, not so much …

theoretically you should indeed see your filesystem from the initrd shell, but since the initrd scripts do not find the label it is likely there is some other issue here.

I got it to work without the above the CONFIG_DEFAULT_SECURITY_APPARMOR, mind you I
still had CONFIG_SECURITY_APPARMOR enabled.

These were my problems,

my initrd.img file was not placed directly after the kernel in ram, I had it after the device tree.

I downloaded the wrong core image.

The network configuration keeps reseting but at least I am in.

Can I get into the board without wifi access? I am thinking no.

Thanks for your help ogra, this was a cool project that help me get involved with embedded linux.

you can, by creating a system-user assertion that you put on a USB stick which you plug in during/before boot (assuming your board has a USB port indeed :slight_smile: ):

1 Like