Annotation of wikisrc/ports/evbarm/allwinner.mdwn, revision 1.35
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.31 wiki 7: - Cubieboard 2 (CUBIEBOARD)
1.35 ! wiki 8: - Cubieboard 4 (ALLWINNER_A80) *NetBSD-current*
1.1 wiki 9: - Cubietruck (CUBIETRUCK)
1.10 wiki 10: - [Merrii Hummingbird A31](http://www.merrii.com/en/pla_d.asp?id=172) (HUMMINGBIRD_A31)
1.1 wiki 11:
12: # Supported hardware
13: - SoCs
1.35 ! wiki 14: - Cortex-A7: A20 (2-core), A31 (4-core), A80
! 15: - Cortex-A7/A15: A80 (4-core A7 + 4-core A15)
1.14 wiki 16: - SD/MMC controller (DMA)
1.1 wiki 17: - DMA controller
18: - GPIO
1.20 wiki 19: - Configuration using FEX scripts is supported
1.1 wiki 20: - UART
21: - I2C
22: - P2WI (A31)
23: - PMU
1.35 ! wiki 24: - AXP209 (A20, A80)
1.1 wiki 25: - AXP221 (A31)
26: - Watchdog timer
27: - RTC
28: - Audio codec
1.14 wiki 29: - USB host
1.1 wiki 30: - OHCI
31: - EHCI
1.14 wiki 32: - OTG (not yet working on A31)
1.1 wiki 33: - SATA (A10/A20)
34: - Gigabit Ethernet (GMAC)
1.24 wiki 35: - HDMI (A20/A31)
1.26 wiki 36: - DDC / EDID mode detection
37: - Audio support
1.24 wiki 38: - Framebuffer
1.32 wiki 39: - IR receiver (A20/A31)
1.2 wiki 40:
1.14 wiki 41: # TODO
1.31 wiki 42: - SoCs
43: - Cortex-A8: A10
1.35 ! wiki 44: - Cortex-A7/A15: A80 SMP
1.14 wiki 45: - OTG (A31)
46: - USB device mode
47: - Bluetooth / WiFi (Cubietruck, Hummingbird A31)
48: - 3G (Hummingbird A31)
49: - SD/MMC UHS-I support (needs sdmmc(4) changes)
1.15 wiki 50: - TV input (Hummingbird A31)
1.16 wiki 51: - NAND
1.19 wiki 52: - Fast Ethernet (EMAC)
1.32 wiki 53: - IR transmitter (A20)
1.14 wiki 54:
1.2 wiki 55: # Installation
56:
1.34 wiki 57: ## A10 / A20 / A31 based boards
1.2 wiki 58:
1.33 snj 59: * Start with an ARMv7 image from *evbarm-earmv7hf/binary/gzimg/* such as *beagleboard.img*
1.34 wiki 60: * Download a U-Boot build for your board
61: * A10/A20: Download from the linux-sunxi web site <http://dl.linux-sunxi.org/nightly/u-boot-sunxi/u-boot-sunxi/u-boot-sunxi-latest/>
62: * A31: The standard u-boot-sunxi tree doesn't support A31 yet. Until sun6i support is merged, a build is available at <http://dis.invisible.ca/allwinner/a31/>
1.2 wiki 63: * Write the *u-boot-sunxi-with-spl.bin* loader to the base image:
64: [[!template id=programlisting text="""
1.33 snj 65: # dd if=u-boot-sunxi-with-spl.bin of=beagleboard.img bs=1k seek=8 conv=notrunc
1.2 wiki 66: """]]
67: * Write the image to an SD card.
1.12 wiz 68: * Copy the kernel (netbsd.ub) for your board to the root of the MS-DOS partition.
69: * Create or edit uEnv.txt on the MS-DOS partition:
1.2 wiki 70: [[!template id=programlisting text="""
71: bootargs=root=ld0a
72: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
73: """]]
74:
1.35 ! wiki 75: ## A80 based boards
! 76:
! 77: * Cubieboard 4 SDK (lubuntu) U-Boot env:
! 78: [[!template id=programlisting text="""
! 79: baudrate=115200
! 80: boot_normal=fatload mmc 0:1 20007800 uimage;bootm 20007800
! 81: bootcmd=run setargs_cubie boot_normal
! 82: bootdelay=3
! 83: console=ttyS0,115200
! 84: console1=tty1
! 85: init=/init
! 86: loglevel=8
! 87: mmc_root=/dev/mmcblk0p2
! 88: setargs_cubie=setenv bootargs console=${console1} console=${console} root=${mmc_root} loglevel=${loglevel}
! 89: stderr=serial
! 90: stdin=serial
! 91: stdout=serial
! 92: """]]
! 93:
1.7 wiki 94: # Big (endian) fun
1.5 wiki 95:
96: You can run this boards with a little endian (this is the default and implied by above install instructions)
1.12 wiz 97: or with a big endian kernel and userland. However, kernel and userland endianness needs to match.
1.5 wiki 98:
99: To build a big endian release (or sets) use
100: [[!template id=programlisting text="""
101: ./build.sh -m evbearmv7hf-eb
102: """]]
1.12 wiz 103: 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 104:
1.21 wiki 105: # FEX scripts
106:
107: 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>.
108:
109: 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:
110:
111: [[!template id=programlisting text="""
112: bootargs=root=ld0a sysconfig=0x43000000
113: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 43000000 cubieboard2.bin; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
114: """]]
115:
1.22 wiki 116: Some pre-compiled .bin files can be found here: <http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/allwinner/fex/>
117:
1.25 wiki 118: # Framebuffer console
119:
120: To use HDMI for the console device, add *console=fb* to bootargs in uEnv.txt.
121:
1.29 wiki 122: If the connected display does not let you disable overscan, you can add a margin to the framebuffer by with the *fb.margin* bootargs option. For example, to set a 25-pixel margin around the screen, add *fb.margin=25* to uEnv.txt
123:
1.27 wiki 124: # HDMI audio
125:
126: The default audio device is the analog audio codec. To change the default device, use the *audiocfg* command:
127:
128: [[!template id=programlisting text="""
129: a31# audiocfg list
130: 0: [*] audio0 @ awinac0: Allwinner CODEC A31, 2 playback channels
131: 1: [ ] audio1 @ awinhdmiaudio0: Allwinner HDMI 1.4, 2 playback channels
132: a31# audiocfg default 1
133: setting default audio device to audio1
134: a31# audiocfg list
135: 0: [ ] audio0 @ awinac0: Allwinner CODEC A31, 2 playback channels
136: 1: [*] audio1 @ awinhdmiaudio0: Allwinner HDMI 1.4, 2 playback channels
137: """]]
138:
1.17 wiki 139: # Board specific notes
140:
141: ## Merrii Hummingbird A31
142:
143: 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.
144:
145: To overcome this, you can specify your own MAC address in *uEnv.txt*:
146: [[!template id=programlisting text="""
147: bootargs=root=ld0a awge0.mac-address=02:a0:3d:88:1a:1e
148: """]]
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb