[okl4-developer] How to configure correctly eth0 in oklinux using udhcp ?
Geoffrey Lee
glee at ok-labs.com
Wed Nov 26 02:03:09 EST 2008
On Tue, Nov 25, 2008 at 12:37:40PM +0100, Hugues Balp wrote:
>
> Hi Geoffrey,
>
> thanks to you I have compiled successfully OKL4-3.0 with oklinux for
> versatile platform with the command:
>
> tools/build.py machine=versatile project=linux test_libs=posix wombat=true kdb_serial=True TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain
>
> Now the okl4 micro-kernel so as the oklinux kernel boot successully in
> qemu, but the configuration of eth0 fails
>
Hugues - The default root filesystem is setup so that if it detects
that a ethernet interface is available it will try and obtain
an ip address for it via dhcp. Off the top of my head I don't
recall specifically anything that you have to configure
for udhcp. You will most probably want to setup qemu with ethernet
with some sort of tap interface on the host, for further information
you may refer to the qemu documentation.
-gl
> because simply I don't know how to configure properly my host and
> oklinux to get eth0 work normally.
>
> I join to this mail the ip configuration of my local host eth0 interface
> so as the session log within oklinux...
>
> Everything seems ok except eth0... and then the connection to the console...
>
> What I don't understand is to see oklinux trying to communicate with the
> IP address 10.0.2.15 while
>
> no trace of such kind of address is present within the oklinux source
> code...
>
> The only thing I have found is a default configuration of the udhcp
> client within the rcs start up script
>
> locate in repository:
>
> $OKL4_ROOT_DIR/linux/rootfs-2.6.24-v2/etc/init.d/rcs.
>
> In this default configuration the default IP address is 10.0.0.2 and the
> gateway 10.0.0.1....
>
> So I am not sure that changing this default configuration will change
> the udhcp client configuration...
>
> I have also installed a udhcp server on my host but don't know how to
> configure it...
>
> The defaults values are the same as the ones I see in file
>
> $OKL4_ROOT_DIR/apps/busybox/examples/udhcp/udhcpd.conf.
>
> To sum up I would appreciate your help for the correct configuration of
> udhcp...
>
> Thanks a lot,
>
> Hugues Balp.
>
>
>
> Geoffrey Lee wrote:
>> On Wed, Nov 19, 2008 at 04:38:01PM +0100, Hugues Balp wrote:
>>
>>> Thanks for your remark ,
>>>
>>> In fact I have also tried with other tool chains:
>>>
>>> 1) with a gcc-3.4.5-glibc-2.3.6.arm-softfloat-linux toolchain which
>>> doesn't support eabi and nptl
>>> and I got the same error on rootfs-2.6.24-v2....
>>>
>>
>> The kernel needs to be compiled with the old non EABI toolchain, while
>> the rest of userland needs to be compiled with the
>> EABI toolchain.
>>
>> To do that you state TOOLCHAIN=gnu_arm_eabi_toolchain
>> pistachio.TOOLCHAIN=gnu_arm_toolchain.
>>
>> -gl
>>
>>
>>> It was not possible to patch it with glibc-port-2.3.6 because the arm
>>> and nptl support was not included
>>> in such old glibc-port version...
>>>
>>> 2) I have also tried to apply a patch on crosstool-0.34 from montavista
>>> to compile a gcc-4.1.1-glibc-2.5 gnueabi + nptl arm tool chain but
>>> without success.
>>> ( here is the URL of this patch:
>>> http://sources.redhat.com/ml/crossgcc/2006-12/msg00076.html )
>>>
>>> 3) with a gcc-4.2.4-glibc-2.7 gnueabi + nptl arm toolchain
>>>
>>> but some warning stop the compilation in case the option -Werror is
>>> used with arm-...-gcc.
>>>
>>> when I comment this option, several warning are raised such as
>>>
>>> pistachio/src/interrupt.cc:217: warning: type-punning to incomplete
>>> type might break strict-aliasing rules
>>> arch/arm/pistachio/kdb/tlb.cc:325: warning: deprecated conversion
>>> from string constant to 'char*'
>>> build/pistachio/include/kernel/kdb/console.h:98: warning: conflicting
>>> types for built-in function 'putc'
>>>
>>> and the compilation process stops with the following error:
>>>
>>>
>>
>>> /opt/crosstool/gcc-4.2.4-glibc-2.7/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_dvmd_lnx.o):
>>> In function `__div0':
>>>
>>
>>> /scratch/philipo/crosstool-0.43/src/gcc-4.2.4/gcc/config/arm/lib1funcs.asm:1000:
>>> undefined reference to `raise'
>>>
>>
>>> /opt/crosstool/gcc-4.2.4-glibc-2.7/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_divdi3.o):(.ARM.exidx+0x0):
>>> undefined reference to `__aeabi_unwind_cpp_pr0'
>>>
>>
>>> /opt/crosstool/gcc-4.2.4-glibc-2.7/arm-unknown-linux-gnueabi/bin/../lib/gcc/arm-unknown-linux-gnueabi/4.2.4/libgcc.a(_udivdi3.o):(.ARM.exidx+0x0):
>>> undefined reference to `__aeabi_unwind_cpp_pr0'
>>> scons: *** [build/pistachio/bin/l4kernel] Error 1
>>> scons: building terminated because of errors.
>>>
>>> Can you please explicit to me the toolchain we have to use to be able
>>> to run the POSIX test suite ?
>>> Do you use another process to build the crosstool chain ?
>>>
>>> Thanks in advance for your answer,
>>>
>>> Hugues Balp.
>>>
>>> Geoffrey Lee wrote:
>>>
>>>> On Tue, Nov 18, 2008 at 10:59:23PM +0100, Hugues Balp wrote:
>>>>
>>>>> Dear all,
>>>>>
>>>>> I try to build the test suite related to the OKLinux POSIX
>>>>> support located in repository $OKL4_ROOT_DIR/libs/posix/test.
>>>>>
>>>>> The build command I use is the following:
>>>>>
>>>>> "tools/build.py machine=versatile project=linux test_libs=posix
>>>>> wombat=true kdb_serial=True"
>>>>>
>>>>> where the gnu_arm_linux crosstool chain points to
>>>>> /opt/crosstool/gcc-3.4.5-glibc-2.3.6/arm-softfloat-linux-gnu.
>>>>>
>>>> You are building with the wrong toolchain. The Linux userland that
>>>> is shipped requires an EABI toolchain with an EABI-enabled glibc
>>>> and dynamic loader.
>>>>
>>>> -gl
>>>>
>>>>> The beginning of the compilation process is ok but an error occur
>>>>> when scons looks for the foolowing shared library:
>>>>>
>>>>> scons: building `build/linux/install/lib/ld-linux.so.3' because
>>>>> it doesn't exist
>>>>> scons: *** Source `linux/rootfs-2.6.24-v2/ld-linux.so.3' not
>>>>> found, needed by target `build/linux/install/lib/ld-linux.so.3'.
>>>>> Stop.
>>>>> scons: building terminated because of errors.
>>>>>
>>>>> I tried to compile the oklinux root file system separately with
>>>>> the SConscript included inside the repository
>>>>> linux/rootfs-2.6.24-v2
>>>>> but it requires an SConsctruct file to work properly and I don't see it...
>>>>>
>>>>> Do you have any idea of what is happening ?
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Hugues Balp.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Developer mailing list
>>>>> Developer at okl4.org
>>>>> https://lists.okl4.org/mailman/listinfo/developer
>>>>>
>>>>>
>>>>
>>>
>>
>>
>
> eth0 Link encap:Ethernet HWaddr 00:1c:23:3e:4f:5a
> inet adr:10.222.144.173 Bcast:10.222.145.255 Masque:255.255.254.0
> adr inet6: fe80::21c:23ff:fe3e:4f5a/64 Scope:Lien
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Packets re??us:104382 erreurs:0 :0 overruns:0 frame:0
> TX packets:108439 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 lg file transmission:1000
> Octets re??us:64505217 (64.5 MB) Octets transmis:116096880 (116.0 MB)
> Interruption:17
>
>
> [1m[33mOKL4 - (provider: Open Kernel Labs) built on Nov 24 2008 23:57:36 using gcc version 3.4.4.[0m
> Linux version 2.6.24-arm (hugues at TRTP8051) (gcc version 4.2.4) #1 Tue Nov 25 00:01:33 CET 2008
> Kernel memory ranges:
> 0: 0x80e00000-0x82200000 (5120 pages)
> total 5120 pages
> Built 6 zonelists in Zone order, mobility grouping on. Total pages: 6096
> Kernel command line: vmlinux igms_name=ramdisk root=/dev/igms0 console=ttyAMA0,115200
> PID hash table entries: 128 (order: 7, 512 bytes)
> Console: colour dummy device 80x30
> Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
> Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
> Memory: 20232k/24600k available (1460k kernel code, 4344k reserved, 392k data, 68k init)
> Mount-cache hash table entries: 512
> net_namespace: 64 bytes
> NET: Registered protocol family 16
> NET: Registered protocol family 2
> Time: timer3 clocksource has been installed.
> Switched to NOHz mode on CPU #0
> IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
> TCP established hash table entries: 1024 (order: 1, 8192 bytes)
> TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
> TCP: Hash tables configured (established 1024 bind 1024)
> TCP reno registered
> io scheduler noop registered
> io scheduler anticipatory registered
> io scheduler deadline registered
> io scheduler cfq registered (default)
> CLCD: unknown LCD panel ID 0x00001000, using VGA
> CLCD: Versatile hardware, VGA display
> Clock CLCDCLK: setting VCO reg params: S=1 R=99 V=98
> Console: switching to colour frame buffer device 80x30
> Serial: AMBA PL011 UART driver
> dev:f1: ttyAMA0 at MMIO 0x80201000 (irq = 12) is a AMBA/PL011
> console [ttyAMA0] enabled
> smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico at cam.org>
> eth0: SMC91C11xFD (rev 1) at 80210000 IRQ 25 [nowait]
> eth0: Ethernet addr: 52:54:00:12:34:56
> mice: PS/2 mouse device common for all mice
> input: AT Raw Set 2 keyboard as /class/input/input0
> igms0: unknown partition table
> Iguana ramdisk driver initialized
> TCP cubic registered
> NET: Registered protocol family 1
> NET: Registered protocol family 17
> input: ImExPS/2 Generic Explorer Mouse as /class/input/input1
> VFS: Mounted root (ext2 filesystem) readonly.
> Linux user startup!
> Mounted proc on /proc
> Mounted sysfs on /sys
> Mounted devpts on /dev/pts
> mount: Mounting /dev/ram1 on /okl4 failed: No such device
> no IDE disk image available
> Configured net lo device
> PING 127.0.0.1 (127.0.0.1): 56 data bytes
> 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=6.4 ms
> 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=1.0 ms
>
> --- 127.0.0.1 ping statistics ---
> 2 packets transmitted, 2 packets received, 0% packet loss
> round-trip min/avg/max = 1.0/3.7/6.4 ms
> eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
> BROADCAST MULTICAST MTU:1500 Metric:1
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:1000
> RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
> Interrupt:25 DMA chan:ff
>
> eth0: link up
> configuring network for Linux wombat 2.6.24-arm #1 Tue Nov 25 00:01:33 CET 2008 arm unknown
> info, udhcpc (v0.9.9-pre) started
> debug, Sending discover...
> debug, Sending select for 10.0.2.15...
> info, Lease of 10.0.2.15 obtained, lease time 86400
> deleting routers
> route: SIOC[ADD|DEL]RT: No such process
> adding dns 10.0.2.3
> net eth0 device configuration failed
>
>
> *And We're Done!*
>
>
> ^D^D^D...
> Please press Enter to activate this console.
>
> BusyBox v1.00 (2008.11.24-23:01+0000) Built-in shell (ash)
> Enter 'help' for a list of built-in commands.
>
> -sh: can't access tty; job control turned off
> / #
--
More information about the Developer
mailing list