USB ethernet in U-boot

Hi,

my next problem is how to run ethernet over USB to download images via tftp. My board: Beagleboard rev.C4. My U-Boot is 2012.07. My USB-ethernet adapter (this is what u-Boot usb dev shows when adapter is connected to USB EHCI port):

Vendor specific, USB Revision 2.0

  • Moschip Semiconductor UA0025C 6e003e8f
  • Class: Vendor specific
  • PacketSize: 64 Configurations: 1
  • Vendor: 0x9710 Product 0x7830 Version 1.0
    Configuration: 1
  • Interfaces: 1 Bus Powered Remote Wakeup 500mA
    Interface: 0
  • Alternate Setting 0, Endpoints: 3
  • Class Vendor specific
  • Endpoint 1 In Bulk MaxPacket 512
  • Endpoint 2 Out Bulk MaxPacket 512
  • Endpoint 3 In Interrupt MaxPacket 16 Interval 1ms

I have also USB HUB connected to OTG port and self powered. But only usb tree shows some info:
1 Hub (480 Mb/s, 0mA)
u-boot EHCI Host Controller

Don’t know why it show 0mA if I have power supply attached.

Finally U-Boot shows always that now ethernet device is found. And additionaly MAC address is not set (ethaddr), but ethaddr doesnt work.
Could you help?

Hi,

I've written some time ago guide for beagleboard XM for loading kernel
and mounting nfsroot, maybe it will help:

http://veter-project.blogspot.com/2012/03/comfortable-kernel-workflow-on.html

But, I'm not sure, if your adapter is supported by U-boot. The adapter
on XM board is supported.

Hope this helps,
Maksym.

Your project is a great work! And good guide.

One thing, my U-Boot shows “No ethernet found”. U-Boot site says that it is possible when no valid MAC address is set. But which one? ethaddr or usbethaddr ? Or any of them? And what address I should set. Shouldn’t it to be assigned by producer and I should use it in that usbethaddr variable?

Regards
Valdez

W dniu niedziela, 19 sierpnia 2012 22:36:28 UTC+2 użytkownik Maksym Parkachov napisał:

Sorry that I bump it but still don’t know how to do it.

Could you help, please?

Valdez

W dniu środa, 22 sierpnia 2012 11:17:35 UTC+2 użytkownik valdez napisał:

setting the MAC address is one of the latest stages in tuning the
Ethernet in u-boot. First u-boot itself must find and initialize your
Ethernet adapter, only then you can set MAC, ip address and etc. As
far as I understand the things u-boot is not able to detect and
initialize hot-plug devices like USB-Ethernet. You need to specify
explicitly what type of hardware is connected and which routings have
to be invoked to initialize the hardware

My hardware is LogiLink and base on Moschip Semiconductor 7830 (MSC 7830), BB revC4 and I have also self-powered USB hub from Digitus with USB mini AB cable.
If it is possible, I’d like to connect USB ethernet via hub to OTG port. If not finally it can be Connected via EHCI.
I want to connect via ethernet to my notebook, obviously I have crossed ethernet cable.

W dniu niedziela, 19 sierpnia 2012 16:31:18 UTC+2 użytkownik valdez napisał:

and? You have to fix u-boot sources to enable your adapter

Is it descripted somewhere?

W dniu niedziela, 19 sierpnia 2012 16:31:18 UTC+2 użytkownik valdez napisał:

right in the u-boot sources. What else do you need?

Following README.usb file I added line with Vendor and Product ID in drivers/usb/eth/asix.c file and:

`
#define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters /
#define CONFIG_USB_ETHER_ASIX /
Asix, or whatever driver(s) you want */

#define CONFIG_CMD_NET
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP

#define CONFIG_BOOTP_SUBNETMASK
#define CONFIG_BOOTP_GATEWAY
#define CONFIG_BOOTP_HOSTNAME
#define CONFIG_BOOTP_BOOTPATH

#define CONFIG_IPADDR 192.168.0.9 (replace with your value)
#define CONFIG_SERVERIP 192.168.0.2 (replace with your value)
#define CONFIG_BOOTFILE “uImage”
`
in /board/ti/beagle file.
Now U-Boot see adapter as ethernet device when connected to EHCI port, but not when connected to OTG via HUB. But ok, output of printenv command shows

