bc10
bc10-router

tftpboot

To use u-boot-arm and USB-Ethernet adapter corresponding to OMAP3 EHCI, any OMAP 3 based device, which does not directly solder an Ethernet connector on its PCB such bc10, can apply tftpboot.

To use tftpboot, the system can boot without rewriting an uImage on a SD card. This is useful when the addition of drivers and modifications of kernel are frequently done, and it makes the developing process more efficient than before it is used.

To take advantage of the ease of renewing uImage, tftp server is generally configured at the machine which builds kernel.

Since kernel of bc10-router is built with Toolchain of arago-project, this article assumes that Ubuntu 10.04 is its build environment.

USB-Ethernet adapter

The list of USB-Ethernet adapters, which work with tftpboot, is located at the directory of u-boot-arm/drivers/usb/eith/asx.c. Specifically, these USB-Ethernet adapters have to work with u-boot, which can handle tftpboot. The contents of the list suggest VernderID: ProductID.

static const struct asix_dongle const asix_dongles[] = {
        { 0x05ac, 0x1402, FLAG_TYPE_AX88772 },  /* Apple USB Ethernet Adapter */
        { 0x07d1, 0x3c05, FLAG_TYPE_AX88772 },  /* D-Link DUB-E100 H/W Ver B1 */
        /* Cables-to-Go USB Ethernet Adapter */
        { 0x0b95, 0x772a, FLAG_TYPE_AX88772 },
        { 0x0b95, 0x7720, FLAG_TYPE_AX88772 },  /* Trendnet TU2-ET100 V3.0R */
        { 0x0b95, 0x1720, FLAG_TYPE_AX88172 },  /* SMC */
        { 0x0db0, 0xa877, FLAG_TYPE_AX88772 },  /* MSI - ASIX 88772a */
        { 0x13b1, 0x0018, FLAG_TYPE_AX88172 },  /* Linksys 200M v2.1 */
        { 0x1557, 0x7720, FLAG_TYPE_AX88772 },  /* 0Q0 cable ethernet */
        /* DLink DUB-E100 H/W Ver B1 Alternate */
        { 0x2001, 0x3c05, FLAG_TYPE_AX88772 },
        /* ASIX 88772B */
        { 0x0b95, 0x772b, FLAG_TYPE_AX88772B | FLAG_EEPROM_MAC },
        { 0x0000, 0x0000, FLAG_NONE }   /* END - Do not remove */
};

As of January 2013, Buffalo LUA-U2-ATX is widely available at Japanese market.
To check its VenderID and Product ID, use lsusb, its output is shown below.

Bus 001 Device 004: ID 0b95:7720 ASIX Electronics Corp. AX88772

Configuration of tftp server

Ubuntu 10.04 offers the several packages of tftp servers. This article uses atftpad.

$ sudo apt-get install atftpd

For the boot management, openbsd-inetd is installed together. However, once xinetd is installed, openbsd-inetd is removed, automatically.

$ sudo apt-get install xinetd

Edit tftp configuration file at xinetd.

$ sudo vim /etc/xinetd/tftpd

The contents of rftp configuration file are shown below.

service tftp
{
    protocol        = udp
    port            = 69
    socket_type     = dgram
    wait            = yes
    user            = nobody
    group           = nobody
    server          = /usr/sbin/in.tftpd
    server_args     = --logfile /var/log/atftpd.log /var/lib/tftpboot
    only_from       = 192.168.0.0/24
    disable         = no
}

only_from should change to the specific network address that you are currently using.
server_args specifies the location, which stores kernel uImage.

$ cd /var/lib
$ sudo mkdir tftpboot

The location and name of the log file, which records the status of connections to tftp, is specified as /ver/log/atfpd.log. Then, the log file is created.

$ sudo touch /var/log/atftpd.log
$ sudo chown nobody:nobody /var/log/atftpd.log

Reboot xinetd.

$ sudo /etc/init.d/xinetd restart

The configuration of tftp server is completed.

The name of kernel uImage, which tftp load, is uImage.beagle, and this image has to be stored at /var/lib/tftpboot. uImage is created by the way bc10-router/kernel update describes. Then, the image will be coped from kernel directory, which is shown below.

$ sudo cp ~/linux-stable/arch/arm/boot/uImage /var/lib/tftpboot/uImage.beagle

Configuration of bc10 tftpboot

Connect a USB-Ethernet adapter to the USB connector of bc10, directory or via a USB-Hub. Enable to input commands from the serial console, then boot bc10.

Start up u-boot. Input the key while loading kernel, then bc10 will shift to command line interface.

U-Boot 2012.10-12320-g39826f0 (Oct 22 2012 - 17:03:16)

OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 600 mHz
OMAP3 Beagle board + LPDDR/NAND
I2C:   ready
DRAM:  256 MiB
NAND:  512 MiB
MMC:   OMAP SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Beagle Rev C1/C2/C3
No EEPROM on expansion board
Die ID #4ada00040000000004037b700d01401a
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  3
OMAP3 beagleboard.org #

Let this USB-Ethernet adapter be recognized, configure the network for tftp, and load uImage.
ipaddr indicates IP address that is set up at bc10.
serverip is IP address that tftp server.

OMAP3 beagleboard.org # usb start
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
       scanning usb for ethernet devices...
Warning: asx0 using MAC address from net device
1 Ethernet Device(s) found
OMAP3 beagleboard.org # setenv ipaddr 192.168.0.128
OMAP3 beagleboard.org # setenv netmask 255.255.255.0
OMAP3 beagleboard.org # setenv serverip 192.168.0.203
OMAP3 beagleboard.org # tftpboot

After tftpboot is executed, if uImage.geagle is read correctly, the log shown below displayed.

Waiting for Ethernet connection... done.
Using asx0 device
TFTP from server 192.168.0.203; our IP address is 192.168.0.128
Filename 'uImage.beagle'.
Load address: 0x80200000
Loading: T #################################################################
#################################################################
#################################################################
###################
done
Bytes transferred = 3137352 (2fdf48 hex)

When uImage is read into memory correctly, bootargs is configured.

OMAP3 beagleboard.org # setenv bootargs console=ttyO2,115200n8 mpurate=auto buddy=none camera=none vram=12M omapfb.mode=dvi:640x480MR-16@60 omapdss.def disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait

To execute bootm command, if it works correctly, the configuration is OK.

OMAP3 beagleboard.org # bootm
## Booting kernel from Legacy Image at 80200000 ...
   Image Name:   Arago/3.7.2/beagleboard
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3425904 Bytes = 3.3 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.7.2 (otsuka@bc10-dev) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #1 Fri Jan 25 22:45:08 JST 2012
[    0.000000] CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c53c7d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: OMAP3 Beagle Board
Skipping...

If there are items that you like to set at startup u-boot, please modify the configuration appropriately, such as adding no_suspend_console to bootargs.

Revision History

  • 2013-08-09 This article is initially uploaded.

Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   RSS of recent changes
Last-modified: 2013-08-09 (Fri) 12:03:11 (1774d)