Please help me about the default rootfs
Hello everyone: I am building a small embedded linux system right now. I confused that why the default rootfs must has a dev/console node. I have made a experiment as follow: 1st, configure the kernel(2.6.32) to support the initramfs and initrd, and set the source of the initramfs to a directory which only has a root node. 2nd, configure the kernel to support the root file system on nfs, and rebuild the kernel. I have created all necessary files and directories in the directory exported by the nfs server. 3rd, set the appropriate boot parameter, and boot my kernel. The result is, the kernel can successfully mount the root file system, but the /sbin/init program can not print any information to me. My sbin/init program is just a hello world program which only print some greeting information.There is a dev/console device node in the nfs exported directory. But if i set the source of the initramfs to empty, and redo my experiment from the 2nd step,everything will be ok. So, i think there must be a “dev/console” node in the rootfs. The real root file system already has a dev/console node, why default rootfs must have a dev/console node. Please help me. Best regards, Ren jun Qu ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Is there a way to build a cross reference with kernel file
Hello Jimmy, On Mon, Oct 24, 2011 at 5:00 PM, Jimmy Pan dsp...@gmail.com wrote: It seems we can use ctags, while, I don't really know how to implement it. I don't want to use the online cross reference every time... Thanks. Emacs + etags + cscope is for my the best approach to navigate the kernel. A few months ago I wrote a blog post about this, you could take a look: http://martinezjavier.blogspot.com/2011/07/emacs-configuration-for-linux-kernel.html Hope it helps, -- Javier Martínez Canillas (+34) 682 39 81 69 Barcelona, Spain ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Is there a tool which can generate a small and simple source tree after config?
On Sun, Oct 23, 2011 at 6:29 PM, jiangtao.jit jiangtao@gmail.com wrote: Hi: Hi jiangtao, While reading the kernel code 1. the huge amount of files make me scared there are too many alike functions in different files sometimes I can't figure out which one was really compiled 2. too many macros in the definition of a struct or functions declaration confused me a lot I tried to follow the generated file autoconf.h to guess the final face but it's really a difficult thing Is there a tool which can generate a small and simple source tree after config? not pre-processor Not that I'm aware of. just generate a small source tree contains the files and dirs which really will be compiled and no macros like CONFIG_SMP etc. according to the configuration or some other way to understand the architecture of the final working source tree? The Linux kernel is a very complex beast yet it is highly modularized. I recommend you to focus on the specific subsystem that you need to work and don't worry about the rest. To know if a specific file is included in your kernel I usually do this (it works for me but I'm not sure if is the right way to do it): For example if I want to know if the driver to support nand memories on ARM OMAP platforms is included in my kernel. 1- Find the file that implements the driver (drivers/mtd/nand/omap2.c) 2- See which Kconfig symbol determines its compilation: $ fgrep omap2 drivers/mtd/nand/Makefile obj-$(CONFIG_MTD_NAND_OMAP2)+= omap2.o 3- Look if that symbol is included in my config file: $ fgrep MTD_NAND_OMAP2 .config CONFIG_MTD_NAND_OMAP2=y Then I know that my kernels includes that file. Hope it helps, -- Javier Martínez Canillas (+34) 682 39 81 69 Barcelona, Spain ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux 0.02 version download
He's probably doing os dev and wants something simple to learn. Stick with 0.01 as 0.02 source is lost. Sad face. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux 0.02 version download
Le 25/10/2011 09:46, Javier Martinez Canillas a écrit : On Tue, Oct 25, 2011 at 9:36 AM, bobilikepie...@live.com wrote: He's probably doing os dev and wants something simple to learn. Stick with 0.01 as 0.02 source is lost. Sad face. Yes I know, but I recommend either use a newer kernel or use an operating system that was written for teaching like: http://pdos.csail.mit.edu/6.828/2011/xv6.html I don't want to imagine how hard could be compiling a 0.01 kernel with GCC 4.5 and find a rootfs that is suitable for it. Best regards, Hello, I know it is in french(sorry), but you can also use : http://sos.enix.org/fr/PagePrincipale http://sos.enix.org/fr/SOSDownload#TOC_0_2_25 Which is a articles series published in a linux magazin in France. It becomes from boot to block-devices. Best regards, -- Christophe ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux 0.02 version download
On Tue, Oct 25, 2011 at 10:04:06AM +0200, Christophe Lucas wrote: Le 25/10/2011 09:46, Javier Martinez Canillas a écrit : On Tue, Oct 25, 2011 at 9:36 AM, bobilikepie...@live.com wrote: He's probably doing os dev and wants something simple to learn. Stick with 0.01 as 0.02 source is lost. Sad face. Yes I know, but I recommend either use a newer kernel or use an operating system that was written for teaching like: http://pdos.csail.mit.edu/6.828/2011/xv6.html I don't want to imagine how hard could be compiling a 0.01 kernel with GCC 4.5 and find a rootfs that is suitable for it. Hello, I know it is in french(sorry), but you can also use : http://sos.enix.org/fr/PagePrincipale http://sos.enix.org/fr/SOSDownload#TOC_0_2_25 Which is a articles series published in a linux magazin in France. It becomes from boot to block-devices. I found this: http://mirrors.kernel.org/oldlinux/Linux.old/kernel/ 0.00/ 20-Jan-2005 07:06 0.1x/ 04-May-2004 14:09 0.95/ 20-Mar-2004 13:10 0.96/ 20-Jan-2004 11:46 0.97/ 20-Jan-2004 11:46 0.98/ 20-Jan-2004 11:46 0.99/ 20-Jan-2004 11:46 1.00/ 20-Jan-2004 11:46 Historic/ 20-Mar-2003 22:38 0.02 lost. If you wanna start from oldlinux, 0.11 will be a good choice, and there is a book about this: http://mirrors.kernel.org/oldlinux/ -- Regards, Adam Lee -- E-mail: adam8...@gmail.com Website: http://www.adam8157.info -- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Fix procmail rule in ML wikipage
The procmail rule for netdev:Linux network development list has a typo. The condition should be as shown below: * ^X-Mailing-List:.*netdev@vger\.kernel\.org Regards, chandan r ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Workqueue and kernel panic on device disconnect
Hi, I'm trying to use a workqueue in a usb driver for polling the states of the device buttons. That works fine, but when I disconnect the device, the kernel sometimes explodes. The machine turns off immediately, without saving a backtrace (I will try to make a photo tomorrow) The code: static struct delayed_work poll_work; static const struct usb_device_id device_table[] = { {USB_DEVICE(0x1234, 0x5678)}, {} }; static void poll(struct work_struct *work) { schedule_delayed_work(poll_work, msecs_to_jiffies(100)); } MODULE_DEVICE_TABLE(usb, device_table); static int test_probe(struct usb_interface *intf, const struct usb_device_id *id) { INIT_DELAYED_WORK(poll_work, poll); schedule_delayed_work(poll_work, msecs_to_jiffies(100)); return 0; } static void test_disconnect(struct usb_interface *intf) { cancel_delayed_work_sync(poll_work); } static struct usb_driver test_driver = { .name = MODULE_NAME, .id_table = device_table, .probe = test_probe, .disconnect = test_disconnect, }; static int __init test_mod_init(void) { return usb_register(test_driver); } static void __exit test_mod_exit(void) { usb_deregister(test_driver); } module_init(test_mod_init); module_exit(test_mod_exit); What am I doing wrong ? Is there anything else I have to do in addition to calling cancel_delayed_work_sync() in the disconnect fcn ? Thanks, Frank Schaefer ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies