4.15.4. OKUD MAX9331

The USELESS Board seems useless

  • Atheros ar9331 SoC(MIPS24Kc, 400MHz, 32bit);
  • 64 MiB SDRAM;
  • 16 MiB NOR type SPI Flash Memory;
  • 3.3V TTL UART;
  • 4 GiB USB Nand Flash Disk;
  • 3 RJ45 Ports;
  • IEEE 802.11b/g;
  • 3 User LEDs;
  • 1 GPIO Button;

The useless board always shiped with the lastest barebox and kernel. OpenWRT is supported too. Perparing Hardware

solder the board in the back, use a TTL dongle connect to JP1.

TP2 -- TP3
TP1 -- TP4

|                                              |
|                                              |
|                                              |
|                                              |
|                                              |
|                          TP2                 |
|                           O  O TP1           |
|      TP3                                     |
|       O                                      |
| TP4 O                                        |
|     o o o                                    |
    Tx Rx GND Running barebox

Barebox can be program to the board with:

  • run by u-boot from tftp server
  • run barebox from RAM or burn to flash by barebox
  • run from spi flash

Barebox can be started from U-Boot using tftp. To convert barebox.bin to u-boot uImage format:

$ mkimage -A mips -O linux -T kernel -C none -a a0060000 -e a0060000 -n 'Barebox uImage' -d images/barebox-okud-max9331.img uImage
$ cp uImage /var/lib/tftpboot

connect your board to your tftp-server network via Ethernet. next, setup network on MAX9331 and run:

hornet> set ipaddr
hornet> set serverip
hornet> tftpboot 0x81000000 uImage

run from ram:

hornet> bootm 0x81000000

or burn to flash, replace the 0x40000 to your uImage real size,

hornet> erase 0x9f020000 +0x40000
hornet> cp.b 0x81000000 0x9f020000 0x40000
hornet> reset

if your board preinstalled with barebox:

run barebox from ram by barebox

copy the image to tftp server folder

$ cp images/barebox-okud-max9331.img /var/lib/tftpboot/none-barebox-max9331

enable dhcp service on the network

global net.server=
boot bnet

if you want to make it valid next boot

nv net.server=
boot bnet

update barebox by barebox

barebox_update /mnt/tftp/none-barebox-max9331

run from spi flash

max9331 has 16MiB spi flash on board, layout is like this

| boot0 | ... | barebox | ... | art |

by default, the barebox bootloader is not located in the begginning of flash, instead we have a so called program boot0, it is a very simple program, it jump to 0x9f020000 where the first instruction of barebox. This is usefull when debug with jtag or choosing different bootloaders. or even boot kernel without bootloader.

lui  ra, 0x9f02
jr   ra

b    .