File:  [NetBSD Developer Wiki] / wikisrc / ports / evbarm / allwinner.mdwn
Revision 1.21: download - view: text, annotated - select for diffs
Wed Oct 22 00:43:23 2014 UTC (6 years, 6 months ago) by wiki
Branches: MAIN
CVS tags: HEAD
web commit by jmcneill: Document FEX script support

    1: [[!meta title="NetBSD/evbarm on Allwinner Technology SoCs"]]
    2: 
    3: [[!toc levels=2]]
    4: 
    5: # Supported boards
    6:  - [Banana Pi](http://www.bananapi.org/p/product.html) (BPI)
    7:  - Cubieboard, Cubieboard 2 (CUBIEBOARD)
    8:  - Cubietruck (CUBIETRUCK)
    9:  - [Merrii Hummingbird A31](http://www.merrii.com/en/pla_d.asp?id=172) (HUMMINGBIRD_A31)
   10: 
   11: # Supported hardware
   12:  - SoCs
   13:    - Cortex-A8: A10
   14:    - Cortex-A7: A20, A31
   15:  - SD/MMC controller (DMA)
   16:  - DMA controller
   17:  - GPIO
   18:    - Configuration using FEX scripts is supported
   19:  - UART
   20:  - I2C
   21:  - P2WI (A31)
   22:  - PMU
   23:    - AXP209 (A20)
   24:    - AXP221 (A31)
   25:  - Watchdog timer
   26:  - RTC
   27:  - Audio codec
   28:  - USB host
   29:    - OHCI
   30:    - EHCI
   31:    - OTG (not yet working on A31)
   32:  - SATA (A10/A20)
   33:  - Gigabit Ethernet (GMAC)
   34: 
   35: # TODO
   36:  - MULTIPROCESSOR is not yet stable
   37:  - HDMI (some work completed here for A20)
   38:  - Framebuffer
   39:  - OTG (A31)
   40:  - USB device mode
   41:  - Bluetooth / WiFi (Cubietruck, Hummingbird A31)
   42:  - 3G (Hummingbird A31)
   43:  - SD/MMC UHS-I support (needs sdmmc(4) changes)
   44:  - TV input (Hummingbird A31)
   45:  - NAND
   46:  - Fast Ethernet (EMAC)
   47: 
   48: # Installation
   49: 
   50: ## A10 / A20 based boards
   51: 
   52: * Start with an ARMv7 image from *evbarm-earmv7hf/binary/gzimg/* such as *beaglebone.img*
   53: * Download a U-Boot build for your board from the linux-sunxi web site <http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi/u-boot-sunxi-latest/>
   54: * Write the *u-boot-sunxi-with-spl.bin* loader to the base image:
   55: [[!template  id=programlisting text="""
   56: # dd if=u-boot-sunxi-with-spl.bin of=beaglebone.img bs=1k seek=8 conv=notrunc
   57: """]]
   58: * Write the image to an SD card.
   59: * Copy the kernel (netbsd.ub) for your board to the root of the MS-DOS partition.
   60: * Create or edit uEnv.txt on the MS-DOS partition:
   61: [[!template  id=programlisting text="""
   62: bootargs=root=ld0a
   63: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
   64: """]]
   65: 
   66: ## A31 based boards
   67: 
   68: TBD.
   69: 
   70: # Big (endian) fun
   71: 
   72: You can run this boards with a little endian (this is the default and implied by above install instructions)
   73: or with a big endian kernel and userland. However, kernel and userland endianness needs to match.
   74: 
   75: To build a big endian release (or sets) use 
   76: [[!template  id=programlisting text="""
   77: ./build.sh -m evbearmv7hf-eb 
   78: """]]
   79: where -eb means endianness big, hf is hardware floating point support, and earm is the modern "extended" ABI for ARM CPUs, and finally v7 is version 7 of the supported instruction set.
   80: 
   81: # FEX scripts
   82: 
   83: Board configuration scripts can be found here: <https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config>. You can compile them with the "fex2bin" tool found here: <https://github.com/linux-sunxi/sunxi-tools>.
   84: 
   85: To use, copy the compiled FEX to your MS-DOS partition, load it with U-Boot, and then tell the kernel where to find it with the "sysconfig=" boot option. For example, uEnv.txt on a Cubieboard2 might look like this:
   86: 
   87: [[!template  id=programlisting text="""
   88: bootargs=root=ld0a sysconfig=0x43000000
   89: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 43000000 cubieboard2.bin; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
   90: """]]
   91: 
   92: # Board specific notes
   93: 
   94: ## Merrii Hummingbird A31
   95: 
   96: There doesn't appear to be a meaningful way to generate a MAC address on these boards. U-Boot from the A31 SDK and from the u-boot-sunxi tree both lack GMAC support, and the Security ID registers (at 0x01c23800) appear to be empty.
   97: 
   98: To overcome this, you can specify your own MAC address in *uEnv.txt*:
   99: [[!template  id=programlisting text="""
  100: bootargs=root=ld0a awge0.mac-address=02:a0:3d:88:1a:1e
  101: """]]

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb