Re: sys_open() return -ENXIO when booting kernel

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


> > I trace kernel and find tty->driver->open calls uart_open() function.
> > And I think uart_get() give ENXIO finally.
> >  
> > I want to know why ENXIO return.  May be rootfs has no the device opend?
> 
> Because there was no UART registered for that, or there was and it has 
> been subsequently marked for removal.
> 
> (If you want better help, please publish your source code.)
> 
> OK.
> 
> The follow is my uart driver source code. And I have not modify the 
> other kernel file, for example, main.c, tty_io.c, serial_core.c, open.c,
etc.
> Please check it.
>
> static struct device_driver vdavinci_driver = {
> 	.name		= "vdavinci_uart",
> 	.bus		= &platform_bus_type,

Do you have a corresponding platform device registered?


I remove       static struct device_driver vdavinci_driver        definition
and modify  my uart init and exit function follow as clps711x .c uart
driver.  sys_open() return 0 now.
Thanks a lot!

But I have another prolbem. It is initramfs isuue.

I build initramfs into kernel image now. And the initramfs include busybox1.
1.3, uclibc0.9.27, and an init script.

The content of init script as follow:

#!/bin/sh

mount -t proc /proc /proc
mount -t sysfs none /sys
mkdir /dev/shm
mkrootdev /dev/root
umount /sys
exec switch_root/sysroot


Now,  kernel run to run_init_process(execute_command) in init/mian.c. It
occurs abort exception. I step trace it and find the excute flow as follow:


run_init_process( )=>execve( )=>do_execve( )=>serach_binary_handler(
)=>load_elf_binary( )=>padzero( )=>clear_user( )=>__arch_clear_user( )

I am sure abort exception occurs in __arch_clear_user() function. Why the
occurs here?


-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter