LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices

Reply
 
Search this Thread
Old 04-07-2011, 05:41 PM   #1
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Rep: Reputation: 3
How can I access to my SBC via USB ?


Hi,
I have the Olimex board SAM9-L9260 with Linux on board. My question is, how in Linux I can connect via USB from my PC to my board (the plate tip is a USB type D)?
 
Old 04-07-2011, 10:43 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
You cannot do that directly. You would need to use a USB/Ethernet or USB/Serial interface on your SBC. In addition, you will need to have an appropriate driver for the USB dongle loaded and installed on the Linux SBC. Potentially, you could run the SBC Linux with the USB-Gadget driver installed, and doing so would make the SBC look like a USB Mass Storage device (thumb drive).
--- rod.

Last edited by theNbomr; 04-08-2011 at 10:58 AM.
 
Old 04-08-2011, 10:45 AM   #3
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 3
Hi, thanks for reply. I connected my Linux SBC via USB/Serial and this connection was appeared in my PC Linux as /dev/ttyUSB0, not as disk. Because I don't have display in my SBC so I want to issue commands from my PC Linux. I need commands, how I can control my SBC Linux from my PC Linux.
 
Old 04-08-2011, 11:12 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Either I don't understand your question, or you have misread what I said previously.

I assume your SBC does not have ethernet. If it does, I would recommend using that to effect a login.

You can attach a USB/Ethernet adapter to the SBC USB interface, along with the appropriate driver in the SBC. This will make the SBC have ethernet, after which you should be able to attach your Linux PC to the SBC using traditional networking methods, probably ssh.
Alternatively, use a USB/Serial interface on the SBC, again along with the appropriate driver. This should allow you to run a getty process on the serial port of the SBC. Then, using a serial port on a PC running Linux or Windows, you can then login to the SBC using a terminal emulator, such as minicom or C-Kermit, using a serial port on the PC, and the USB/Serial interface on the SBC.

The only way to make a direct connection between the PC and SBC using only USB interfaces would be if one of the hosts has the USB interface set up as a non-host-control interface; ie USB-gadget driver. Two USB host-control-interfaces can't talk to each other.

--- rod.
 
Old 04-08-2011, 02:45 PM   #5
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 3
If I good understood, I need first install driver for my USB/Serial and then use minicom? But now, can you help me, how get to access to my SBC via Ethernet's port ? One more time, thanks for help.
 
Old 04-08-2011, 02:56 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
The most common methods to connect to a host via ethernet would be ssh or telnet. From a commandline on a Linux host:
Code:
ssh someuser@123.123.123.123
#
# or...
telnet -l someuser 123.123.123.123
Replace the dotted-decimal IP with the IP or IP name of your SBC, and use a username appropriate to your SBC.
For more info, consult the man pages. Secure shell access is generally preferred over telnet, due to increased security. Telnet is a much lighter weight protocol, and on single board computers, may be the only supported protocol.

--- rod.
 
Old 04-08-2011, 04:13 PM   #7
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 3
Thank you very much for your involved in helping me. The problem is that I bought the board on the stock market and no get drivers and no information about the system. But I was able to connect to the SBC Linux via USB/Serial, but during boot there is a kernel panic and system suspend
Code:
U-Boot 1.2.0 (Oct 11 2007 - 14:36:20)                                           
                                                                                
DRAM:  64 MB                                                                    
NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3)
512 MiB                                                                         
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
KS8721 PHY Detected                                                             
No link                                                                         
MAC: error during RMII initialization                                           
Hit any key to stop autoboot:  0                                                
                                                                                
NAND read: device 0 offset 0x100000, size 0x1a2828                              
 1714216 bytes read: OK                                                         
## Booting image at 21500000 ...                                                
   Image Name:   Linux-2.6.23                                                   
   Image Type:   ARM Linux Kernel Image (uncompressed)                          
   Data Size:    1714152 Bytes =  1.6 MB                                        
   Load Address: 20008000                                                       
   Entry Point:  20008000                                                       
   Verifying Checksum ... OK                                                    
OK                                                                              
                                                                                
Starting kernel ...                                                             
                                                                                
Uncompressing Linux.............................................................
Linux version 2.6.23 (ivan@debian.l123.org) (gcc version 4.1.2) #5 PREEMPT Sun 7
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177                   
Machine: Olimex SAM9-L9260                                                      
Memory policy: ECC disabled, Data cache writeback                               
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz                             
CPU0: D VIVT write-back cache                                                   
CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets              
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets              
Built 1 zonelists in Zone order.  Total pages: 16256                            
Kernel command line: mem=64M console=ttyS0,115200 root=/dev/mmcblk0p1 rootdelay0
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: 61336KB available (2732K code, 686K data, 108K init)                    
Mount-cache hash table entries: 512                                             
CPU: Testing write buffer coherency: ok                                         
NET: Registered protocol family 16                                              
Generic PHY: Registered new driver                                              
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                                                             
NetWinder Floating Point Emulator V0.97 (double precision)                      
audit: initializing netlink socket (disabled)                                   
audit(0.570:1): initialized                                                     
JFFS2 version 2.2. (NAND) � 2001-2006 Red Hat, Inc.                            
io scheduler noop registered                                                    
io scheduler anticipatory registered                                            
io scheduler deadline registered                                                
io scheduler cfq registered (default)                                           
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             
atmel_usart.2: ttyS2 at MMIO 0xfffb4000 (irq = 7) is a ATMEL_SERIAL             
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize           
loop: module loaded                                                             
MACB_mii_bus: probed                                                            
eth0: Atmel MACB at 0xfffc4000 irq 21 (00:00:00:00:00:00)                       
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:01, irq=-1)  
block2mtd: version $Revision: 1.30 $                                            
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-b)
Scanning device for bad blocks                                                  
Bad eraseblock 0 at 0x00000000                                                  
Bad eraseblock 1 at 0x00020000                                                  
Bad eraseblock 2 at 0x00040000                                                  
Bad eraseblock 3 at 0x00060000                                                  
Bad eraseblock 8 at 0x00100000                                                  
Bad eraseblock 9 at 0x00120000                                                  
Bad eraseblock 10 at 0x00140000                                                 
Bad eraseblock 11 at 0x00160000                                                 
Bad eraseblock 12 at 0x00180000                                                 
Bad eraseblock 13 at 0x001a0000                                                 
Bad eraseblock 14 at 0x001c0000                                                 
Bad eraseblock 15 at 0x001e0000                                                 
Bad eraseblock 16 at 0x00200000                                                 
Bad eraseblock 17 at 0x00220000                                                 
Bad eraseblock 18 at 0x00240000                                                 
Bad eraseblock 19 at 0x00260000                                                 
Bad eraseblock 20 at 0x00280000                                                 
Bad eraseblock 21 at 0x002a0000                                                 
Bad eraseblock 32 at 0x00400000                                                 
Bad eraseblock 33 at 0x00420000                                                 
Bad eraseblock 34 at 0x00440000                                                 
Bad eraseblock 35 at 0x00460000                                                 
Bad eraseblock 36 at 0x00480000                                                 
Bad eraseblock 37 at 0x004a0000                                                 
Bad eraseblock 38 at 0x004c0000                                                 
Bad eraseblock 39 at 0x004e0000                                                 
Bad eraseblock 40 at 0x00500000                                                 
Bad eraseblock 41 at 0x00520000                                                 
Bad eraseblock 42 at 0x00540000                                                 
Bad eraseblock 43 at 0x00560000                                                 
Bad eraseblock 44 at 0x00580000                                                 
Bad eraseblock 45 at 0x005a0000                                                 
Bad eraseblock 46 at 0x005c0000                                                 
Bad eraseblock 47 at 0x005e0000                                                 
Bad eraseblock 48 at 0x00600000                                                 
Bad eraseblock 49 at 0x00620000                                                 
Bad eraseblock 50 at 0x00640000                                                 
Bad eraseblock 51 at 0x00660000                                                 
Bad eraseblock 52 at 0x00680000                                                 
Bad eraseblock 53 at 0x006a0000                                                 
Bad eraseblock 54 at 0x006c0000                                                 
Bad eraseblock 55 at 0x006e0000                                                 
Bad eraseblock 56 at 0x00700000                                                 
Bad eraseblock 57 at 0x00720000                                                 
Bad eraseblock 58 at 0x00740000                                                 
Bad eraseblock 59 at 0x00760000                                                 
Bad eraseblock 60 at 0x00780000                                                 
Bad eraseblock 61 at 0x007a0000                                                 
Bad eraseblock 62 at 0x007c0000                                                 
Bad eraseblock 63 at 0x007e0000                                                 
Creating 2 MTD partitions on "NAND 512MiB 3,3V 8-bit":                          
0x00000000-0x00a00000 : "Bootloader Area"                                       
0x00a00000-0x20000000 : "User Area"                                             
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: 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.                                            
usbcore: registered new interface driver libusual                               
udc: at91_udc version 3 May 2006                                                
ether gadget: using random self ethernet address                                
ether gadget: using random host ethernet address                                
usb0: Ethernet Gadget, version: May Day 2005                                    
usb0: using at91_udc, OUT ep2 IN ep1 STATUS ep4                                 
usb0: MAC d6:40:ed:ed:10:07                                                     
usb0: HOST MAC ee:7c:da:61:e5:8b                                                
usb0: RNDIS ready                                                               
mice: PS/2 mouse device common for all mice                                     
TCP cubic registered                                                            
Initializing XFRM netlink socket                                                
NET: Registered protocol family 1                                               
NET: Registered protocol family 17                                              
NET: Registered protocol family 15                                              
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)                         
Waiting 10sec before mounting root device...                                    
VFS: Cannot open root device "mmcblk0p1" or unknown-block(0,0)                  
Please append a correct "root=" boot option; here are the available partitions: 
1f00      10240 mtdblock0 (driver?)                                             
1f01     514048 mtdblock1 (driver?)                                             
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
My question is, how can I upload new Linux to this SBC?

Last edited by Paweł; 04-08-2011 at 04:32 PM.
 
Old 04-08-2011, 05:50 PM   #8
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
Okay, this is a whole different question. Here is what we know:
  • the flash disk from which the SBC boots appears to be either faulty (numerous bad blocks), or at the very least, contains bad data.
  • there is a boot loader, and that boot loader at least seems to acknowledge the possibility of doing a network boot
  • the existing kernel image seems to be intact (checksum okay)
To restore the system, you will need to re-write at least part of the NAND flash filesystem, possibly containing an initrd or other root filesystem. Without knowing any details of your system, I cannot tell whether this can be done by a running kernel or userspace application, or whether it requires the use of something like a JTAG interface, or whether it is totally bricked. You are going to need to somehow figure this out.
An alternative might be to mount an NFS root filesystem, if you can use the bootloader to pass the appropriate kernel arguments. I don't know how/where you would possibly acquire such a thing, however.

You are facing a monumental job to get this thing working. If it is just a hobby or learning exercise, you may find some benefit in it. If there is a real-world purpose to this, then I recommend moving on to something that actually boots, and has documentation and vendor support. I don't like to be the bearer of bad news, but I think it looks like either the device was damaged in transit, or you were sold someone else's junk.

--- rod.
 
Old 04-08-2011, 06:26 PM   #9
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 3
Maybe even this will help. When I reset the board I have 3 seconds to cancel the operation. Then I send the ENTER key character (and only then) and cancel the reset. After canceling the operation, I have a prompt from the U-Boot>. The problem is that if I can not send anything from the keyboard, or I have something misconfigured in minicom. Can you help me configure minicom? Or is this the fault of the system already on the board that do not respond?
 
Old 04-08-2011, 07:00 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,052

Rep: Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759Reputation: 759
Make sure that hardware and software flow control is set to none.
 
Old 04-08-2011, 08:25 PM   #11
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 3
Quote:
Originally Posted by michaelk View Post
Make sure that hardware and software flow control is set to none.
...

Last edited by Paweł; 04-09-2011 at 12:20 AM.
 
Old 04-08-2011, 09:05 PM   #12
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 3
Thanks michaelk for solution. I have full access to U-Boot prompt on SBC Linux. Can I ask you to available me yours uImage or rootfs ? I want erase nand flash and write new uImage.
 
Old 04-08-2011, 09:42 PM   #13
Paweł
LQ Newbie
 
Registered: Jan 2011
Posts: 18

Original Poster
Rep: Reputation: 3
Hi,
When I writing uImage, I pushed reset button. Now, when I run SBC, I get only prompt RomBoot (and nothing else). How can I fix this ?

Last edited by Paweł; 04-09-2011 at 12:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
usb frame grabber for arm SBC dogucetin Linux - Embedded & Single-board computer 1 01-07-2011 04:15 AM
Searching SBC/DSP board/microcontroller; 4ADC/1kHz/USB Host Yoreki Linux - Embedded & Single-board computer 7 05-14-2009 02:36 PM
USB network sugestions for SBC running redhat 6.2 robsbots Linux - Networking 3 11-03-2008 06:26 PM
To make known to linux the usb hardware at compiling linux kernel for arm based sbc selmaguzel Linux - Embedded & Single-board computer 1 06-08-2008 05:02 PM
sbc dsl using sbc's wireless usb adapter jmill_1 Linux - Wireless Networking 1 01-20-2006 12:16 AM


All times are GMT -5. The time now is 04:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration