Hi,
thanks for that info, but I think there's a misunderstanding. The kernel command line "init=" is only evaluated if the kernel boots without initrd or initramfs. Initramfs does always need /init (such as an initrd always needs /linuxrc) [1]. This is only relevant to the init system used after the root fs is mounted. This is supported by man 7 bootparam which says
'init=...' This sets the initial command to be executed by the kernel. If this is not set, or cannot be found, the kernel will try /sbin/init, then /etc/init, then /bin/init, then /bin/sh and panic if all of this fails.
I have also tested this behavior by running Genode on Linux with init=/genode/core which still resulted in the kernel loading /init from the initramfs.
Sorry for the slight off topic. If I have any mistakes in my thoughts please correct me.
Regards, Johannes
[1]: https://wiki.debian.org/initramfs
On 10/24/17 18:59, Nobody III wrote:
Also, you could use the kernel command line, e.g. "init=/genode/core".
On Tue, Oct 24, 2017 at 10:20 AM, Johannes Kliemann <Johannes.Kliemann@...250... mailto:Johannes.Kliemann@...250...> wrote:
Hi again, I fixed the file naming and I don't need to rename the files anymore (I forgot to prepend the correct directory in the cpio archive). With the cpio initramfs I chdir into /genode from the ROM session and correctly find the libraries. Yet the segfault and warning I described in the last mail still appear. To reproduce the problem with the current state, check out [1]. The build configuration is the same as in the last mail. Regards, Johannes [1]: https://github.com/jklmnn/genode/commit/2c899063f2bad1318bbde88f2472e017fc72be34 <https://github.com/jklmnn/genode/commit/2c899063f2bad1318bbde88f2472e017fc72be34> On 10/24/17 11:27, Johannes Kliemann wrote: Hi, while booting Genode directly on Linux I encountered the problem that Linux requires to call `/init` in the initramfs. Unfortunately Genode requires to call `core` which loads `init` so renaming core to init isn't enough. I renamed init to init2 core to init and called it with "label=init2" which works at first (core finds all ROM sessions) but then segfaults with "init2[45]: segfault at 7f11c473b128 ip 00007f11c4645f40 sp 00007ffc1c8c15f8 error 4 in ld.lib.so <http://ld.lib.so>[7f11c45c5000+95000]" and the warning "Warning: blocking canceled in entrypoint constructor". This warning was addressed on Linux before in [0] and fixed in ad2859b6b9dae96c48329eebc0a73527ba4deb9b. I have already included this patch. To boot Genode on Linux with this behaviour, checkout [1] and change "KERNEL_RUN_OPT(linux) := --include power_on/linux --include log/linux" to "KERNEL_RUN_OPT(linux) := $(QEMU_RUN_OPT)" in your etc/build.conf (with linux as kernel ofc). Beside renaming I also tried to make the ROM session chdir into a sub directory or to prepend this directory to the binary name. Neither of made Genode correctly find the binaries. I have to say that Linux is not booting into a real fs but is using a initramfs which consists of a cpio archive. What would be the way to go to either rename the binaries to a Linux compatible scheme or to change the library search to find its binaries in a cpio archive (both options should be changeable at build time to still use the current linux)? Regards, Johannes [0]: https://github.com/genodelabs/genode/issues/2521 <https://github.com/genodelabs/genode/issues/2521> [1]: https://github.com/jklmnn/genode/commit/ef4becffcfc4bfc4079ff411872023b0362f346c <https://github.com/jklmnn/genode/commit/ef4becffcfc4bfc4079ff411872023b0362f346c> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net <mailto:genode-main@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/genode-main <https://lists.sourceforge.net/lists/listinfo/genode-main> ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net <mailto:genode-main@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/genode-main <https://lists.sourceforge.net/lists/listinfo/genode-main>
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main