warped
Posts: 5
Joined: Tue Jun 12, 2018 8:30 am

minimal aarch64 kernel config to U-boot without initrd?

Tue Jun 12, 2018 8:47 am

Hi !

I'm recompiling my project (https://github.com/warpme/minimyth2) to rpi3 (aarch64).
I have all components compiled and now I'm trying to boot it on rpi3.

I'm using u-boot /boot + script from arm archlinux with replaced kernel image (Image.gz). Archlinux initrd is removed.
rootfs content from my compilation is placed on 2nd SD card ext4 partition.
So essentially I want to boot from kernel image and straight mount ext4 rootfs from 2nd SD card partition.

kernel boots - but I have issue with execution on mounted rootfs:

Code: Select all

Starting init: /sbin/init exists but couldn’t execute it (error -13)
Starting init: /sbin/sh exists but couldn’t execute it (error -13)
Summarising:

1\at rootfs mounting phase kernel says

Code: Select all

EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
2\ kernel is able to find init (and fallback to sh due failed init execution) as kernel says:

Code: Select all

Starting init: /sbin/init exists but couldn't execute it (error -13)
Starting init: /sbin/sh exists but couldn’t execute it (error -13)
3\adding

Code: Select all

rootflags=exec
to kernel command line cause mount of root fails. (this IMHO is not needed as default put options have exec rights...)

For me it seems my kernel config is somehow broken as it is able to mount but can't execute on it.

Attaching my kernel cfg http://warped.inet2.org/kernel-config.tar.bz2 (pls look at linux-4.16.13-arm64-armv8.config)

Can somebody can look on it and verify is such config enough to mount rootfs without any initrd? (to confirm: I want mount SD card ext4 rootfs straight from kernel image).

Alternatively: can somebody provide me minimal aarch64 kernel config enough to U-boot rpi3 with generic 4.16 kernel with rootfs on SD ext4 partition and without any initrd?

(PS: My kernel config is based on archlinux aarch64 multiplatform kernel and is 99.9% equal to archlinux arm)

Really appreciate any help/pointers to move forward

warped
Posts: 5
Joined: Tue Jun 12, 2018 8:30 am

Re: minimal aarch64 kernel config to U-boot without initrd?

Thu Jun 14, 2018 7:57 pm

It looks like issue was in glibc. I build with 2.17 and despite it is marketed as "first glibc supporting aarch64" - it not works for me. Upgrading glibc to 2.27 solves issue :-)
Topic can be closed.

Return to “General programming discussion”

Who is online

Users browsing this forum: No registered users and 11 guests