Annotation of wikisrc/ports/evbarm/allwinner.mdwn, revision 1.28

1.1       wiki        1: [[!meta title="NetBSD/evbarm on Allwinner Technology SoCs"]]
                      2: 
1.18      wiki        3: [[!toc levels=2]]
                      4: 
1.1       wiki        5: # Supported boards
1.11      wiki        6:  - [Banana Pi](http://www.bananapi.org/p/product.html) (BPI)
1.1       wiki        7:  - Cubieboard, Cubieboard 2 (CUBIEBOARD)
                      8:  - Cubietruck (CUBIETRUCK)
1.10      wiki        9:  - [Merrii Hummingbird A31](http://www.merrii.com/en/pla_d.asp?id=172) (HUMMINGBIRD_A31)
1.1       wiki       10: 
                     11: # Supported hardware
                     12:  - SoCs
                     13:    - Cortex-A8: A10
1.23      wiki       14:    - Cortex-A7: A20 (2-core), A31 (4-core)
1.14      wiki       15:  - SD/MMC controller (DMA)
1.1       wiki       16:  - DMA controller
                     17:  - GPIO
1.20      wiki       18:    - Configuration using FEX scripts is supported
1.1       wiki       19:  - UART
                     20:  - I2C
                     21:  - P2WI (A31)
                     22:  - PMU
                     23:    - AXP209 (A20)
                     24:    - AXP221 (A31)
                     25:  - Watchdog timer
                     26:  - RTC
                     27:  - Audio codec
1.14      wiki       28:  - USB host
1.1       wiki       29:    - OHCI
                     30:    - EHCI
1.14      wiki       31:    - OTG (not yet working on A31)
1.1       wiki       32:  - SATA (A10/A20)
                     33:  - Gigabit Ethernet (GMAC)
1.24      wiki       34:  - HDMI (A20/A31)
1.26      wiki       35:    - DDC / EDID mode detection
                     36:    - Audio support
1.24      wiki       37:  - Framebuffer
1.2       wiki       38: 
1.14      wiki       39: # TODO
                     40:  - OTG (A31)
                     41:  - USB device mode
                     42:  - Bluetooth / WiFi (Cubietruck, Hummingbird A31)
                     43:  - 3G (Hummingbird A31)
                     44:  - SD/MMC UHS-I support (needs sdmmc(4) changes)
1.15      wiki       45:  - TV input (Hummingbird A31)
1.16      wiki       46:  - NAND
1.19      wiki       47:  - Fast Ethernet (EMAC)
1.28    ! wiki       48:  - IR
1.14      wiki       49: 
1.2       wiki       50: # Installation
                     51: 
                     52: ## A10 / A20 based boards
                     53: 
1.3       wiki       54: * Start with an ARMv7 image from *evbarm-earmv7hf/binary/gzimg/* such as *beaglebone.img*
1.2       wiki       55: * 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/>
                     56: * Write the *u-boot-sunxi-with-spl.bin* loader to the base image:
                     57: [[!template  id=programlisting text="""
                     58: # dd if=u-boot-sunxi-with-spl.bin of=beaglebone.img bs=1k seek=8 conv=notrunc
                     59: """]]
                     60: * Write the image to an SD card.
1.12      wiz        61: * Copy the kernel (netbsd.ub) for your board to the root of the MS-DOS partition.
                     62: * Create or edit uEnv.txt on the MS-DOS partition:
1.2       wiki       63: [[!template  id=programlisting text="""
                     64: bootargs=root=ld0a
                     65: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
                     66: """]]
                     67: 
                     68: ## A31 based boards
                     69: 
                     70: TBD.
1.5       wiki       71: 
1.7       wiki       72: # Big (endian) fun
1.5       wiki       73: 
                     74: You can run this boards with a little endian (this is the default and implied by above install instructions)
1.12      wiz        75: or with a big endian kernel and userland. However, kernel and userland endianness needs to match.
1.5       wiki       76: 
                     77: To build a big endian release (or sets) use 
                     78: [[!template  id=programlisting text="""
                     79: ./build.sh -m evbearmv7hf-eb 
                     80: """]]
1.12      wiz        81: 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.
1.17      wiki       82: 
1.21      wiki       83: # FEX scripts
                     84: 
                     85: 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>.
                     86: 
                     87: 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:
                     88: 
                     89: [[!template  id=programlisting text="""
                     90: bootargs=root=ld0a sysconfig=0x43000000
                     91: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 43000000 cubieboard2.bin; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
                     92: """]]
                     93: 
1.22      wiki       94: Some pre-compiled .bin files can be found here: <http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/allwinner/fex/>
                     95: 
1.25      wiki       96: # Framebuffer console
                     97: 
                     98: To use HDMI for the console device, add *console=fb* to bootargs in uEnv.txt.
                     99: 
1.27      wiki      100: # HDMI audio
                    101: 
                    102: The default audio device is the analog audio codec. To change the default device, use the *audiocfg* command:
                    103: 
                    104: [[!template  id=programlisting text="""
                    105: a31# audiocfg list
                    106: 0: [*] audio0 @ awinac0: Allwinner CODEC A31, 2 playback channels
                    107: 1: [ ] audio1 @ awinhdmiaudio0: Allwinner HDMI 1.4, 2 playback channels
                    108: a31# audiocfg default 1
                    109: setting default audio device to audio1
                    110: a31# audiocfg list
                    111: 0: [ ] audio0 @ awinac0: Allwinner CODEC A31, 2 playback channels
                    112: 1: [*] audio1 @ awinhdmiaudio0: Allwinner HDMI 1.4, 2 playback channels
                    113: """]]
                    114: 
1.17      wiki      115: # Board specific notes
                    116: 
                    117: ## Merrii Hummingbird A31
                    118: 
                    119: 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.
                    120: 
                    121: To overcome this, you can specify your own MAC address in *uEnv.txt*:
                    122: [[!template  id=programlisting text="""
                    123: bootargs=root=ld0a awge0.mac-address=02:a0:3d:88:1a:1e
                    124: """]]

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