Annotation of wikisrc/ports/evbarm/allwinner.mdwn, revision 1.43
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.38 wiki 8: - [Cubieboard 4](http://cubieboard.org/model/cb4/) (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
1.36 wiki 22: - P2WI (A31) / RSB (A80)
1.1 wiki 23: - PMU
1.36 wiki 24: - AXP209 (A20)
1.1 wiki 25: - AXP221 (A31)
1.36 wiki 26: - AXP806 (A80)
27: - AXP809 (A80)
1.1 wiki 28: - Watchdog timer
29: - RTC
1.37 wiki 30: - A20/A31: integrated RTC, PCF8563
31: - A80: AC100
32: - Audio codec (A20/A31)
1.14 wiki 33: - USB host
1.1 wiki 34: - OHCI
35: - EHCI
1.37 wiki 36: - OTG (A20)
1.1 wiki 37: - SATA (A10/A20)
38: - Gigabit Ethernet (GMAC)
1.24 wiki 39: - HDMI (A20/A31)
1.26 wiki 40: - DDC / EDID mode detection
41: - Audio support
1.37 wiki 42: - Framebuffer (A20/A31)
1.39 wiki 43: - IR receiver (A20/A31/A80)
1.2 wiki 44:
1.14 wiki 45: # TODO
1.40 wiki 46: - A10
47: - Interrupt controller
48: - EMAC
49: - A31
50: - OTG
51: - IR transmitter
52: - 3G module
53: - TV input
54: - A80
55: - MP
56: - big.LITTLE support
57: - USB3 (OTG and XHCI)
58: - IR transmitter
59: - HDMI
60: - Audio codec
61: - All
62: - USB device mode
63: - SD/MMC UHS-I support (needs sdmmc(4) changes)
64: - SDIO (Bluetooth / WiFi)
65: - NAND
1.14 wiki 66:
1.2 wiki 67: # Installation
68:
1.34 wiki 69: ## A10 / A20 / A31 based boards
1.2 wiki 70:
1.33 snj 71: * Start with an ARMv7 image from *evbarm-earmv7hf/binary/gzimg/* such as *beagleboard.img*
1.34 wiki 72: * Download a U-Boot build for your board
73: * 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/>
74: * 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.43 ! mrg 75: * Write the *u-boot-sunxi-with-spl.bin* loader to the empty space at the start of the base image:
1.2 wiki 76: [[!template id=programlisting text="""
1.33 snj 77: # dd if=u-boot-sunxi-with-spl.bin of=beagleboard.img bs=1k seek=8 conv=notrunc
1.2 wiki 78: """]]
79: * Write the image to an SD card.
1.43 ! mrg 80: * Copy the kernel (netbsd.ub) for your board to the root of the MS-DOS partition on the SD card.
1.12 wiz 81: * Create or edit uEnv.txt on the MS-DOS partition:
1.2 wiki 82: [[!template id=programlisting text="""
83: bootargs=root=ld0a
84: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
85: """]]
86:
1.35 wiki 87: ## A80 based boards
88:
89: * Cubieboard 4 SDK (lubuntu) U-Boot env:
90: [[!template id=programlisting text="""
91: baudrate=115200
92: boot_normal=fatload mmc 0:1 20007800 uimage;bootm 20007800
93: bootcmd=run setargs_cubie boot_normal
94: bootdelay=3
95: console=ttyS0,115200
96: console1=tty1
97: init=/init
98: loglevel=8
99: mmc_root=/dev/mmcblk0p2
100: setargs_cubie=setenv bootargs console=${console1} console=${console} root=${mmc_root} loglevel=${loglevel}
101: stderr=serial
102: stdin=serial
103: stdout=serial
104: """]]
105:
1.7 wiki 106: # Big (endian) fun
1.5 wiki 107:
108: You can run this boards with a little endian (this is the default and implied by above install instructions)
1.12 wiz 109: or with a big endian kernel and userland. However, kernel and userland endianness needs to match.
1.5 wiki 110:
111: To build a big endian release (or sets) use
112: [[!template id=programlisting text="""
113: ./build.sh -m evbearmv7hf-eb
114: """]]
1.12 wiz 115: 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 116:
1.21 wiki 117: # FEX scripts
118:
119: 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>.
120:
121: 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:
122:
123: [[!template id=programlisting text="""
124: bootargs=root=ld0a sysconfig=0x43000000
125: uenvcmd=mmc dev 0; mmc rescan; fatload mmc 0:1 43000000 cubieboard2.bin; fatload mmc 0:1 82000000 netbsd.ub; bootm 82000000
126: """]]
127:
1.22 wiki 128: Some pre-compiled .bin files can be found here: <http://ftp.netbsd.org/pub/NetBSD/misc/jmcneill/allwinner/fex/>
129:
1.25 wiki 130: # Framebuffer console
131:
132: To use HDMI for the console device, add *console=fb* to bootargs in uEnv.txt.
133:
1.29 wiki 134: 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
135:
1.27 wiki 136: # HDMI audio
137:
138: The default audio device is the analog audio codec. To change the default device, use the *audiocfg* command:
139:
140: [[!template id=programlisting text="""
141: a31# audiocfg list
142: 0: [*] audio0 @ awinac0: Allwinner CODEC A31, 2 playback channels
143: 1: [ ] audio1 @ awinhdmiaudio0: Allwinner HDMI 1.4, 2 playback channels
144: a31# audiocfg default 1
145: setting default audio device to audio1
146: a31# audiocfg list
147: 0: [ ] audio0 @ awinac0: Allwinner CODEC A31, 2 playback channels
148: 1: [*] audio1 @ awinhdmiaudio0: Allwinner HDMI 1.4, 2 playback channels
149: """]]
150:
1.42 wiki 151: # MAC address
1.17 wiki 152:
1.42 wiki 153: On boards where the ethernet MAC address cannot be determmined, a random MAC address will be generated every boot. You can override this behaviour by specifying a MAC address in *uEnv.txt*:
1.17 wiki 154: [[!template id=programlisting text="""
155: bootargs=root=ld0a awge0.mac-address=02:a0:3d:88:1a:1e
156: """]]
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb