kernel debugging

NoiseEHC NoiseEHC at freemail.hu
Sun Aug 2 05:52:48 EDT 2009


Hi!

Recently I have started porting Android-x86 to the XO-1 and 
unfortunately hit a wall. I know that it can be done since somebody 
already booted it but the hard drive crashed in his laptop and he had no 
backups... The porting progresses a little bit slowly because I know 
almost nothing about Linux but at least it is some motivation to learn it.

My problem is that I cannot debug the kernel nor see its debug output 
because the XO-1 does not have a standard serial port.

1.
I have read this page:
http://wiki.laptop.org/go/Serial_adapters
What is not clear to me is whether I should buy the converter which is 
on the picture (I did not get one in my XO's box) or shall I fabricate 
one or shall I request one from OLPC? Will it be good for XO-1.5?
What is another option would be buying one of these:
http://wiki.laptop.org/go/Serial_adapters#Third_Party_Adapters
What is not clear that how will I fabricate a cable which connects those 
adapters to the XO?

2.
I looked into using the USB port with gadget support. I am attaching the 
kernel config if you are interested in. I have compiled amd5536udc.ko, 
g_serial.ko and g_android.ko as modules (so I can look at error messages 
while doing an insmod). (Kernel 2.6.29, g_android.ko would enable 
debugging via USB with the adb - Android debugging bridge.)
If I do not insmod amd5536udc.ko, then both g_android.ko and g_serial.ko 
bark me about missing usb_gadget_register_driver symbol.
If I do insmod amd5536udc.ko then both modules bark about "(No such 
device)" error.
What is not clear whether this amd5536udc.ko is usable at all because I 
am booting the XO-1 from an USB stick so can the AMD southbridge be used 
for both host and device at the same time?
What device does it need?

3.
It happened that one of the hardware in my room had a FTDI usb to serial 
converted. I pluggeg it into the XO-1 and insmod usbserial.ko then 
insmod ftdi_sio.ko and both worked. However I do not have a 
"/dev/ttyUSB..." entry. It can be that because the system does not run 
udev or similar it does not automatically create /dev entries? If so 
then how can I do this? (I see that the init srcript uses "mdev -s") 
Another issue is that this serial stuff will be loaded much later than 
kernel start so if I define "console=/dev/ttyUSB0" in the kernel 
parameters and the device will be created later then will Linux pick up 
the device at that time?

4.
Of course the 3. point will not work that easily since I have only one 
serial cable and that has a plug and a receiver so it cannot link the 
two receivers on the ends. Will I have to use a null-modem cable or 
what? It also turned out that my new computer does not even have a 
serial port outside so I will have to buy a serial adapter anyway.
What would be much simpler if I could just somehow make the USB 
connection work. What I think that there is no standard cable which has 
2 Type A plugs at both ends but it seems that if I tear down the 
surrounding metal ring from the Type A receiver then it can be plugged 
into the Type A receiver on the XO-1 and it has the correct wires in the 
correct position (since the connector has to be flipped to fit into the 
receiver). Is it correct?


Can somebody help me with any solution? (One would be enough...)
I have attached the files if somebody wants to look at them.
I use "make iso_img TARGET_PRODUCT=xo1 TARGET_BUILD_TYPE=debug" to build 
files then copy from out/debug/target/product/xo1 the files initrd.img, 
ramdisk.img, kernel and system.img into /boot in the usb drive (also 
olpc.fth). It uses the source from:
http://code.google.com/p/android-x86/wiki/GetSourceCode

-------------- next part --------------
A non-text attachment was scrubbed...
Name: android-xo1.tar.gz
Type: application/gzip
Size: 23305 bytes
Desc: not available
URL: <http://lists.laptop.org/pipermail/devel/attachments/20090802/57f7acb3/attachment.bin>


More information about the Devel mailing list