|
|
|
Re: Problem with init call | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
Congratulation!
2009/3/18 Zachár Balázs <bzachar@xxxxxxxxxxxxxx>:>>> Wan ZongShun wrote:>> 2009/3/18 Zachár Balázs <bzachar@xxxxxxxxxxxxxx>:>>>>>> Wan ZongShun wrote:>>>>> On Busybox mail list I got some good Idea:>>>>> 1. I change the test init to this (to trigger out the std problem):>>>>>>>>>> #include <stdio.h>>>>>>>>>>> int main()>>>>> {>>>>> write(1, "Hello world!\n", 12);>>>>> while(1);>>>>> return 0;>>>>> }>>>>> But It still not work if I compiled it with the new cross-toolchain...>>>>>>>>>> 2. I compile this code with my old (orig) toolchain to static linked, copy it to /sbin/init and boot with the new system (new kernel, new rootfs with only /dev/console, /dev/ttyS1)>>>>> And it works! :(>>>>>>>>>> It looks like my new cross-toolchain can compile a working kernel but can't a Hello World!? Very strange!!! :(>>>>> Is this normal?>>>> Did you compile this code with new toolchain to static linked?>>>>>>> Yes. I used this command:>>> devel:/tmp# arm-linux-gnueabi-gcc -g -static -O2 -Wall -o test_init test_init.c>>>> Your new gcc support EABI, so your application should be EABI version>> 4, Please check your kernel configure ,if the EABI app support was>> selected?>> This was the problem!> I forgot to turn on the CONFIG_AEABI in my new kernel!> Now it works properly!>> Many thanks for the capable help!>> Regards,> Balazs Zachar>>>>>>>>>>>>>> devel:~# ll /boardnfs/root/dev/ttyS1>>>>>>>>> crw-rw---- 1 root dialout 4, 65 2009-02-20 11:10 /boardnfs/root/dev/ttyS1>>>>>>>>>>>>>>>>>> I think the UART driver is working properly, because if I use the "old" (orig) rootfilesystem to boot up with the new kernel, it works...>>>>>>>>>>>>>>>>>> In my new rootfilesystem there is only /sbin/init (Hello world) and /dev/ttyS1 and the directory structure, should I use anything else to boot up the hello world init??>>>>>>>> re: You must be put console file in your new /boardnfs/root/dev/, you>>>>>>>> can make it by "mknod console c 5 1".>>>>>>> I make the console file (copy it from the old rootfs with cp -a) but still get the error message (but the warning : Warning: unable to open an initial console. perhaps disappeared)>>>>>>>>>>>>>>> Using busybox? If so,you can add /etc/init.d/rcS and boot your>>>>>>>> first app program by rcS.>>>>>>> Yes, I want to use Busybox but it didn't work too(same error like with "Hello World!" init), thats why I try the Hello World:>>>>>>> http://www.busybox.net/FAQ.html#init>>>>>> It is easy to build busybox for linux,Why it don't work.Please check>>>>>> your configure or static lib or shared ...>>>>>>>>>>>> if necessary.I can send my busybox-1.9.1 source code to you, it works>>>>>> well at linux-2.6.29 for my ARM9(w90p910 EVB) .>>>>>>>>>>>>>>>>>>>>>
-- embedded forumhttp://mcuos.com
-------------------------------------------------------------------List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-armFAQ: http://www.arm.linux.org.uk/mailinglists/faq.phpEtiquette: 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]
![]() |
![]() |