gatewayip=192.168.0.1 ipaddr=192.168.0.9 netmask=255.255.255.0 serverip=192.168.0.2 usbethaddr=00:60:6e:00:03:3a
My notebook eth address is 192.168.0.2 with net mask 255.255.255.0.
Still can’t ping to notebook: ping failed:

OMAP3 beagleboard.org # ping 192.168.0.9 ping failed; host 192.168.0.9 is not alive

What can be wrong now?

we want you to explain we dont think you know

If someone could give some hints. Im trying to learn from free electrons tutorial and they use ethernet many times. It is difficult now for me to go through it without that connection.

W dniu poniedziałek, 27 sierpnia 2012 14:14:04 UTC+2 użytkownik lazarman napisał:

Is it still necessary to modify U-Boot sources? I know I can load images from card. But I’d like to learn via ethernet also and it is more convenient way as you know.
I thought it will be easier because my board is from EBV, Beagleboard C4 clone, and they supplied in one box all the cables, power supplies, usb hub, ethernet dongle and sd card. In my opinion they know what is supported and so on… Still want to fight with it but need your support.

W dniu niedziela, 19 sierpnia 2012 16:31:18 UTC+2 użytkownik valdez napisał:


well i thought more about this after last email

I have a C4 Beagle and I can try and help but
it may take some time and my memory is shaky as to what you can do with a beagle c4

one reason you dont want to be changing uboot is the MLO , uImage and uboot are matched. even if you rebuilt uboot correctly you may cause more problems than its worth

keep in mind
1)when you ask for help moving a mountain when you do not have to, you get no reply
2) The help on this beagle list had dwindled from what it once was

I suggest you summarize what your goals are clearly and repost to the group asking how is best to achieve this

avoid whack jobs from Russia like Maxim

they will not be sympathetic to you using old tutorials and wanting help on things that you are not ready for

as for me I have a fulltime job for $100 hr with unlimited OT which equates to no time to be putzing around with a hobby like this

so I can only get you started

once again what are you wanting to learn and what is your background???




— On Tue, 8/28/12, valdez valdez151@gmail.com wrote:



> From: valdez valdez151@gmail.com
> Subject: [beagleboard] Re: USB ethernet in U-boot
> To: beagleboard@googlegroups.com
> Date: Tuesday, August 28, 2012, 10:28 AM
>
> Is it still necessary to modify U-Boot sources? I know I can load images from card. But I’d like to learn via ethernet also and it is more convenient way as you know.
> I thought it will be easier because my board is from EBV, Beagleboard C4 clone, and they supplied in one box all the cables, power supplies, usb hub, ethernet dongle and sd card. In my opinion they know what is supported and so on… Still want to fight with it but need your support.
>
> W dniu niedziela, 19 sierpnia 2012 16:31:18 UTC+2 użytkownik valdez napisał:
>
> > Hi,
> >
> > my next problem is how to run ethernet over USB to download images via tftp. My board: Beagleboard rev.C4. My U-Boot is 2012.07. My USB-ethernet adapter (this is what u-Boot usb dev shows when adapter is connected to USB EHCI port):
> >
> > Vendor specific, USB Revision 2.0
> > - Moschip Semiconductor UA0025C 6e003e8f
> > - Class: Vendor specific
> > - PacketSize: 64 Configurations: 1
> > - Vendor: 0x9710 Product 0x7830 Version 1.0
> > Configuration: 1
> > - Interfaces: 1 Bus Powered Remote Wakeup 500mA
> > Interface: 0
> > - Alternate Setting 0, Endpoints: 3
> > - Class Vendor specific
> > - Endpoint 1 In Bulk MaxPacket 512
> > - Endpoint 2 Out Bulk MaxPacket 512
> > - Endpoint 3 In Interrupt MaxPacket 16 Interval 1ms
> >
> > I have also USB HUB connected to OTG port and self powered. But only usb tree shows some info:
> > 1 Hub (480 Mb/s, 0mA)
> > u-boot EHCI Host Controller
> >
> > Don’t know why it show 0mA if I have power supply attached.
> >
> > Finally U-Boot shows always that now ethernet device is found. And additionaly MAC address is not set (ethaddr), but ethaddr doesnt work.
> > Could you help?
>
> – To join: http://beagleboard.org/discuss
> To unsubscribe from this group, send email to:
> beagleboard+unsubscribe@googlegroups.com
> Frequently asked questions: http://beagleboard.org/faq

|

I really appreciate your help @lazarman. And appologize that I was not understood until now.

I have Beagleboard C4 and need to be as most familiar as it is possible. I don’t have now any specified project, that I could simply download prebuilded bootloaders, Linux distribution and focus only on some code functionallity. I have to learn that all surroundings to explain it later other people. How to start developing software for Beagleboard, what is possible with that platform. It must cover: preparing development environment; preparing Linux distribution and basic kernel programming; work with typicall Linux distributions like Ubuntu, Debian on BB; show DSP programming with DSP/BIOS and DSPLink; show how to use some RTOS (I think it will be QNX); finally how to use Beagle in conventional bare metal ARM programming. It doesn’t have to be very deep level of that all. I think that later I would like some small project, especially with using DSP core, e.g some heads recognition or hands recognition.

Unfortunatelly I’m not experienced in embedded Linux. I only use desktop disribution. I had contact with C, assembler and some other languages programming, but it was some time ago and on university (not very serious projects) level. From my side is rather strong determination.

This is why I don’t want to pass USB Ethernet in U-Boot, use only SD card and go on.
And I also know that this board is not new, new OMAPs and platforms are on the market. It is why I suffer the most, a lot of new soft doesn’t work like in tutorials. It’s often situation that tutorials are rather confusing (e.g. U-Boot SPL instead of pervasive in tutorials X-Loader).

What exactly is my problem now:
Need network via USB-Ethernet in U-Boot(2012.07). I think that it is necessary to build U-Boot with changes suggested in README.usb from U-Boot docs. Thanks adding Vendor and Product ID in drivers/usb/eth/asix.c U-Boot see my dongle when it is connected to EHCI port, but still not when connected via USB HUB to OTG port. I’m not sure about this in /board/ti/beagle file:
`
#define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters /
#define CONFIG_USB_ETHER_ASIX /
Asix, or whatever driver(s) you want */

#define CONFIG_CMD_NET
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP

#define CONFIG_BOOTP_SUBNETMASK
#define CONFIG_BOOTP_GATEWAY
#define CONFIG_BOOTP_HOSTNAME
#define CONFIG_BOOTP_BOOTPATH

#define CONFIG_IPADDR 192.168.0.9 (replace with your value)
#define CONFIG_SERVERIP 192.168.0.2 (replace with your value)
#define CONFIG_BOOTFILE “uImage”
`

But after these changes in U-Boot source and with environment variables in U-Boot like this:
gatewayip=192.168.0.1
ipaddr=192.168.0.9
netmask=255.255.255.0
serverip=192.168.0.2
usbethaddr=00:60:6e:00:03:3a

Network seems still doesn’t work:

OMAP3 beagleboard.org # ping 192.168.0.2 ping failed; host 192.168.0.2 is not alive

It is in situation when USB-Ethernet dongle is connected by crossed cable to my notebook, where on Ubuntu is network created with IP: 192.168.0.2 and netmask:255.255.255.0.
Finally the USB-Ethernet adapter base on ASIX MCS7830. I know that U-Boot supports ASIX and SMSC 95xx chips.

W dniu niedziela, 19 sierpnia 2012 16:31:18 UTC+2 użytkownik valdez napisał:


Let me give you a wakeup.

starting from just placing prebuild images on an SD card and
getting the board to work and being able to repeat this and maybe change one of the required images can take you from 1 day to 1 week depends how much smarts and experience you have.

If you cant get that to work you have NO chance of being succesfull modifying u-boot source and getting it to work.

You will get half a dozen ideas of where to start and what distro to use searching this list archives. I myself would start with a minimal linux thats all subjective and depends on who on this likst is going to actually help you. This list heavily favors OE and Angstrom but there are alternattives

BTW researching the pros and cons of your choices is 1 weeks work alone (-: Its a tall order you have and you have to take the initiative to read lots of stuff. No one is going to spoon feed you especially if you dont put in some upfront leg work

Hope I have not totally disallusioned you

— On Tue, 8/28/12, valdez valdez151@gmail.com wrote:



> From: valdez valdez151@gmail.com
> Subject: [beagleboard] Re: USB ethernet in U-boot
> To: beagleboard@googlegroups.com
> Date: Tuesday, August 28, 2012, 1:36 PM
>
> I really appreciate your help @lazarman. And appologize that I was not understood until now.
>
> I have Beagleboard C4 and need to be as most familiar as it is possible. I don’t have now any specified project, that I could simply download prebuilded bootloaders, Linux distribution and focus only on some code functionallity. I have to learn that all surroundings to explain it later other people. How to start developing software for Beagleboard, what is possible with that platform. It must cover: preparing development environment; preparing Linux distribution and basic kernel programming; work with typicall Linux distributions like Ubuntu, Debian on BB; show DSP programming with DSP/BIOS and DSPLink; show how to use some RTOS (I think it will be QNX); finally how to use Beagle in conventional bare metal ARM programming. It doesn’t have to be very deep level of that all. I think that later I would like some small project, especially with using DSP core, e.g some heads recognition or hands recognition.
>
> Unfortunatelly I’m not experienced in embedded Linux. I only use desktop disribution. I had contact with C, assembler and some other languages programming, but it was some time ago and on university (not very serious projects) level. From my side is rather strong determination.
>
> This is why I don’t want to pass USB Ethernet in U-Boot, use only SD card and go on.
> And I also know that this board is not new, new OMAPs and platforms are on the market. It is why I suffer the most, a lot of new soft doesn’t work like in tutorials. It’s often situation that tutorials are rather confusing (e.g. U-Boot SPL instead of pervasive in tutorials X-Loader).
>
> What exactly is my problem now:
> Need network via USB-Ethernet in U-Boot(2012.07). I think that it is necessary to build U-Boot with changes suggested in README.usb from U-Boot docs. Thanks adding Vendor and Product ID in drivers/usb/eth/asix.c U-Boot see my dongle when it is connected to EHCI port, but still not when connected via USB HUB to OTG port. I’m not sure about this in /board/ti/beagle file:
> <br>> #define CONFIG_USB_HOST_ETHER /* Enable USB Ethernet adapters */<br>> #define CONFIG_USB_ETHER_ASIX /* Asix, or whatever driver(s) you want */<br>> <br>> #define CONFIG_CMD_NET<br>> #define CONFIG_CMD_PING<br>> #define CONFIG_CMD_DHCP<br>> <br>> #define CONFIG_BOOTP_SUBNETMASK<br>> #define CONFIG_BOOTP_GATEWAY<br>> #define CONFIG_BOOTP_HOSTNAME<br>> #define CONFIG_BOOTP_BOOTPATH<br>> <br>> #define CONFIG_IPADDR 192.168.0.9 (replace with your value)<br>> #define CONFIG_SERVERIP 192.168.0.2 (replace with your value)<br>> #define CONFIG_BOOTFILE "uImage"<br>>
>
> But after these changes in U-Boot source and with environment variables in U-Boot like this:
> gatewayip=192.168.0.1
> ipaddr=192.168.0.9
> netmask=255.255.255.0
> serverip=192.168.0.2
> usbethaddr=00:60:6e:00:03:3a
>
> Network seems still doesn’t work:
>
> <br>> OMAP3 beagleboard.org # ping 192.168.0.2<br>> ping failed; host 192.168.0.2 is not alive<br>>
>
> It is in situation when USB-Ethernet dongle is connected by crossed cable to my notebook, where on Ubuntu is network created with IP: 192.168.0.2 and netmask:255.255.255.0.
> Finally the USB-Ethernet adapter base on ASIX MCS7830. I know that U-Boot supports ASIX and SMSC 95xx chips.
>
> W dniu niedziela, 19 sierpnia 2012 16:31:18 UTC+2 użytkownik valdez napisał:
>
> > Hi,
> >
> > my next problem is how to run ethernet over USB to download images via tftp. My board: Beagleboard rev.C4. My U-Boot is 2012.07. My USB-ethernet adapter (this is what u-Boot usb dev shows when adapter is connected to USB EHCI port):
> >
> > Vendor specific, USB Revision 2.0
> > - Moschip Semiconductor UA0025C 6e003e8f
> > - Class: Vendor specific
> > - PacketSize: 64 Configurations: 1
> > - Vendor: 0x9710 Product 0x7830 Version 1.0
> > Configuration: 1
> > - Interfaces: 1 Bus Powered Remote Wakeup 500mA
> > Interface: 0
> > - Alternate Setting 0, Endpoints: 3
> > - Class Vendor specific
> > - Endpoint 1 In Bulk MaxPacket 512
> > - Endpoint 2 Out Bulk MaxPacket 512
> > - Endpoint 3 In Interrupt MaxPacket 16 Interval 1ms
> >
> > I have also USB HUB connected to OTG port and self powered. But only usb tree shows some info:
> > 1 Hub (480 Mb/s, 0mA)
> > u-boot EHCI Host Controller
> >
> > Don’t know why it show 0mA if I have power supply attached.
> >
> > Finally U-Boot shows always that now ethernet device is found. And additionaly MAC address is not set (ethaddr), but ethaddr doesnt work.
> > Could you help?
>
> – To join: http://beagleboard.org/discuss
> To unsubscribe from this group, send email to:
> beagleboard+unsubscribe@googlegroups.com
> Frequently asked questions: http://beagleboard.org/faq

|

Sorry that I write so late but my job takes a lot of my time and I was tired last evenings.
You didn’t disallusioned me :smiley: If you write here, or anyone who would like to help, it’s encouraging :slight_smile:

I think I know how to prepare SD card to work. I know how to build toolchain from crosstool-ng, but after all I decided to use prebuilded arm-cortex_a8-linux-gnueabi- . I also know how to prepare first and second stage bootloaders (U-Boot :)). But I didn’t tested any specific distro (only demo images, but want to do it myself, not just copy and paste files). I builded Linux from scratch with latest stable kernel 3.5.3, Busybox 1.20.2, I created all the rest missing neccessary directories and files and I have used *.cpio archive as a ramdisk (but creating root file system is for me the most confusing now, I will have couple of questions). That system boots and I cross-compiled and ran on beagleboard simple “hello world” program. I also tried run ethernet under that OS :D, of course it didn’t worked even when I turned on Kernel drivers for MCS7830 chip and for EHCI-HCD. I tried also use it as module and I used ‘insmod’ command to load it but still nothing. I come before question, that adapter is recognized on my notebook Ubuntu, dmesg shows that it use that kernel driver.

Then I wanted to try with Angstrom. But it uses other tools and I don’t get it yet. How to build image and toolchain… I tried to use online builder to create sdcard image, but I left that page for hours and it was still: Assembling image. This approach: http://www.angstrom-distribution.org/building-angstrom is also confusing form me. It would be great if someone could give some example how to build uImage, bootloaders and rootfs from that.

Today I will try Ubuntu. This page: http://elinux.org/BeagleBoardUbuntu seems to be great (thanks Robert! ), especially because last modification date is couple of days ago, so hope it will work. There is only one thing. Why still using Rootstock, if it is not developed since 3 years?

So I hope I will be prepared to fight for ethernet in u-boot after today :slight_smile: If not, tell me what to do more.

W dniu środa, 29 sierpnia 2012 16:34:42 UTC+2 użytkownik lazarman napisał:

3 Years is a little off, Canonical’s last commit was Feb 27, 2011, so unless you want to write me another quick/easy tool… I’ll keep maintaining/extending my rootstock fork. :wink: (In reality it’s just a debootstrap wrapper script, not much off it will ever go obsolete…)
https://github.com/RobertCNelson/project-rootstock/commits/master/

Regards,

Ok. I understand. But what about recommended on Ubuntu wiki site live-build. I suppose it must be something that it is not possible to create image with that tool. You are one of authors so you know that :slight_smile: Is that true that it can create images only for host architecture machines?
W dniu niedziela, 19 sierpnia 2012 16:31:18 UTC+2 użytkownik valdez napisał:

If that's what they recommend, then it's what they recommend... For
what I need, rootstock fits the bill, if i need something more, i just
use my netinstall script..

1: https://github.com/RobertCNelson/netinstall

Regards,