Re: Custom compiled kernel hangs on spawning /sbin/init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



El 15/03/12 12:49, Alex Villací­s Lasso escribió:
I am having trouble booting a Fedora-15 ARM userspace on a pico-SAM9G45 with a custom-compiled kernel.

http://arm.mini-box.com/index.php?title=Main_Page

I am able to cross-compile a vendor-supplied kernel source with support for fbcon to see what I am doing. The boot microSD has a FAT boot partition with an uImage and a ext3 partition with Fedora 15. The ext3 filesystem previously booted correctly on a qemu-system-arm emulation with -M versatilepb . On the LCD I see the penguin logo and the ordinary kernel messages, but stops right after "Freeing init memory: 140K" Then I have no output from userspace.

I can plug in an USB keyboard and I see kernel messages. I can even scroll up and down on the LCD output using the USB kernel. That shows that the kernel is not dead. So I suspect I am having trouble running /sbin/init .However, I see no output that could point me to what exactly is wrong. Nothing like a SIGSEGV or an incompatibility message. The root filesystem is being mounted, because I see "VFS: Mounted root (ext3 filesystem) on device 179:2"

I have tried adding initcall_debug to the kernel command line but it has no effect in my case.

The kernel is being booted without an initrd. At first I thought it could be the issue, but I tried replicating the problem on a x86 PC (removing the initrd directive from GRUB and adding root=/dev/sdb2) and the system does boot to completion.

I also though maybe the Fedora 15 init requires /dev/ to be populated, so I checked. It has /dev/null , /dev/console, and /dev/zero. I tried adding /dev/mmcblk0, /dev/mmcblk0p1 and /dev/mmcblk0p2 but it also has no effect.

I searched in Google and found a post that described a problem similar to my own, and resolved it to an OABI/EABI incompatibility. However, the .config I used for the kernel has CONFIG_AEABI=y and CONFIG_OABI_COMPAT=y , just the same as config-2.6.41.6-1.fc15.armv5tel being used to compare.

The config file used to compile the kernel is attached.
I tried compiling the following program statically in the qemu-system-arm emulation:

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int main(void)
{
    FILE * f;

    f = fopen("/tmp/test-static.txt", "wt");
    if (f != NULL) {
        fputs("Esto es una prueba\n", f);
        fclose(f);
    }
    sync();

    puts("Hola mundo");
    fflush(stdout);

    return 0;
}

I then pointed the init parameter to the resulting executable. When booting, I do *not* see the string being output with puts(), but after examining the filesystem, I do see the test file /tmp/test-static.txt with the expected content. So somehow the program does not have access to the console, but does have access to the filesystem. I suppose the initrd has the same issue.
_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux