tslib not creating device - linux

I am trying to embed tslib on an ARM system, in order to use a touchscreen device ; I already installed it successfully but unfortunately I can't retrieve all my notes to do it again. x)
I cross-compiled the libraries files, and I put them into /usr/lib ; I have created the conf file /etc/ts.conf and I have exported the good environment variables :
export TSLIB_TSDEVICE="/dev/event2"
export TSLIB_CONFFILE="/etc/ts.conf"
Here is my problem : tslib doesn't seem to create the event device when I plug the device in. And here is the result of *ts_calibrate* : ts_open: No such file or directory
I think it tries to open /dev/event2 which doesn't exist because it has not been created by tslib.
Any ideas ?
Thanks

What kind of kernel + userspace do you have ? device file creation is usually
the job of kernel hotplug + udev or mdev.
In any case, tslib is not supposed to create device file. You have two options :
creating the device manually, provided your busybox contains the mknod utility :
mknod event2 c 13 66
where 66 is the minor number, it should be one more than the minor number for event1.
launching mdev -s and see if the content of your /dev directory change
find out why the vent device is not detected / created : please post the output of uname -a, and dmesg after boot.

Do you need to mknod the /dev/event2 yourself? Are you positive your library makes the device node?

Actually mknod is not available on our busybox. Nothing changed when launching mdev -s, I already tryed that. :/
Here is the result of uname : Linux MYNAME 2.6.24.4 #3 Fri Dec 2 16:54:41 CET 2011 armv4l unknown (MYNAME is just the system name, I replaced it for privacy reason ;) )
And dmesg :
<6>usb 1-1.3: new high speed USB device using str8100-ehci and address 23
<6>usb 1-1.3: configuration #1 chosen from 1 choice
<6>hub 1-1.3:1.0: USB hub found
<6>hub 1-1.3:1.0: 4 ports detected
<6>usb 1-1.3.2: new high speed USB device using str8100-ehci and address 24
<6>usb 1-1.3.2: configuration #1 chosen from 1 choice
<6>udlfb: DisplayLink AT-7 - serial #200694
<6>udlfb: vid_17e9&pid_02fc&rev_0104 driver's dlfb_data struct at c1031000
<6>udlfb: console enable=0
<6>udlfb: fb_defio enable=0
<6>udlfb: vendor descriptor length:23 data:23 5f 01 0021 00 04 04 07 00 01
<4>udlfb: DL chip limited to 1500000 pixel modes
<4>dlfb_alloc_urb_list
<4>dlfb_release_urb_work : INIT_DELAYED_WORK dlfb_release_urb_work
<4>dlfb_release_urb_work : after INIT_DELAYED_WORK
<4>usb_fill_bulk_urb
<4>usb_fill_bulk_urb end
<4>dlfb_release_urb_work : INIT_DELAYED_WORK dlfb_release_urb_work
<4>dlfb_release_urb_work : after INIT_DELAYED_WORK
<4>usb_fill_bulk_urb
<4>usb_fill_bulk_urb end
<4>dlfb_release_urb_work : INIT_DELAYED_WORK dlfb_release_urb_work
<4>dlfb_release_urb_work : after INIT_DELAYED_WORK
<4>usb_fill_bulk_urb
<4>usb_fill_bulk_urb end
<4>dlfb_release_urb_work : INIT_DELAYED_WORK dlfb_release_urb_work
<4>dlfb_release_urb_work : after INIT_DELAYED_WORK
<4>usb_fill_bulk_urb
<4>usb_fill_bulk_urb end
<4>dlb_alloc_urb_list : before sema_init
<4>dlb_alloc_urb_list : after sema_init
<5>udlfb: allocated 4 65024 byte urbs
<4>dlfb_setup_modes
<4>dlfb_get_edid
<4>dlfb_is_valid_mode
<6>udlfb: 800x480 valid mode
<4>udlfb: Reallocating framebuffer. Addresses will change!
<4>dlfb_ops_check_var
<4>dlfb_is_valid_mode
<6>udlfb: 800x480 valid mode
<5>udlfb: set_par mode 800x480
<4>dlfb_set_video_mode
<4>dlfb_get_urb end
<4>dlfb_set_vid_cmds
<4>dlfb_submit_urb
<4>dlfb_submit_urb : after usb_submit_urb ret=0
<4>dlfb_set_video_mode end
<4>dlfb_urb_completion
<4>up release_urb_work !!!
<4>dlfb_urb_completion end
<4>dlfb_handle_damage
<4>dlfb_get_urb end
<4>dlfb_submit_urb
<4>dlfb_submit_urb : after usb_submit_urb ret=0
<6>udlfb: DisplayLink USB device /dev/fb1 attached. 800x480 resolution. Using 1504K framebuffer memory
<4>dlfb_urb_completion
<4>up release_urb_work !!!
<4>dlfb_urb_completion end
<6>usb 1-1.3.3: new full speed USB device using str8100-ehci and address 25
<3>usb 1-1.3.3: device descriptor read/64, error -32
<3>usb 1-1.3.3: device descriptor read/64, error -32
<6>usb 1-1.3.3: new full speed USB device using str8100-ehci and address 26
<3>usb 1-1.3.3: device descriptor read/64, error -32
<3>usb 1-1.3.3: device descriptor read/64, error -32
<6>usb 1-1.3.3: new full speed USB device using str8100-ehci and address 27
<3>usb 1-1.3.3: device not accepting address 27, error -32
<6>usb 1-1.3.3: new full speed USB device using str8100-ehci and address 28
<3>usb 1-1.3.3: device not accepting address 28, error -32
<6>usb 1-1.3: USB disconnect, address 23
<6>usb 1-1.3.2: USB disconnect, address 24
<6>udlfb: USB disconnect starting
<4>dlfb_free_framebuffer_work
<4>udlfb: fb_info for /dev/fb1 has been freed
<4>dlfb_free
<5>udlfb: Waiting for completes and freeing all render urbs
<4>udlfb: freeing dlfb_data c1031000
<6>usb 1-1: USB disconnect, address 12
<6>usb 1-1: new high speed USB device using str8100-ehci and address 29
<6>usb 1-1: configuration #1 chosen from 1 choice
<6>hub 1-1:1.0: USB hub found
<6>hub 1-1:1.0: 4 ports detected

tslib doesn't create an input device; your touchscreen's device driver does. tslib uses it and you can call ts_read() to get filtered samples. There are X11 and Qt5 wrappers that do this. That's the way it always was.
As of version 1.3 of tslib, there is tslib/tools/ts_uinput that you can use to create an input device to point your environment to, see tslib's project page.
As of now, there is tslib-1.3-rc1 if you want to test this.

Related

Raspberry Pi Pico doesn't create tty file

I've been using Raspberry Pi Pico for some time already and I'm using minicom for serial communication. But one day Pico stopped generating tty/ATCM0 when connected to USB port. Before this everything worked perfectly fine.
I can still upload software and it's executing, but there's no serial communication because of it.
I've tried switching USB ports, uploading software that worked fine before and I even bought new Pico, as I suspected a hardware issue, but it still didn't help. My best guess is that there's something wrong with USB drivers, though I don't remember doing anything to them.
I've checked /dev for new tty files when connecting Pico, but nothing appears.
dmesg output after connecting Pico:
[ 2418.974093] usb 3-2: new full-speed USB device number 28 using xhci_hcd
[ 2434.570047] usb 3-2: device descriptor read/64, error -110 // <-- Warning
dmesg output after connecting in BOOTLOADER mode and uploading file
[ 2901.230259] usb 3-2: new full-speed USB device number 30 using xhci_hcd // <-- connected as BOOTLOADER
[ 2901.397715] usb 3-2: New USB device found, idVendor=2e8a, idProduct=0003, bcdDevice= 1.00
[ 2901.397726] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2901.397729] usb 3-2: Product: RP2 Boot
[ 2901.397732] usb 3-2: Manufacturer: Raspberry Pi
[ 2901.397735] usb 3-2: SerialNumber: E0C912D24340
[ 2901.399735] usb-storage 3-2:1.0: USB Mass Storage device detected
[ 2901.399885] scsi host2: usb-storage 3-2:1.0
[ 2902.412571] scsi 2:0:0:0: Direct-Access RPI RP2 1 PQ: 0 ANSI: 2
[ 2902.413038] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 2902.413315] sd 2:0:0:0: [sdb] 262144 512-byte logical blocks: (134 MB/128 MiB)
[ 2902.413731] sd 2:0:0:0: [sdb] Write Protect is off
[ 2902.413734] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[ 2902.415755] sd 2:0:0:0: [sdb] No Caching mode page found // <-- Warning
[ 2902.415761] sd 2:0:0:0: [sdb] Assuming drive cache: write through // <-- Warning
[ 2902.424350] sdb: sdb1
[ 2902.427764] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[ 2907.724687] usb 3-2: USB disconnect, device number 30 // <-- uploaded uf2 file
[ 2907.725456] blk_update_request: I/O error, dev sdb, sector 260 op 0x1:(WRITE) flags 0x100000 phys_seg 1 prio class 0 // <-- Warning
[ 2907.725471] Buffer I/O error on dev sdb1, logical block 259, lost async page write // <-- Warning
[ 2907.733492] FAT-fs (sdb1): unable to read boot sector to mark fs as dirty // <-- Warning
[ 2908.102068] usb 3-2: new full-speed USB device number 31 using xhci_hcd
[ 2923.530076] usb 3-2: device descriptor read/64, error -110 // <-- Warning
lsusb -tv lists these two entries only when Pico is in BOOTLOADER mode:
...
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
ID 1d6b:0002 Linux Foundation 2.0 root hub
|__ Port 2: Dev 35, If 0, Class=Mass Storage, Driver=usb-storage, 12M
ID 2e8a:0003
|__ Port 2: Dev 35, If 1, Class=Vendor Specific Class, Driver=, 12M
ID 2e8a:0003
...

How can I get the port of my Rflink (Arduino Mega) to show in /dev on my Raspberry pi 3?

I bought a RFlink Gateway from Nodo-shop.nl, the the RFLink 433.42 Somfy RTS version, to use with Domoticz on a RPI. I had Nodo to solder the components of my Rflink, so there should not be any problem on this end :)
I connected it to my MacbookAir, and followed the instructions on Domoticz wiki to upload the firmware into the RFlink. It apparently uploaded the firmware successfully.
Then I updated and upgraded my RPI (Linux raspberrypi 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux) and hooked it up to my Raspberry Pi 3 .
I tried to identify the port with Dmesg. If the Arduino Mega is detected, I cannot see the ttyAMCO or ttyUSB everyone is referring to in various posts.
Here is the output of the dmesg command:
[3902580.423329] usb 1-1.1.2: new full-speed USB device number 9 using dwc_otg [3902580.568650] usb 1-1.1.2: New USB device found, idVendor=2341, idProduct=0042, bcdDevice= 0.01 [3902580.568671] usb 1-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=220 [3902580.568685] usb 1-1.1.2: Manufacturer: Arduino (www.arduino.cc) [3902580.568699] usb 1-1.1.2: SerialNumber: 55037313237351714260
I also tried to look for the port using this command ls /dev | grep tty*. I can only see these ports : ttyXX, ttyAMA0 and ttyprintk. But no sign of the port of my RFlink Gateway.
When I use this command lsusb, it shows it recognizes the Arduino:
Bus 001 Device 009: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM).
I read tons of posts on the internet but I did not find any answer to my problem.
I even bought a power supply for my Arduino Mega as some wrote that it may not get enough power from the RPI's USB. But I still have the same problem...
What I'm not doing right ? Or what am I not looking at ?
Thank you for your help
Sorry, bit late but it might be useful to someone else...
It might well be the /dev/ttyAMA0 you found - it depends what else you've got on there.
listing by id should identify it definitively though:
$ ls -l /dev/serial/by-id/
total 0
lrwxrwxrwx 1 root root 13 Mar 18 2021 usb-0658_0200_12345678-9012-3456-7890-123456789012-if00 -> ../../ttyACM1
lrwxrwxrwx 1 root root 13 Mar 18 2021 usb-Arduino__www.arduino.cc__0042_55639313533351509150-if00 -> ../../ttyACM0
So, in my case it's on /dev/ttyACM0.
If you've got multiple USB serial adapters, reboot the pi with them all plugged in to get the default mapping (I've seen hotplugged AMA0 and AMA1 swap after a reboot).

openvino crashes after running inference some seconds in raspberry pi 4

I tried to use Intel Neural Compute Stick 2 as an inference engine for my smart car.
I installed l_openvino_toolkit_runtime_raspbian_p_2019.2.242.tgz followed by this link, and run the code for testing.
Everything was fine at the beginning of 10 - 20 seconds(sometimes less, sometimes longer), Then crashed with the following errors:
E: [xLink] [ 327401] [EventRead00Thr] dispatcherEventReceive:336 dispatcherEventReceive() Read failed (err -4) | event 0xaf1fdddc XLINK_READ_REL_REQ
E: [xLink] [ 327401] [EventRead00Thr] eventReader:223 eventReader thread stopped (err -4) E: [xLink] [ 327402] [python3] XLinkReadDataWithTimeOut:1323 Event data is invalid
E: [ncAPI] [ 327402] [python3] ncFifoReadElem:3445 Packet reading is failed. terminate called after throwing an instance of 'InferenceEngine::details::InferenceEngineException'
what(): Failed to read output from FIFO: NC_ERROR
Aborted
I tried to insert it into the USB hub with a self-power adapter, but it still got the same errors.
I also tried to insert it into the USB2.0, but still not working.
I checked out the dmesg, I found the Intel Neural Compute Stick 2 will be auto-mounted when I called net.forward() at some point.
I got dmesg information by following steps:
check the ncs2 device is ok(I can find the device) before running the code.
clear dmesg
running the code
waiting for it crashed. then, check out the dmesg.
the dmesg showing:
[87255.685160] usb 1-1.1: USB disconnect, device number 25
[87255.831256] usb 2-1: new SuperSpeed Gen 1 USB device number 18 using xhci_hcd
[87255.861963] usb 2-1: New USB device found, idVendor=03e7, idProduct=f63b, bcdDevice= 1.00
[87255.861970] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[87255.861975] usb 2-1: Product: VSC Loopback Device
[87255.861980] usb 2-1: Manufacturer: Intel Corporation
[87255.861985] usb 2-1: SerialNumber: 41440410119541BC00
[87280.181479] usb 1-1.1: new high-speed USB device number 26 using xhci_hcd
[87280.312042] usb 1-1.1: New USB device found, idVendor=03e7, idProduct=2485, bcdDevice= 0.01
[87280.312048] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[87280.312053] usb 1-1.1: Product: Movidius MyriadX
[87280.312058] usb 1-1.1: Manufacturer: Movidius Ltd.
[87280.312063] usb 1-1.1: SerialNumber: 03e72485
[87280.691784] usb 2-1: USB disconnect, device number 18
My environment is:
Raspberry Pi 4 (4GB)
Raspbian Buster
I have debugged it serval days, but have no idea to solve this problem.
Is there anything I missed?
Thanks!
The error seems to be related to the NCS2 device being reset for inference and fail to initialize during runtime. Verify you have added the USB Rules for the Intel® Neural Compute Stick 2 device by performing the following steps.
Add the current Linux user to the users group:
$ sudo usermod -a -G users "$(whoami)"
Log out and log in for it to take effect.
Run setupvars.sh again after logging in:
$ source /opt/intel/openvino/bin/setupvars.sh
Install the USB rules running the install_NCS_udev_rules.sh script:
$ sh /opt/intel/openvino/install_dependencies/install_NCS_udev_rules.sh
Proceed to run the demo application:
$ python3 SingleStickSSDwithUSBCamera_OpenVINO_NCS2.py
Note the l_openvino_toolkit_runtime_raspbian_p_2019.2.242 is now quite outdated, and there have been newer software packages released. Checkout the OpenVINO™ Toolkit packages storage for the most recent release available (at the time of this post, 2021.4.1 - l_openvino_toolkit_runtime_raspbian_p_2021.4.689.tgz).
I've executed the demo application you listed with OpenVINO 2021.4.1 for longer than 10 minutes and the error can't reproduce:

Arduino to Ubuntu USB connection

I am having trouble getting an Ubuntu device to connect to an Arduino Uno. Before I begin talking about the device in question the Arduino is communicating correctly with my Windows pc, and also an Ubuntu VM on that PC.
The device in question is an nVidia Jetson TX2. The Arduino IDE is installed, and when run using sudo the only serial port available is /dev/ttyS0.
The following line is lsusb being run and it detecting the Arduino.
Bus 001 Device 008: ID 2341:0001 Arduino SA Uno (CDC ACM)
The following lines is the output from dmesg from the time that the Arduino is connected.
[ 6609.813385] usb 1-2.3: new full-speed USB device number 13 using xhci-tegra
[ 6609.923568] usb 1-2.3: New USB device found, idVendor=2341, idProduct=0001
[ 6609.930495] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 6609.938049] usb 1-2.3: Product: Arduino Uno
[ 6609.942268] usb 1-2.3: Manufacturer: Arduino (www.arduino.cc)
[ 6609.948065] usb 1-2.3: SerialNumber: 7563830333735121D160
[ 6609.953998] usb 1-2.3: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
And lastly the following is the output from ls -a /dev/tty*
/dev/tty /dev/tty18 /dev/tty28 /dev/tty38 /dev/tty48 /dev/tty58 /dev/ttyS1
/dev/tty0 /dev/tty19 /dev/tty29 /dev/tty39 /dev/tty49 /dev/tty59 /dev/ttyS2
/dev/tty1 /dev/tty2 /dev/tty3 /dev/tty4 /dev/tty5 /dev/tty6 /dev/ttyS3
/dev/tty10 /dev/tty20 /dev/tty30 /dev/tty40 /dev/tty50 /dev/tty60 /dev/ttyTHS1
/dev/tty11 /dev/tty21 /dev/tty31 /dev/tty41 /dev/tty51 /dev/tty61 /dev/ttyTHS3
/dev/tty12 /dev/tty22 /dev/tty32 /dev/tty42 /dev/tty52 /dev/tty62
/dev/tty13 /dev/tty23 /dev/tty33 /dev/tty43 /dev/tty53 /dev/tty63
/dev/tty14 /dev/tty24 /dev/tty34 /dev/tty44 /dev/tty54 /dev/tty7
/dev/tty15 /dev/tty25 /dev/tty35 /dev/tty45 /dev/tty55 /dev/tty8
/dev/tty16 /dev/tty26 /dev/tty36 /dev/tty46 /dev/tty56 /dev/tty9
/dev/tty17 /dev/tty27 /dev/tty37 /dev/tty47 /dev/tty57 /dev/ttyS0
I don't believe that a driver is being called to create /dev/ttyACM0 but I am not sure how to solve this issue. Any help would be great! Let me know if I need to update with the output from any other commands.
You haven't posted what the error is but I'm guessing it is an access type error, have you done the part at the end of the install for linux?
At the end of https://www.arduino.cc/en/Guide/Linux there is section on permissions for the serial port.

Init process not found when booting with ramdisk as rootfs

I'm trying to setup a ramdisk for a setup I have with AT91SAM9261 and 2.6.30 kernel.
I know you would say why don't I use initramfs? I will use also that one, as of now I would like to check if I can boot with a ramdisk as rootfs.
I have already a root fs running fine on this system in jffs2 format.
I used below tutorial:
http://www.ibm.com/developerworks/library/l-initrd/
So I created the ramdisk directly on the embedded target, with 4MB size.
I used "dd" and "mkefs" and the ramdisk image works fine if I mount it as loop when rootfs is my jffs2.
I can browse mount_point and do stuff inside.
The content was created according to the section "Manually building initial RAM disk" in the above link.
In /dev I placed null and console, in /bin I copied busybox and created the links.
I set the execute attribute to init script as well, which works fine when I run it here (as loop device with jffs2 as rootfs)
In my kernel config I enabled ramdisk support as follows:
CONFIG_BLK_DEV_INITRD=y
CONFIG_RD_GZIP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=4096
Using tftp I download the ramdisk image to 0x21100000.
At 0x20008000 I have the kernel uncompressed and at 0x22000000 the zImage copied.
However, I'm not able to boot successfully the system as it hangs when checking init process.
As I mentioned, I checked several times that my init can be executed,
I also used in the bootargs init=/bin/busybox or other scripts/binaries to check if any can be used as init.
Command line I use now:
bootargs=64M console=ttyS0,115200 root=/dev/ram0 rw
initrd=0x21100000,4194304 init=/init
For some I set ownership to "nobody" just to check if it makes any difference.
As it can be seen in the log output the ramdisk is mounted, but init fails.
It gives a warning to check the ext2 image, which I did before copying it and I have no error reported.
The tftp server is on Windows7. I though I might have some incompatibility if I copy the ramdisk image from linux to Windows then do tftp from Windows server.
So I copied the image again from Windows to linux, mounted it and checked if the FS reports any error and scripts can be executed - everything looks normal.
So I do have all files in place, attributes set, ramdisk is reported as being mounted ok as rootfs, but init cannot be found.
Uncompressing Linux......................................................................................................... done, booting the kernel.
Linux version 2.6.30-olimex (mishu#KubuntuVM) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #1 Mon Dec 29 13:53:54 CET 2014
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Olimex SAM9-L9261
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: 64M console=ttyS0,115200 root=/dev/ram0 rw initrd=0x21100000,4194304 init=/init
NR_IRQS:192
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 57384KB available (2924K code, 246K data, 132K init, 0K highmem)
Calibrating delay loop... 99.12 BogoMIPS (lpj=495616)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 716 bytes
NET: Registered protocol family 16
AT91: Power Management
AT91: Starting after user reset
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (junk in compressed archive); looks like an initrd
Freeing initrd memory: 4096K
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 120
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: backlight control is not available
atmel_lcdfb atmel_lcdfb.0: 225KiB frame buffer at 23140000 (mapped at ffc00000)
Console: switching to colour frame buffer device 40x30
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00600000 (mapped at c4866000), irq 21
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttyS1 at MMIO 0xfffb0000 (irq = 6) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
ssc ssc.1: Atmel SSC device at 0xc4878000 (irq 15)
Driver 'sd' needs updating - please use bus_type methods
dm9000 Ethernet Driver, V1.31
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c486a000,c486e044 IRQ 107 MAC: 3a:1f:34:08:54:64 (chip)
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 1478 at 0x00000b8c0000
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000000040000 : "Partition 1"
0x000000040000-0x000020000000 : "Partition 2"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffc8000 (irq 12)
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: New USB device found, idVendor=1d6b, idProduct=0001
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: AT91 OHCI
usb usb1: Manufacturer: Linux 2.6.30-olimex ohci_hcd
usb usb1: SerialNumber: at91
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
ads7846 spi0.2: touchscreen, irq 29
input: ADS784x Touchscreen as /class/input/input1
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
i2c /dev entries driver
i2c-gpio: probe of i2c-gpio failed with error -16
Registered led device: led1
Registered led device: led2
Registered led device: led3
Advanced Linux Sound Architecture Driver Version 1.0.20.
at73c213 spi0.3: at73c213: supported bitrate is 48500 (64 divider)
usb 1-1: new full speed USB device using at91_ohci and address 2
usb 1-1: New USB device found, idVendor=0457, idProduct=0151
usb 1-1: New USB device strings: Mfr=0, Product=2, SerialNumber=3
usb 1-1: Product: USB Mass Storage Device
usb 1-1: SerialNumber: 8d54bd8186b42c
usb 1-1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
ALSA device list:
#0: SAM9-L9261 external DAC on irq 15
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 4096KiB [1 disk] into ram disk... done.
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 132K
Failed to execute /init. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
[<c002f414>] (unwind_backtrace+0x0/0xdc) from [<c025bd34>] (panic+0x40/0x110)
[<c025bd34>] (panic+0x40/0x110) from [<c0029500>] (init_post+0xd0/0xf8)
[<c0029500>] (init_post+0xd0/0xf8) from [<c00085a0>] (kernel_init+0xbc/0xe4)
[<c00085a0>] (kernel_init+0xbc/0xe4) from [<c0041998>] (do_exit+0x0/0x5ac)
[<c0041998>] (do_exit+0x0/0x5ac) from [<00000001>] (0x1)
I plan to rebuild busybox and try again, but as my current ramdisk image works when I mount it as loop I don't have too much confidence it will change something.
I'm out of ideas. I've been trying the whole day to get this working.
Help is much appreciated.
Thanks.
Missing libraries were the root cause for the non-executable init placed on the ramdisk.
Using chroot turned out to be extremely useful. With this issue I learned how to use chroot and simulate a jail.
Another trick was to use user_debug=31 in the command line so that the kernel will output a message saying that the file is not found.
It looks like the "file not found" does not really point to a missing file, but to a failure to read the file system due to busybox not executing properly (missing libraries).
In parallel I have compiled dynamically the busybox 1.20.02 for my arm architecture and the ramdisk worked properly (without libs).
This user_debug=31 turned out to be again useful when I compiled and ran busybox, as it was also failing after mounting the ramdisk, but it thrown out an "undefined exception" which led me to a wrong "arch" value used for compiling busybox. After changing it everything was fine.

Resources