Differences between revisions 38 and 153 (spanning 115 versions)
Revision 38 as of 2014-12-31 10:35:14
Size: 23458
Editor: ?IanCampbell
Comment:
Revision 153 as of 2021-09-26 09:40:03
Size: 43816
Comment: fix consistently add extension to dtb files
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
Support for boards using the Allwinner "sunxi" (sun4i, sun5i, sun7i etc) family of processors, e.g. A10, A13, A20, etc. Support for boards using the Allwinner "sunxi"
(sun4i, sun5i, sun6i, sun7i, sun8i, sun50i) family of processors,
e.g. A10, A13, A31/A31s, A20, A23/A33, A64, etc.
Line 11: Line 13:
Debian-installer should work out of the box on all the following sunxi-based systems, but as the developers do not have access to all of them, the installer has only been tested on particular systems. If you have used the installer on one of the untested systems, please submit an installation-report to the Debian project (cf. the [[http://d-i.debian.org/manual/en.armhf/ch05s04.html#submit-bug|Submitting Installation Reports]] chapter in the Debian installation-guide).

=== Systems tested and confirmed working ===

||'''System'''||'''Device Tree Blob'''||
||
[[https://bugs.debian.org/770904|Cubietech Cubieboard]]||`sun4i-a10-cubieboard.dtb`||
Debian-installer should work out of the box on all the following sunxi-based systems,
but as the developers do not have access to all of them,
the installer has only been tested on particular systems.
If you have used the installer on one of the untested systems,
please submit an installation-report to the Debian project
(cf. the [[http://d-i.debian.org/manual/en.armhf/ch05s04.html#submit-bug|Submitting Installation Reports]]
chapter in the Debian installation-guide).

=== Stable ===

Hardware systems tested and confirmed working in Bullseye or older.

||'''System'''||'''Device Tree Blob'''||'''Notes'''||
||Cubietech Cubieboard||`sun4i-a10-cubieboard.dtb`||Installation Reports:
[[https://bugs.debian.org/770904|[1]]], [[https://bugs.debian.org/775748|[2]]], [[#Cubietech_Cubietruck|Wiki notes]]||
Line 19: Line 29:
||!LeMaker Banana Pi || `sun7i-a20-bananapi.dtb`|| needs mainline u-boot v2014.10 or newer||
||Olimex A10-OLinuXino-LIME||`sun4i-a10-olinuxino-lime.dtb`|| needs mainline u-boot v2014.10rc3 or newer; (outdated) manual installation information: [[InstallingDebianOn/Allwinner/A10-OLinuXino-LIME]] ||
||[[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774176|Olimex A20-Olinuxino Micro]]||`sun7i-a20-olinuxino-micro.dtb`||

=== Systems for which the installer has support code, but on which installation has not been tested yet ===

||'''System'''||'''Device Tree Blob'''||
||!LeMaker Banana Pi || `sun7i-a20-bananapi.dtb`||
||!LeMaker Banana Pro || `sun7i-a20-bananapro.dtb`|| [[https://bugs.debian.org/780493|Installation Report]] ||
||Olimex A10-OLinuXino-LIME||`sun4i-a10-olinuxino-lime.dtb`||
||Olimex A10s-Olinuxino Micro||`sun5i-a10s-olinuxino-micro.dtb`||[[https://bugs.debian.org/806240|Installation Report]]||
||Olimex A20-OLinuXino-LIME||`sun7i-a20-olinuxino-lime.dtb`|| [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777334|Installation Report]]||
||Olimex A20-OLinuXino-LIME2||`sun7i-a20-olinuxino-lime2.dtb`|| [[https://bugs.debian.org/780164|Installation Report]], [[#Olimex_A20-OLinuXino-LIME2_rev._K|Wiki notes]]||
||Olimex A20-Olinuxino Micro||`sun7i-a20-olinuxino-micro.dtb`||[[https://bugs.debian.org/774176|Installation Report]]||
||Olimex A20-SOM-EVB||`sun7i-a20-olimex-som-evb.dtb`||[[https://bugs.debian.org/815831|Installation Report]] (gigabit ethernet issues)||
||Olimex A64 Teres-I||`sun50i-a64-teres-i.dtb`|| [[InstallingDebianOn/Olimex/Teres-I|Wiki page]]||
||Pine64||`sun50i-a64-pine64.dtb`|| [[InstallingDebianOn/PINE64/PINEA64|Wiki page]]||
||Pine64+||`sun50i-a64-pine64-plus.dtb`|| [[InstallingDebianOn/PINE64/PINEA64|Wiki page]]||

=== Stable untested ===

Hardware systems for which the installer has support code in Bullseye or older,
but on which installation has not been tested yet.

If you succeed in installing Debian on one of these boards,
then please file an installation report.

||'''System'''||'''Device Tree Blob'''||'''Notes'''||
||Banana Pi BPI-M2-Ultra||`sun8i-r40-bananapi-m2-ultra.dtb`||
||Cubietech Cubieboard4||`sun9i-a80-cubieboard4.dtb`||
||Cubietech Cubietruck Plus (Cubieboard5)||`sun8i-a83t-cubietruck-plus.dtb`||
||!FriendlyARM !NanoPi NEO 2||`sun50i-h5-nanopi-neo2.dtb`||
||!FriendlyARM !NanoPi NEO Plus2||`sun50i-h5-nanopi-neo-plus2.dtb`||
||Lamobo R1||`sun7i-a20-lamobo-r1.dtb`||
||!LinkSprite pcDuino||`sun4i-a10-pcduino.dtb`||
||!LinkSprite pcDuino3||`sun7i-a20-pcduino3.dtb`||
||Nano Pi Neo||`sun8i-h3-nanopi-neo.dtb`||
||Nano Pi Neo Air||`sun8i-h3-nanopi-neo-air.dtb`||
||NextThing C.H.I.P.||`sun5i-r8-chip.dtb`||
||Olimex A20-OLinuXino-LIME2-eMMC||`sun7i-a20-olinuxino-lime2-emmc.dtb`||
||Olimex A64-OLinuxino||`sun50i-a64-olinuxino.dtb`||
||Olimex A64-OLinuxino-eMMC||`sun50i-a64-olinuxino-emmc.dtb`||
||Orange Pi Plus||`sun8i-h3-orangepi-plus.dtb`||
||OrangePi One Plus||`sun50i-h6-orangepi-one-plus.dtb`||
||!OrangePi Zero Plus2||`sun50i-h5-orangepi-zero-plus2.dtb`||
||Pine64 LTS||`sun50i-a64-pine64-lts.dtb`||
||Pine64 PinePhone Braveheart (1.1)||`sun50i-a64-pinephone-1.1.dtb`||
||Pine64 PinePhone (1.2)||`sun50i-a64-pinephone-1.2.dtb`||
||PineRiver Mini X-Plus||`sun4i-a10-mini-xplus.dtb`||
||Pinebook||`sun50i-a64-pinebook.dtb`||
||PineTab||`sun50i-a64-pinetab.dtb`||
||Sinovoip Banana Pi M3||`sun8i-a83t-bananapi-m3.dtb`||
||Sinovoip Banana Pi M2 Berry||`sun8i-v40-bananapi-m2-berry.dtb`||[[#Banana_PI_M2_Berry|Wiki notes]]||
||Xunlong Orange Pi Zero||`sun8i-h2-plus-orangepi-zero.dtb`||

=== Unstable ===

##Hardware systems supported only in Sid/Bookworm (tested and confirmed working).
##
##||'''System'''||'''Device Tree Blob'''||'''Notes'''||

=== Unstable untested ===

Hardware systems for which the Sid installer has support code,
but on which installation has not been tested yet.

If you succeed in installing Debian on one of these boards,
then please file an installation report.

||'''System'''||'''Device Tree Blob'''||'''Notes'''||

The installer can also be used on other sunxi-based systems
as long as device-tree support for them is available,
but on those systems manual intervention during the installation is required
(see [[#Installing on systems that are not supported out of the box|below]]).

== Unsupported Platforms ==

=== Unsupported installer ===

Hardware systems that should work using purely Debian
with all essential parts available in same release of Debian,
but involving custom setup of debian-installer.

If you succeed in installing Debian on one of these boards
(e.g. by manually adding the official Debian u-boot
to a "bare" debian-installer SD-card image),
then please a) file an installation report,
and b) consider offering your help to the installer team
to get it supported officially in Debian.

||'''System'''||'''Device Tree Blob'''||'''Notes'''||
||Cubietech Cubieboard4||`sun9i-a80-cubieboard4.dtb`||
||!NextThing C.H.I.P.||`sun5i-r8-chip.dtb`||
||Orange Pi Zero||`sun8i-h2-plus-orangepi-zero.dtb`||
||!PineRiver Mini X-Plus||`sun4i-a10-mini-xplus.dtb`||
||!SoPine with baseboard||`sun50i-a64-sopine-baseboard.dtb`||kernel in Bullseye but u-boot only since Bookworm||

=== Unsupported bootstrapping ===

Hardware systems which should work with linux kernel packages officially part of Debian,
but lacks boot support in official Debian u-boot or some related package.

If you succeed in installing Debian on one of these boards
(e.g. using a fork of the official Debian u-boot package
combined with a "bare" debian-installer SD-card image),
then please a) file an installation report,
and b) consider offering your help to the u-boot maintainers
to get the board supported officially in Debian.

||'''System'''||'''Device Tree Blob'''||'''Notes'''||
||A10s-Wobo i5||`sun5i-a10s-wobo-i5.dtb`||
||Allwinner A23 Evaluation Board||`sun8i-a23-evb.dtb`||
||Allwinner A31 APP4 EVB1 Evaluation Board||`sun6i-a31-app4-evb1.dtb`||
||Allwinner A83T !H8Homlet Proto Dev Board v2.0||`sun8i-a83t-allwinner-h8homlet-v2.dtb`||
||Allwinner GA10H Quad Core Tablet (v1.1)||`sun8i-a33-ga10h-v1.1.dtb`||
||Allwinner GT90H Dual Core Tablet (v4)||`sun8i-a23-gt90h-v4.dtb`||
||Allwinner R16 EVB (Parrot)||`sun8i-r16-parrot.dtb`||
||Amarula A64-Relic||`sun50i-a64-amarula-relic.dtb`||
||Auxtek t003 A10s hdmi tv-stick||`sun5i-a10s-auxtek-t003.dtb`||
||Auxtek t004 A10s hdmi tv-stick||`sun5i-a10s-auxtek-t004.dtb`||
||BA10 tvbox||`sun4i-a10-ba10-tvbox.dtb`||
||Banana Pi BPI-M1-Plus||`sun7i-a20-bananapi-m1-plus.dtb`||
||Banana Pi BPI-M2-Plus||`sun8i-h3-bananapi-m2-plus.dtb`||
||Banana Pi BPI-M2-Plus H5||`sun50i-h5-bananapi-m2-plus-v1.2.dtb`||
||Banana Pi BPI-M2-Plus v1.2 H3||`sun8i-h3-bananapi-m2-plus-v1.2.dtb`||
||Banana Pi BPI-M2-Plus v1.2 H5||`sun50i-h5-bananapi-m2-plus.dtb`||
||Banana Pi BPI-M2-Ultra||`sun8i-r40-bananapi-m2-ultra.dtb`||
||Banana Pi BPI-M2-Zero||`sun8i-h2-plus-bananapi-m2-zero.dtb`||
||!BananaPi M2 Magic||`sun8i-r16-bananapi-m2m.dtb`||
||!BananaPi-M64||`sun50i-a64-bananapi-m64.dtb`||
||Beelink GS1||`sun50i-h6-beelink-gs1.dtb`||
||Beelink X2||`sun8i-h3-beelink-x2.dtb`||
||Chuwi V7 CW0825 - CSQ CS908 top set box||`sun4i-a10-chuwi-v7-cw0825.dtb`||
||Colorfly E708 Q1 tablet||`sun6i-a31s-colorfly-e708-q1.dtb`||
||CSQ CS908 top set box||`sun6i-a31s-cs908.dtb`||
||Difrnce DIT4350||`sun5i-a13-difrnce-dit4350.dtb`||
||Dserve DSRV9703C||`sun4i-a10-dserve-dsrv9703c.dtb`||
||Emlid Neutis N5 Developer board||`sun50i-h5-emlid-neutis-n5-devboard.dtb`||
||Emlid Neutis !N5H3 Developer board||`sun8i-h3-emlid-neutis-n5h3-devboard.dtb`||
||Empire Electronix D709 tablet||`sun5i-a13-empire-electronix-d709.dtb`||
||Empire Electronix M712 tablet||`sun5i-a13-empire-electronix-m712.dtb`||
||ET Q8 Quad Core Tablet (v1.6)||`sun8i-a33-et-q8-v1.6.dtb`||
||FriendlyARM !NanoPi A64||`sun50i-a64-nanopi-a64.dtb`||
||FriendlyARM !NanoPi Duo2||`sun8i-h3-nanopi-duo2.dtb`||
||!FriendlyArm !NanoPi M1 Plus||`sun8i-h3-nanopi-m1-plus.dtb`||
||!FriendlyArm !NanoPi M1||`sun8i-h3-nanopi-m1.dtb`||
||Gemei G9 Tablet||`sun4i-a10-gemei-g9.dtb`||
||HAOYU Electronics Marsboard A10||`sun4i-a10-marsboard.dtb`||
||HSG H702||`sun5i-a13-hsg-h702.dtb`||
||Hyundai A7HD||`sun4i-a10-hyundai-a7hd.dtb`||
||I12 / Q5 / QT840A A20 tvbox||`sun7i-a20-i12-tvbox.dtb`||
||ICnova-A20 SWAC||`sun7i-a20-icnova-swac.dtb`||
||iNet-1||`sun4i-a10-inet1.dtb`||
||INet-86DZ Rev 01||`sun8i-a23-inet86dz.dtb`||
Line 27: Line 178:
||!LinkSprite pcDuino||`sun4i-a10-pcduino.dtb`||
||Mele A1000||`sun4i-a10-a1000.dtb`||
||INet-98V Rev 02||`sun5i-a13-inet-98v-rev2.dtb`||
||iNet-9F Rev 03||`sun4i-a10-inet9f-rev03.dtb`||
||INet-D978 Rev 02||`sun8i-a33-inet-d978-rev2.dtb`||
||iNet Q972 tablet||`sun6i-a31s-inet-q972.dtb`||
||Ippo Q8H Dual Core Tablet (v1.2)||`sun8i-a23-ippo-q8h-v1.2.dtb`||
||Ippo Q8H Dual Core Tablet (v5)||`sun8i-a23-ippo-q8h-v5.dtb`||
||Itead Ibox A20||`sun7i-a20-itead-ibox.dtb`||
||Iteaduino Plus A10||`sun4i-a10-itead-iteaduino-plus.dtb`||
||Jesurun Q5||`sun4i-a10-jesurun-q5.dtb`||
||Lamobo R1 [Linutronix Testbox v2]||`sun7i-a20-linutronix-testbox-v2.dtb`||
||Libre Computer Board ALL-H3-CC H2+||`sun8i-h2-plus-libretech-all-h3-cc.dtb`||
||Libre Computer Board ALL-H3-CC H3||`sun8i-h3-libretech-all-h3-cc.dtb`||
||Libre Computer Board ALL-H3-CC H5||`sun50i-h5-libretech-all-h3-cc.dtb`||
||Libre Computer Board ALL-H3-IT H5||`sun50i-h5-libretech-all-h3-it.dtb`||
||Libre Computer Board ALL-H5-CC H5||`sun50i-h5-libretech-all-h5-cc.dtb`||
||Lichee Pi One||`sun5i-a13-licheepi-one.dtb`||
||Lichee Pi Zero||`sun8i-v3s-licheepi-zero.dtb`||
||Lichee Pi Zero with Dock||`sun8i-v3s-licheepi-zero-dock.dtb`||
||!LinkSprite pcDuino2||`sun4i-a10-pcduino2.dtb`||
||!LinkSprite pcDuino3 Nano||`sun7i-a20-pcduino3-nano.dtb`|| requires (at least) non-Debian U-boot; on-board Ethernet card needs a non-free firmware, on-board 4GB Flash doesn't work out-of-the-box||
||!MapleBoard MP130||`sun8i-h3-mapleboard-mp130.dtb`||
||Mele A1000G Quad top set box||`sun6i-a31-mele-a1000g-quad.dtb`||
||Mele A1000||`sun4i-a10-a1000.dtb`||[[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879385|Installation Report]] requires custom build of mainline U-boot; on-board wifi card needs a non-free firmware, installation done via eth||
||Mele I7 Quad top set box||`sun6i-a31-i7.dtb`||
||Mele M3||`sun7i-a20-m3.dtb`||
||Mele M9 top set box||`sun6i-a31-m9.dtb`||
||Merrii A20 Hummingbird||`sun7i-a20-hummingbird.dtb`||
||Merrii A31 Hummingbird||`sun6i-a31-hummingbird.dtb`||
||Merrii A80 Optimus Board||`sun9i-a80-optimus.dtb`||
Line 30: Line 208:
||Olimex A10s-Olinuxino Micro||`sun5i-a10s-olinuxino-micro.dtb`||
||Olimex A13-Olinuxino||`sun5i-a13-olinuxino.dtb`||
||MK802-A10s||`sun5i-a10s-mk802.dtb`||
||MK802ii||`sun4i-a10-mk802ii.dtb`||
||MK802||`sun4i-a10-mk802.dtb`||
||MK808c||`sun7i-a20-mk808c.dtb`||
||MSI Primo81 tablet||`sun6i-a31s-primo81.dtb`||
||!NextThing C.H.I.P. Pro||`sun5i-gr8-chip-pro.dtb`||
||!NextThing GR8-EVB||`sun5i-gr8-evb.dtb`||
||Nintendo NES Classic Edition||`sun8i-r16-nintendo-nes-classic.dtb`||
||Nintendo SuperNES Classic Edition||`sun8i-r16-nintendo-super-nes-classic.dtb`||
||Oceanic 5205 5inMFD||`sun50i-a64-oceanic-5205-5inmfd.dtb`||
Line 33: Line 219:
||!PineRiver Mini X-Plus||`sun4i-a10-mini-xplus.dtb`||

The installer can also be used on other sunxi-based systems as long as device-tree support for them is available, but on those systems manual intervention during the installation is required (see
[[#Systems not supported Out-of-the-box|below]]).
||Olimex A13-OLinuXino||`sun5i-a13-olinuxino.dtb`||[[https://bugs.debian.org/789727|Installation Report]] requires custom build of mainline U-boot; some EHCI timeouts in u-boot||
||Olimex A20-Olimex-SOM-EVB-eMMC||`sun7i-a20-olimex-som-evb-emmc.dtb`||
||Olimex A20-OLinuXino-MICRO-eMMC||`sun7i-a20-olinuxino-micro-emmc.dtb`||
||Olimex A20-SOM204-EVB-eMMC||`sun7i-a20-olimex-som204-evb-emmc.dtb`||
||Olimex A20-SOM204-EVB||`sun7i-a20-olimex-som204-evb.dtb`||
||Olimex A33-OLinuXino||`sun8i-a33-olinuxino.dtb`||
||Orange Pi Mini||`sun7i-a20-orangepi-mini.dtb`||
||Orange Pi||`sun7i-a20-orangepi.dtb`||
||!OrangePi 3||`sun50i-h6-orangepi-3.dtb`||
||!OrangePi Lite2||`sun50i-h6-orangepi-lite2.dtb`||
||!OrangePi One Plus||`sun50i-h6-orangepi-one-plus.dtb`||
||!OrangePi Win/Win Plus||`sun50i-a64-orangepi-win.dtb`||
||!OrangePi Zero Plus2 H3||`sun8i-h3-orangepi-zero-plus2.dtb`||
||Pine64 !PinePhone Braveheart (1.1)||`sun50i-a64-pinephone-1.1.dtb`||
||Pine64 !PinePhone Developer Batch (1.0)||`sun50i-a64-pinephone-1.0.dtb`||
||Pine H64 model A||`sun50i-h6-pine-h64.dtb`||
||Pine H64 model B||`sun50i-h6-pine-h64-model-b.dtb`||
||!PineTab||`sun50i-a64-pinetab.dtb`||
||!PocketBook Touch Lux 3||`sun5i-a13-pocketbook-touch-lux-3.dtb`||
||Point of View Protab2-IPS9||`sun4i-a10-pov-protab2-ips9.dtb`||
||Polaroid MID2407PXE03 tablet||`sun8i-a23-polaroid-mid2407pxe03.dtb`||
||Polaroid MID2809PXE04 tablet||`sun8i-a23-polaroid-mid2809pxe04.dtb`||
||Q8 A13 Tablet||`sun5i-a13-q8-tablet.dtb`||
||Q8 A23 Tablet||`sun8i-a23-q8-tablet.dtb`||
||Q8 A33 Tablet||`sun8i-a33-ippo-q8h-v1.2.dtb`||
||Q8 A33 Tablet||`sun8i-a33-q8-tablet.dtb`||
||R7 A10s hdmi tv-stick||`sun5i-a10s-r7-tv-dongle.dtb`||
||!RerVision H3-DVK||`sun8i-h3-rervision-dvk.dtb`||
||Sinlinx !SinA31s Development Board||`sun6i-a31s-sina31s.dtb`||
||Sinlinx !SinA33||`sun8i-a33-sinlinx-sina33.dtb`||
||Sinovoip BPI-M2||`sun6i-a31s-sinovoip-bpi-m2.dtb`||
||Sipeed Lichee Zero Plus||`sun8i-s3-lichee-zero-plus.dtb`||
||t3-cqa3t-bv3||`sun8i-t3-cqa3t-bv3.dtb`||
||Tanix TX6||`sun50i-h6-tanix-tx6.dtb`||
||TBS A711 Tablet||`sun8i-a83t-tbs-a711.dtb`||
||Utoo P66||`sun5i-a13-utoo-p66.dtb`||
||Wexler TAB7200||`sun7i-a20-wexler-tab7200.dtb`||
||WITS A31 Colombus Evaluation Board||`sun6i-a31-colombus.dtb`||
||Wits Pro A20 DKT||`sun7i-a20-wits-pro-a20-dkt.dtb`||
||Xunlong Orange Pi 2||`sun8i-h3-orangepi-2.dtb`||
||Xunlong Orange Pi Lite||`sun8i-h3-orangepi-lite.dtb`||
||Xunlong Orange Pi One||`sun8i-h3-orangepi-one.dtb`||
||Xunlong Orange Pi PC 2||`sun50i-h5-orangepi-pc2.dtb`||
||Xunlong Orange Pi PC Plus||`sun8i-h3-orangepi-pc-plus.dtb`||
||Xunlong Orange Pi PC||`sun8i-h3-orangepi-pc.dtb`||
||Xunlong Orange Pi Plus 2E||`sun8i-h3-orangepi-plus2e.dtb`||
||Xunlong Orange Pi Prime||`sun50i-h5-orangepi-prime.dtb`||
||Xunlong Orange Pi R1||`sun8i-h2-plus-orangepi-r1.dtb`||
||Xunlong Orange Pi Zero Plus||`sun50i-h5-orangepi-zero-plus.dtb`||
||Yones !TopTech BS1078 v2 Tablet||`sun6i-a31s-yones-toptech-bs1078-v2.dtb`||
Line 40: Line 272:
From Jessie Beta 2 onwards, Debian-Installer allows installing to either a SATA disk or to an MMC/SD card. Installation to the on-board NAND flash available on some sunxi-based systems is '''not''' supported.

Booting the installed system directly from a SATA disk requires a u-boot with AHCI support (see the corresponding [[#u-boot-ahci-support|uboot information]] below).
Debian-Installer allows installing to either a SATA disk or to an MMC/SD card.
Installation to the on-board NAND flash
available on some sunxi-based systems
is '''not''' supported.

Booting the installed system directly from a SATA disk
requires a u-boot with AHCI support
(see the corresponding [[#u-boot-ahci-support|uboot information]] below).
Line 46: Line 283:
On sunxi-based systems, [[#U-boot versions for sunxi-based systems|u-boot]] is the system firmware that initializes the hardware and then allows to boot an operating system. It is the sunxi-equivalent of the BIOS on a PC. In contrast to PCs, where the BIOS is stored in an on-board flash memory chip, on sunxi-based devices u-boot is usually stored on an SD card. Some sunxi-based devices have on-board flash memory and even contain a stripped-down u-boot version in it, but this version is usually unsuitable for Debian. Therefore you usually have to setup an SD card with the appropriate u-boot version for your particular device (see [[#Creating a bootable SD-Card with u-boot|below]]) as a prerequisite for installing Debian.    On sunxi-based systems,
[[#U-boot versions for sunxi-based systems|u-boot]] is the system firmware
that initializes the hardware and then allows to boot an operating system.
It is the sunxi-equivalent of the BIOS on a PC.
In contrast to PCs,
where the BIOS is stored in an on-board flash memory chip,
on sunxi-based devices u-boot is usually stored on an SD card.
Some sunxi-based devices have on-board flash memory
and even contain a stripped-down u-boot version in it,
but this version is usually unsuitable for Debian.
Therefore you usually have to setup an SD card
with the appropriate u-boot version for your particular device
(see [[#Creating a bootable SD Card with u-boot|below]])
as a prerequisite for installing Debian.
If you use the [[#Installing_from_an_SD_card_image|pre-made SD card images with the installer]],
this step is not necessary,
as these images already contain u-boot.
Line 51: Line 303:
''NOTE'': These instructions assume the use of a TFTP server, which should already be installed. However the installer images can also be loaded via other means, e.g. from MMC.

=== Prepare the TFTP Server ===

Download the kernel [[http://d-i.debian.org/daily-images/armhf/daily/netboot|vmlinuz]], installer [[http://d-i.debian.org/daily-images/armhf/daily/netboot|initrd.gz]] and the appropriate [[http://d-i.debian.org/daily-images/armhf/daily/device-tree|Flattended Device Tree (FDT) Blob]] (or DTB) for the board and copy them to a path on your TFTP server. e.g.
Debian provides a ready-made netboot tarball
[[http://ftp.nl.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/netboot.tar.gz|Bullseye version]],
[[http://ftp.nl.debian.org/debian/dists/bookworm/main/installer-armhf/current/images/netboot/netboot.tar.gz|Bookworm version]],
[[http://d-i.debian.org/daily-images/armhf/daily/netboot/netboot.tar.gz|daily sid build]])
that can simply be unpacked in the root directory of a TFTP server.
It contains the installer as well as a network boot script
which can automatically be executed by [[#Mainline u-boot|mainline u-boot]]
as part of the default boot order
(MMC/SD -> SATA -> USB mass storage -> TFTP).
Manually executing the boot script is possible
by entering "run bootcmd_dhcp" at the u-boot prompt.

=== Manually setting up TFTP booting ===

If you do not want to use the netboot tarball,
you can of course also manually set up TFTP booting:

Download the kernel
[[http://d-i.debian.org/daily-images/armhf/daily/netboot|vmlinuz]],
installer
[[http://d-i.debian.org/daily-images/armhf/daily/netboot|initrd.gz]]
and the appropriate
[[http://d-i.debian.org/daily-images/armhf/daily/device-tree|Flattended Device Tree (FDT) Blob]]
(or DTB) for the board
and copy them to a path on your TFTP server. e.g.
Line 61: Line 333:
# wget -P device-tree http://d-i.debian.org/daily-images/armhf/daily/device-tree/sun7i-a20-cubietruck.dtb  # wget -P device-tree http://d-i.debian.org/daily-images/armhf/daily/device-tree/sun7i-a20-cubietruck.dtb
Line 89: Line 361:
=== Running the Installer ===

At the u-boot prompt, boot the images which were just downloaded via the script:

At the u-boot prompt,
boot the images which were just downloaded via the script:
Line 99: Line 371:
Install in the usual way. Use {{{setenv diargs foo=bar}}} to pass arguments to the installer (e.g. for preseeding) Install in the usual way.
Use {{{setenv diargs foo=bar}}} to pass arguments to the installer
(e.g. for preseeding)
Line 103: Line 377:
Starting at 2014-10-04, the daily installer builds offer the option to install the system from a USB stick, provided you are running mainline u-boot and have a device for which u-boot provides [[#u-boot-ehci-support|EHCI]] support.

Unpack the [[http://d-i.debian.org/daily-images/armhf/daily/hd-media/hd-media.tar.gz|hd-media tarball]] onto a USB stick with a filesystem that is supported by u-boot (FAT16 / FAT32 / ext2 / ext3 / ext4) and copy the ISO image of either the weekly [[http://cdimage.debian.org/cdimage/weekly-builds/armhf/iso-cd/debian-testing-armhf-CD-1.iso|Debian/testing CD #1]] or the weekly [[http://cdimage.debian.org/cdimage/weekly-builds/armhf/iso-dvd/debian-testing-armhf-DVD-1.iso|Debian/testing DVD #1]] onto the stick.

Insert the USB stick into the target system and issue the command

{{{
uboot> run usb_boot
The daily installer builds offer the option
to install the system from a USB stick,
provided you are running mainline u-boot
and have a device
for which u-boot provides [[#u-boot-ehci-support|EHCI]] support.

Unpack the daily
[[http://d-i.debian.org/daily-images/armhf/daily/hd-media/hd-media.tar.gz|hd-media tarball]]
or stable
[[http://ftp.debian.org/debian/dists/stable/main/installer-armhf/current/images/hd-media/hd-media.tar.gz|hd-media tarball]]
onto a USB stick with a filesystem
that is supported by u-boot (FAT16 / FAT32 / ext2 / ext3 / ext4)
and copy the ISO image of either the weekly testing
[[http://cdimage.debian.org/cdimage/weekly-builds/armhf/iso-cd/debian-testing-armhf-xfce-CD-1.iso|Debian/testing CD #1]]
or the weekly testing
[[http://cdimage.debian.org/cdimage/weekly-builds/armhf/iso-dvd/debian-testing-armhf-DVD-1.iso|Debian/testing DVD #1]]
or for stable
[[https://cdimage.debian.org/debian-cd/current/armhf/iso-cd/| Debian/10.4 CD #1]]
onto the stick.

Notes: Prepare USB stick:
Create an empty DOS parition table using fdisk
and create a new primary parition.
Use mkfs.ext2 to create file system on the new parition.
Choose HDMI for installer display:
On A20-Olinuxino-Lime2,
the serial console is selected by default,
so you need to run `bootargs=console=tty1` and `saveenv` commands to choose HDMI display.

Insert the USB stick into the target system and issue the command


{{{
uboot> run bootcmd_usb0
Line 115: Line 414:
Notice: The combination of the daily-built hd-media tarball and the weekly-built CD/DVD image might not work correctly in periods of kernel transitions in Debian. The installer assumes that the kernel in the hd-media tarball and the kernel modules in the ISO image have the same version, which of course might not be the case directly after a kernel version bump.
Notice:
The combination of the daily-built hd-media tarball
and the weekly-built CD/DVD image
might not work correctly in periods of kernel transitions in Debian.
The installer assumes
that the kernel in the hd-media tarball and the kernel modules in the ISO image
have the same version,
which of course might not be the case directly after a kernel version bump.

== Installing from an SD card image ==

Debian offers SD card images
with u-boot and the netinstall version of the Debian-Installer
for various sunxi-based systems
for
[[https://deb.debian.org/debian/dists/stable/main/installer-armhf/current/images/netboot/SD-card-images/|stable]]
or
[[https://d-i.debian.org/daily-images/armhf/daily/u-boot/|daily builds of unstable]].
The images are provided in the form of a device-specific part
(containing the partition table and the device-specific u-boot)
and a device-independent part
(containing the actual installer),
which can be unpacked and concatenated together to build a complete installer image.

The device-specific part is named firmware.<board_name>.img.gz
and the device-independent part is named partition.img.gz.
To write a full image to an SD card,
simply unpack, concatenate and write the parts to an SD card in a single step with
{{{
zcat firmware.<board_name>.img.gz partition.img.gz > /dev/SDCARD_DEVICE
}}}

These images are meant for the SD card slot on the device
and will not work when SD card is inserted into USB based SD card readers.
Once the installer is started,
it runs completely in the system's RAM
and does not need to load anything from the SD card anymore,
so you can delete all existing partitions
and use the full card for installing Debian.
It is recommended to use the "guided partitioning" option in the installer
to create a proper partition layout on the SD card.

The above installation methods may require a serial cable
to interact with the installer.
Debian installer by default uses the HDMI output with simplefb.
To change that,
at the u-boot prompt,
use tty1 as console and disable framebuffer in the installer:
{{{
uboot> setenv console tty1
uboot> setenv bootargs console=tty1 fb=false
uboot> saveenv
uboot> boot
}}}

You can install a non-default system
(e.g. an older system using a newer installer)
by changing the debconf priority to low when choosing the mirror.

If your USB-Keyboard does not work in u-boot,
you can mount the partition.img,
copy the configuration directives from boot.scr to boot.cmd
(i.e. strip initial "noise")
and insert the setenv commands above manually.
Then run the following command
{{{
mkimage -C none -A arm -T script -d boot.cmd boot.scr
}}}
taken from here https://linux-sunxi.org/Mainline_U-boot
and the installer will boot in non-framebuffer mode
without any further input needed.
Line 122: Line 490:
If you are running a current mainline u-boot or a recent u-boot-sunxi  If you are running a current mainline u-boot or a recent u-boot-sunxi
Line 124: Line 492:
have installed the system to an MMC/SD card and have used the guided partitioning option in the installer, autobooting the installed system works without requiring any user interaction. have installed the system to an MMC/SD card
and have used the guided partitioning option in the installer,
auto
booting the installed system works without requiring any user interaction.
Note that guided partitioning must be selected
to use the *whole* card and not only available space.
Otherwise Debian installer will not be removed from the card.
To fix this then please use the instruction
for [[#Creating_a_bootable_SD_Card_with_u-boot|Creating a bootable SD Card with u-boot]]
from above to install a recent U-Boot version.
Line 128: Line 504:
By default, u-boot-sunxi expects the first partition on the MMC/SD card to be the boot partition and to contain either a FAT or an ext2 filesystem. The guided partitioning option in the installer takes care of this and sets up an ext2-formatted /boot partition as the first partition. If you have chosen a different layout, you have to manually set the u-boot environment variable ${partition} to the number of the partition containing /boot.

Mainline u-boot does not impose restrictions on the filesystem type of the boot partition, as long as u-boot generally supports the particular filesystem (which by default includes ext2/ext3/ext4). Mainline u-boot also does not use the ${device}/${partition} scheme used by u-boot-sunxi, but instead automatically checks all available devices for a boot script.
By default,
u-boot-sunxi expects the first partition on the MMC/SD card
to be the boot partition
and to contain either a FAT or an ext2 filesystem.
The guided partitioning option in the installer takes care of this
and sets up an ext2-formatted /boot partition as the first partition.
If you have chosen a different layout,
you have to manually set the u-boot environment variable ${partition}
to the number of the partition containing /boot.

Mainline u-boot does not impose restrictions
on the filesystem type of the boot partition,
as long as u-boot generally supports the particular filesystem
(which by default includes ext2/ext3/ext4).
Mainline u-boot also does not use the ${device}/${partition} scheme
used by u-boot-sunxi,
but instead automatically checks all available devices for a boot script.
Line 134: Line 524:
If booting from MMC fails and a SATA disk is available, mainline u-boot automatically tries to boot from it. If you want to manually boot from a SATA disk at the u-boot prompt, just enter the command "run scsi_boot".

Notice: the mechanism to automatically boot from SATA disk had a bug in mainline u-boot v2014.10rc2, but this issue has been [[http://git.denx.de/?p=u-boot.git;a=commit;h=a03bdaa1408be4e8b6adfc8577a0ceac3ebc51e5|fixed]] in the release version of u-boot v2014.10.
If booting from MMC fails and a SATA disk is available,
mainline u-boot automatically tries to boot from it.
If you want to manually boot from a SATA disk at the u-boot prompt,
just enter the command "run bootcmd_scsi0".
Line 140: Line 531:
Note: u-boot-sunxi does by default not support booting from SATA. This paragraph applies only if you use a u-boot-sunxi version on which additional AHCI patches have been applied. Note:
u-boot-sunxi does by default not support booting from SATA.
This paragraph applies only if you use a u-boot-sunxi version
on which additional AHCI patches have been applied.
Line 143: Line 537:
To manually boot from a SATA disk on u-boot-sunxi, run the following at the u-boot prompt: To manually boot from a SATA disk on u-boot-sunxi,
run the following at the u-boot prompt:
Line 166: Line 561:
First find a suitable device tree blob (DTB) for your board. You might find one in the [[http://d-i.debian.org/daily-images/armhf/daily/device-tree|daily builds]], or in the [[https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git|device-tree git repo]]. The latter is a repository containing all of the device tree files shipped with the upstream Linux kernel but in a separate git tree (which is much quicker to clone and build than the full kernel) which tracks mainline Linux development. You can build all of the ARM (and therefore Allwinner/sunxi) device tree blobs in that tree in only a few seconds devices with: First find a suitable device tree blob (DTB) for your board.
You might find one in the
[[http://d-i.debian.org/daily-images/armhf/daily/device-tree|daily builds]],
or in the
[[https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git|device-tree git repo]].
The latter is a repository containing all of the device tree files
shipped with the upstream Linux kernel but in a separate git tree
(which is much quicker to clone and build than the full kernel)
which tracks mainline Linux development.
You can build all of the ARM
(and therefore Allwinner/sunxi)
device tree blobs in that tree
in only a few seconds devices with:
Line 175: Line 582:
The device tree blobs will be found in {{{src/arm/*.dtb}}}. You can build a single device tree by passing it to make instead of {{{all_arm}}}. e.g. The device tree blobs will be found in {{{src/arm/*.dtb}}}.
You can build a single device tree
by passing it to make instead of {{{all_arm}}}. e.g.
Line 181: Line 590:
Otherwise you might need to write a device tree file yourself (or find someone who is willing to do it for you). If you only have the device tree source (DTS) you can convert it to DTB using these commands: Otherwise you might need to write a device tree file yourself
(or find someone who is willing to do it for you).
If you only have the device tree source (DTS)
you can convert it to DTB using these commands:
Line 188: Line 600:
Once you have a suitable DTB you can populate the TFTP server with the vmlinuz, initrd.gz and the DTB and create a suitable installer boot script by modifying the one [[#Installing over the network by TFTP|above]]. Once you have a suitable DTB
you can populate the TFTP server with the vmlinuz, initrd.gz and the DTB
and create a suitable installer boot script
by modifying the one [[#Installing over the network by TFTP|above]].
Line 205: Line 620:
This is expected. Make a note of the partitions and continue. Once the installer has completed the installation you need to boot the resulting system, but using the DTB from TFTP in order to fix things up. This can be done like in the following example (which assumes an installation to a SATA disk): This is expected.
Make a note of the partitions and continue.
Once the installer has completed the installation
you need to boot the resulting system,
but using the DTB from TFTP in order to fix things up.
This can be done like in the following example
(which assumes an installation to a SATA disk):
Line 228: Line 649:
Now you need to create a flash-kernel database entry. Start by copying the entries for {{{Cubietech Cubietruck}}} from {{{/usr/share/flash-kernel/db/all.db}}} to {{{/etc/flash-kernel/db}}}. Now you need to modify the {{{Machine}}} and {{{DTB-Id}}} fields. Now you need to create a flash-kernel database entry.
Start by copying the entries for {{{Cubietech Cubietruck}}}
from {{{/usr/share/flash-kernel/db/all.db}}}
to {{{/etc/flash-kernel/db}}}.
Now you need to modify the {{{Machine}}} and {{{DTB-Id}}} fields.
Line 235: Line 660:
For {{{DTB-Id}}} if you used a DTB from the daily builds then use that name for {{{DTB-Id}}}. If you got the DTB from somewhere else then install it as {{{/boot/dtb-$(uname -r)}}} and omit the {{{DTB-Id}}} field. In this case you will need to take care around kernel upgrades.

Now run {{{flash-kernel}}} and reboot. At this point you should be able to boot using the process from [[#booting-installed|Booting the Installed System]] above. If this fails the boot again using the [[#fixup-manual-boot|manual method]] described above and try again e.g. fix your {{{/etc/flash-kernel/db}}}.

Once you have it working run {{{reportbug flash-kernel}}} and report a wishlist bug to support your platform. Be sure to include the contents of {{{/etc/flash-kernel/db}}} and say where the DTB came from.
For {{{DTB-Id}}} if you used a DTB from the daily builds
then use that name for {{{DTB-Id}}}.
If you got the DTB from somewhere else
then install it as {{{/boot/dtb-$(uname -r)}}}
and omit the {{{DTB-Id}}} field.
In this case you will need to take care around kernel upgrades.

Now run {{{flash-kernel}}} and reboot.
At this point you should be able to boot
using the process from [[#booting-installed|Booting the Installed System]] above.
If this fails
then
boot again using the [[#fixup-manual-boot|manual method]] described above
and try again e.g. fix your {{{/etc/flash-kernel/db}}}.

Once you have it working
run {{{reportbug flash-kernel}}} and report a wishlist bug
to support your platform.
Be sure to include the contents of {{{/etc/flash-kernel/db}}}
and say where the DTB came from.
Line 247: Line 686:
Development for sunxi-based systems had originally begun based on an Allwinner android kernel. The [[https://linux-sunxi.org/Linux_Kernel|linux-sunxi.org 3.4 kernel series]] is based on this android kernel and is maintained by a group of volunteers at linux-sunxi.org.

The mainline kernel is the "official" Linux kernel series released by Linus Torvalds. Beginning with kernel 3.8, several developers have been working on integrating sunxi support into the mainline kernel. An overview of the progress can be found in the [[https://linux-sunxi.org/Linux_mainlining_effort|linux-sunxi.org]] wiki.

Debian uses the same kernel on all supported architectures and therefore supports only the mainline kernel. The disadvantage of the mainline kernel compared to the linux-sunxi.org kernel is that not all sunxi-specific drivers have yet been ported. The mainline kernel contains support for serial console, USB, SATA, Ethernet and MMC/SD, but it has no display and audio drivers for sunxi hardware, i.e. while running a headless server usually works without problems with the mainline kernel, it currently cannot be used for media center applications and the like and as there is no local display support, its use on tablets and other mobile devices is very limited.

While the installer always uses the mainline kernel, it is possible to manually install a
linux-sunxi.org kernel on a Debian system later on, but in that case you are on your own with regard to kernel updates and bootloader setup. Several of the automatic mechanisms in Debian to smoothly handle kernel updates and bootloader configuration will not work properly with the linux-sunxi.org 3.4 series.
Development for sunxi-based systems had originally begun
based on an Allwinner android kernel.
The [[https://linux-sunxi.org/Linux_Kernel|linux-sunxi.org 3.4 kernel series]]
is based on this android kernel
and is maintained by a group of volunteers at linux-sunxi.org.

The mainline kernel is the "official" Linux kernel series
released by Linus Torvalds.
Beginning with kernel 3.8,
several developers have been working on integrating sunxi support
into the mainline kernel.
An overview of the progress can be found
in the [[https://linux-sunxi.org/Linux_mainlining_effort|linux-sunxi.org]] wiki.

Debian uses the same kernel on all supported architectures
and therefore supports only the mainline kernel.
The disadvantage of the mainline kernel
compared to the linux-sunxi.org kernel
is that not all sunxi-specific drivers have yet been ported.
The mainline kernel contains support
for serial console, USB, SATA, Ethernet and MMC/SD,
but the
version in Bullseye may lack native display and audio drivers
for some sunxi hardware.
Mainline u-boot supports running Linux with graphics support
by using the simplefb driver (which can handle a single resolution)
,
and mainline linux can s
witch to use the display engine used in the A10/A10s/A13/A20/A64.
The headphone jacks on some sunxi-based systems is supported.

While the installer always uses the mainline kernel,
it is possible to manually install a linux-sunxi.org kernel on a Debian system later on,
but in that case you are on your own
with regard to kernel updates and bootloader setup.
Se
veral of the automatic mechanisms in Debian
to smoothly handle kernel updates and bootloader configuration
will not work properly with the linux-sunxi.org 3.4 series.
Line 264: Line 731:
You can mostly ignore the original Allwinner u-boot for Debian
purposes. Compared to u-boot-sunxi it is rather old and relies on
proprietary bootloader components ("boot0"/"boot1") to perform
basic hardware initialization.  About the only use case for it is
booting from the NAND flash available on some sunxi-based boards
in conjunction with using an android or android-derived kernel
version that contains the original Allwinner NAND flash driver for
Android.
=== Allwinner u-boot ===
You can mostly ignore the original Allwinner u-boot for Debian purposes.
Compared to u-boot-sunxi
and in particular to mainline u-boot
its codebase is rather old,
and it relies on
proprietary bootloader components ("boot0"/"boot1")
to perform
basic hardware initialization.
About the only use case for it is booting from the NAND flash
available on some sunxi-based boards
in conjunction with using an android or android-derived kernel version
that contains the original Allwinner NAND flash driver for Android.

=== U-boot-sunxi ===
Line 274: Line 745:
from the original Allwinner u-boot and is maintained by a group of
volunteers at linux-sunxi.org. It contains an SPL component that
takes care of the basic hardware initialization and therefore does
not need the proprietary boot0/boot1 loaders from Allwinner. It can
boot locally from MMC/SD card and over the network by TFTP, but it
cannot access the NAND flash. The current version (as of 08/2014)
has been updated to the featureset of mainline u-boot v2014.04; it
does not have [[#u-boot-psci-support|PSCI]]-,
[[#u-boot-ahci-support|AHCI]]- and [[#u-boot-ehci-support|EHCI]]-support.

[[http://www.denx.de/wiki/U-Boot/WebHome|Mainline u-boot]] is the
official upstream u-boot version. Work is currently in progress
to integrate the sunxi-specific parts of u-boot-sunxi into
mainline u-boot. When this process is completed, u-boot-sunxi
can be replaced by mainline u-boot. Mainline u-boot as of release v2014.10 already supports several sunxi-based systems, although not yet all systems that are supported by u-boot-sunxi. An overview of the current status is available in
the [[https://linux-sunxi.org/Mainline_U-boot|linux-sunxi.org wiki]].
Mainline u-boot has - besides the master git tree at http://git.denx.de/u-boot.git/ - so-called "custodian trees" for each
supported platform, in which platform-specific changes get integrated
first before being merged into the central u-boot git
repository for the next release. The sunxi custodian tree is available
at http://git.denx.de/u-boot-sunxi.git/ and contains the most
current sunxi platform support patches for mainline u-boot, including
[[#u-boot-psci-support|PSCI]]-,
[[#u-boot-ahci-support|AHCI]]- and
[[#u-boot-ehci-support|EHCI]]-support for various systems.

During the v2014.10 development cycle for mainline u-boot, some rather invasive changes have been introduced. This includes restructuring the build system and introducing a new default environment and a new generic bootcmd handling.
The new default environment is not fully compatible with some older bootscripts written for u-boot-sunxi, but flash-kernel >= 3.24 creates bootscripts that work with both the old and the new default environment. If you are using a flash-kernel version older than 3.24 and intend to change from u-boot-sunxi to mainline u-boot, you should update flash-kernel first.

== Creating a bootable SD-Card with u-boot ==

Debian provides mainline u-boot images for a variety of supported systems in the [[https://packages.debian.org/jessie/armhf/u-boot-sunxi/filelist|u-boot-sunxi:armhf]] package. To create a bootable SD card with u-boot on it, copy the appropriate u-boot image to offset 8kb on the SD card, e.g. with

{{{
$ dd if=/usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin of=/dev/SDCARD bs=1k seek=8
}}}

for the Cubietruck. Please note that the u-boot-sunxi package contains both normal as well as FEL images for various systems. FEL mode is a special boot mode that allows sunxi-based systems to be booted via a USB cable from another system instead of from a mass storage device. FEL mode requires specifically adapted u-boot builds which are unsuitable for booting from SD card, so use the normal non-FEL images for building bootable SD cards.
from the original Allwinner u-boot
and is maintained by a group of volunteers at linux-sunxi.org.
It contains an SPL component
that takes care of the basic hardware initialization
and therefore does not need the proprietary boot0/boot1 loaders from Allwinner.
It can boot locally from MMC/SD card and over the network by TFTP,
but it cannot access the NAND flash.
The current version (as of 08/2014) has been updated
to the featureset of mainline u-boot v2014.04;
it does not have [[#u-boot-psci-support|PSCI]]-,
[[#u-boot-ahci-support|AHCI]]-
and [[#u-boot-ehci-support|EHCI]]-support.
Development of u-boot-sunxi has mostly stopped;
active development happens in mainline u-boot nowadays.
Therefore u-boot-sunxi is only interesting for a few systems
which are not yet supported by mainline u-boot.

=== Mainline u-boot ===
[[http://www.denx.de/wiki/U-Boot/WebHome|Mainline u-boot]]
is the official upstream u-boot version.
It contains [[#u-boot-psci-support|PSCI]]-,
[[#u-boot-ahci-support|AHCI]]-
and [[#u-boot-ehci-support|EHCI]]-support.
The first mainline u-boot version with sunxi support was v2014.10,
the current mainline u-boot (v2016.01)
has added support for many more sunxi-based systems.
If a system is supported by mainline u-boot,
you should use it instead of u-boot-sunxi.
Mainline u-boot has -
besides the master git tree
at http://git.denx.de/u-boot.git/ -
so-called "custodian trees" for each supported platform,
in which platform-specific changes get integrated first
before being merged into the central u-boot git repository
for the next release.
The sunxi custodian tree is available
at http://git.denx.de/u-boot-sunxi.git/
and provides "bleeding-edge" development versions.
Those are primarily interesting for developers,
normal users should use the master git tree instead.

During the v2014.10 development cycle for mainline u-boot,
some rather invasive changes have been introduced.
This includes restructuring the build system
and introducing a new default environment
and a new generic bootcmd handling.
The new default environment is not fully compatible
with some older bootscripts written for u-boot-sunxi,
but flash-kernel >= 3.24 creates bootscripts
that work with both the old and the new default environment.
If you are using a flash-kernel version older than 3.24
and intend to change from u-boot-sunxi to mainline u-boot,
you should update flash-kernel first.

== Creating a bootable SD Card with u-boot ==
Debian provides mainline u-boot images
for a variety of supported systems
in the daily installer builds
at [[http://d-i.debian.org/daily-images/armhf/daily/u-boot/]].
The daily builds contain both a ready-made gzipped SD card image
(<boardname>.sdcard.img.gz)
as well as a gzipped "bare" u-boot image
(u-boot-sunxi-with-spl.bin.gz).

The easiest way to create a bootable SD card with u-boot
is to copy the ready-made card image to the card,
e.g. with
{{{
$ zcat Cubietruck.sdcard.img.gz > /dev/SDCARD_DEVICE
}}}
Please note that writing the SD card image
overwrites an already existing partition table on the card
and thereby causes loss of any data that was on the card previously!

U-Boot images can also be taken
from the [[https://packages.debian.org/jessie/armhf/u-boot-sunxi/filelist|u-boot-sunxi:armhf]] package.
To create a bootable SD card with help of the u-boot-sunxi package,
copy the appropriate u-boot image to offset 8kb on the SD card,
e.g. with

{{{
$ dd if=/usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin of=/dev/SDCARD_DEVICE bs=1k seek=8
}}}

for the Cubietruck.
This method keeps an existing partition table on the SD card untouched.

Please note that the u-boot-sunxi package contains both normal
as well as FEL images for various systems.
FEL mode is a special boot mode
that allows sunxi-based systems to be booted
via a USB cable from another system
instead of from a mass storage device.
FEL mode requires specifically adapted u-boot builds
which are unsuitable for booting from SD card,
so use the normal non-FEL images for building bootable SD cards.

To install the u-boot-sunxi:armhf package on a non-armhf system
(e.g. on an amd64-based PC),
you can use Debian's multiarch functionality:

{{{
$ sudo dpkg --add-architecture armhf
$ sudo apt-get update
$ sudo apt-get install u-boot-sunxi:armhf
}}}
Line 316: Line 855:
For SMP support on Allwinner SOCs, i.e. for using more than one CPU
core, the mainline Linux kernel requires support for PSCI (Power
State Coordination Interface) in u-boot, which is only available in mainline u-boot.
For SMP support on Allwinner SOCs,
i.e. for using more than one CPU core,
the mainline Linux kernel requires support for PSCI
(Power State Coordination Interface)
in u-boot,
which is only available in mainline u-boot.
Line 323: Line 865:
AHCI support allows u-boot to boot the kernel, initrd and dtb from a
SATA harddisk. U-boot itself has still to be installed on an SD
card, but the rest of the system can be put onto a (much faster)
harddisk. This feature is (as of 11/2014) available in mainline
u-boot for
[[http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=commit;h=a6e50a88d8d3724fc75f1c6959b80a6c7c69cbad|Cubietech Cubieboard 1+2 and Cubietruck]], Olimex A10-OLinuXino-Lime, Olimex A20-OLinuXino-Lime 1+2, Olimex A20-OLinuXino-Micro, Lemaker Banana Pi, Mele A1000 and Mele A1000G.

For the Cubieboard2 and the Cubietruck you can alternatively also use the "sunxi-mainlining-with-smp-and-ahci-wip" branch of Ian Campbell's git repository at git://gitorious.org/ijc/u-boot.git. It is based on an older u-boot-sunxi snapshot and combines PSCI and AHCI support for these two systems. This branch is not updated anymore, so if possible, you should use mainline u-boot.
AHCI support allows u-boot to boot the kernel, initrd and dtb
from a SATA harddisk.
U-boot itself has still to be installed on an SD card,
but the rest of the system can be put onto a (much faster) harddisk.
This feature is available in mainline u-boot
for most mainline-supported systems with a SATA socket.
Line 335: Line 875:
EHCI support allows u-boot to boot the kernel, initrd and dtb from a
USB mass storage device such as a USB memory stick or a USB harddisk.
U-boot itself has still to be installed on an SD card, but the rest
of the system can be put onto a USB device. This feature is
available in mainline u-boot for certain devices, among them:
[[http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=commit;h=fc36a588283838bbaf502ab32b6dcb92aee51ec2|Cubietech Cubietruck]],
[[http://git.denx.de/?p=u-boot/u-boot-sunxi.git;a=commit;h=0061e46462da670ba0f6811d407df438692f137d|Cubietech Cubieboard 1+2 and Olimex A13-OLinuXino Micro]], Olimex A10-OLinuXino-Lime, Olimex A10s-OLinuXino-Micro, Olimex A13-OLinuXino, Olimex A20-OLinuXino-Lime 1+2, !LeMaker Banana Pi, Mele A1000 and Mele A1000G.
EHCI support allows u-boot to boot the kernel, initrd and dtb
from a USB mass storage device
such as a USB memory stick or a USB harddisk.
U-boot itself has still to be installed on an SD card,
but the rest of the system can be put onto a USB device.
This feature is available in mainline u-boot
for most mainline-supported systems
with a USB host (type "A") socket.
Line 347: Line 888:
Wifi requires non-free firmware DebianPkg:firmware-brcm80211 at least version 0.42 plus an additional firmware file which is not yet packaged but can be installed with: Wifi requires non-free firmware DebianPkg:firmware-brcm80211
at least version 0.42
plus an additional firmware file
which is not yet packaged but can be installed with:
Line 353: Line 897:
Message such as {{{brcmfmac: brcmf_fil_cmd_data: Failed err=-23}}} are expected and do not represent a actual problem. Message such as {{{brcmfmac: brcmf_fil_cmd_data: Failed err=-23}}}
are expected and do not represent a actual problem.

== Olimex A20-OLinuXino-MICRO/A20-OLinuXino-LIME2 + 7" or 10"LCD ==

If you have one of those boards+lcd display
and want to use the mainline kernel with simplefb
http://karme.de/prisirah/ might be interesting for you.

== Olimex A20-OLinuXino-LIME2 rev. F and newer and Debian11/ bullseye kernel ==
/!\ Revision F and newer LIME2 boards fails to work with gigagit ethernet with recent kernel.


The issue is covered in detail at [[https://linux-sunxi.org/Olimex_A20-OLinuXino-Lime2#GMAC_quirks | the sunxi wiki]],
and to a lesser extend in DebianBug:911560 and DebianBug:927397.


Here's the recipe to build and install u-boot for this card. You can use an existing installation (e.g. after update to bullseye), but you will need physical access to the card due to the resulting lag fo SSH.

Note that the revision of the card is written on the PCB of the device.

Setup u-boot source:

 * {{{git clone https://salsa.debian.org/debian/u-boot.git}}}
 * {{{sudo apt build-dep u-boot}}}

In u-boot repository:

 * apply all debian patches: {{{quilt push -a}}}
 * run: {{{make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime2_defconfig}}}
 * edit .config to set CONFIG_GMAC_TX_DELAY=3 (or run {{{make CROSS_COMPILE=arm-linux-gnueabihf- menuconfig}}}
     * Or for revision G2 with the upgrade to Debian11/ Bullseye use CONFIG_GMAC_TX_DELAY=4 [[https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=927397#62 | instead]]
 * build u-boot: {{{make CROSS_COMPILE=arm-linux-gnueabihf-}}}


You should get a u-boot-sunxi-with-spl.bin file
which is the bootloader to install on your SD card
(see [[https://linux-sunxi.org/Bootable_SD_card#Bootloader|Sunxi doc]])

First backup your SD card:

 * {{{sudo cp /dev/$sdcard backup.img}}}

Then copy the bootloader:

 * {{{sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/$sdcard bs=1024 seek=8}}}

In both case,
{{{$sdcard}}} is to be replaced with the block device file of your SD card.


== Banana PI M2 Berry ==

(Those are just notes at this point, added by LucasNussbaum)

 * You will need a UART (console) cable.

=== Installing Debian ===

 * U-Boot has no support for ethernet for this device. So no TFTP install.
 * What worked for me is:
  * Use d-i daily build, and a daily ISO. (Support was added to Debian testing mid-march 2019)
   * Get the firmware and partition image from https://d-i.debian.org/daily-images/armhf/daily/hd-media/SD-card-images/
   * Write a Debian installer iso image to a USB stick, in an ext4 partition. For example https://cdimage.debian.org/cdimage/daily-builds/daily/20190404-5/armhf/iso-cd/debian-testing-armhf-netinst.iso or equivalent
  * Start the device. It will start the installer, and then find the ISO image. You don't need ethernet during the installation.

=== Post-installation stuff ===

 * It might be a bit difficult to get the system to boot, because the installer does not set everything up correctly. You will need to install flash-kernel.
 * Ethernet does not work, because the device tree file for the device is incomplete. Add the data related to ethernet in the M2 ultra dts and recompile the dtd.
 * Wifi needs an additional firmware that is not shipped in the firmware-brcm80211 package (see https://bugs.debian.org/797779, that is not going to be fixed).

.

Introduction

Support for boards using the Allwinner "sunxi" (sun4i, sun5i, sun6i, sun7i, sun8i, sun50i) family of processors, e.g. A10, A13, A31/A31s, A20, A23/A33, A64, etc.

Install Using Debian-Installer

Supported Platforms

Debian-installer should work out of the box on all the following sunxi-based systems, but as the developers do not have access to all of them, the installer has only been tested on particular systems. If you have used the installer on one of the untested systems, please submit an installation-report to the Debian project (cf. the Submitting Installation Reports chapter in the Debian installation-guide).

Stable

Hardware systems tested and confirmed working in Bullseye or older.

System

Device Tree Blob

Notes

Cubietech Cubieboard

sun4i-a10-cubieboard.dtb

Installation Reports: [1], [2], Wiki notes

Cubietech Cubieboard2

sun7i-a20-cubieboard2.dtb

Cubietech Cubietruck (Cubieboard3)

sun7i-a20-cubietruck.dtb

LeMaker Banana Pi

sun7i-a20-bananapi.dtb

LeMaker Banana Pro

sun7i-a20-bananapro.dtb

Installation Report

Olimex A10-OLinuXino-LIME

sun4i-a10-olinuxino-lime.dtb

Olimex A10s-Olinuxino Micro

sun5i-a10s-olinuxino-micro.dtb

Installation Report

Olimex A20-OLinuXino-LIME

sun7i-a20-olinuxino-lime.dtb

Installation Report

Olimex A20-OLinuXino-LIME2

sun7i-a20-olinuxino-lime2.dtb

Installation Report, Wiki notes

Olimex A20-Olinuxino Micro

sun7i-a20-olinuxino-micro.dtb

Installation Report

Olimex A20-SOM-EVB

sun7i-a20-olimex-som-evb.dtb

Installation Report (gigabit ethernet issues)

Olimex A64 Teres-I

sun50i-a64-teres-i.dtb

Wiki page

Pine64

sun50i-a64-pine64.dtb

Wiki page

Pine64+

sun50i-a64-pine64-plus.dtb

Wiki page

Stable untested

Hardware systems for which the installer has support code in Bullseye or older, but on which installation has not been tested yet.

If you succeed in installing Debian on one of these boards, then please file an installation report.

System

Device Tree Blob

Notes

Banana Pi BPI-M2-Ultra

sun8i-r40-bananapi-m2-ultra.dtb

Cubietech Cubieboard4

sun9i-a80-cubieboard4.dtb

Cubietech Cubietruck Plus (Cubieboard5)

sun8i-a83t-cubietruck-plus.dtb

!FriendlyARM NanoPi NEO 2

sun50i-h5-nanopi-neo2.dtb

!FriendlyARM NanoPi NEO Plus2

sun50i-h5-nanopi-neo-plus2.dtb

Lamobo R1

sun7i-a20-lamobo-r1.dtb

LinkSprite pcDuino

sun4i-a10-pcduino.dtb

LinkSprite pcDuino3

sun7i-a20-pcduino3.dtb

Nano Pi Neo

sun8i-h3-nanopi-neo.dtb

Nano Pi Neo Air

sun8i-h3-nanopi-neo-air.dtb

?NextThing C.H.I.P.

sun5i-r8-chip.dtb

Olimex A20-OLinuXino-LIME2-eMMC

sun7i-a20-olinuxino-lime2-emmc.dtb

Olimex A64-OLinuxino

sun50i-a64-olinuxino.dtb

Olimex A64-OLinuxino-eMMC

sun50i-a64-olinuxino-emmc.dtb

Orange Pi Plus

sun8i-h3-orangepi-plus.dtb

?OrangePi One Plus

sun50i-h6-orangepi-one-plus.dtb

OrangePi Zero Plus2

sun50i-h5-orangepi-zero-plus2.dtb

Pine64 LTS

sun50i-a64-pine64-lts.dtb

Pine64 PinePhone Braveheart (1.1)

sun50i-a64-pinephone-1.1.dtb

Pine64 PinePhone (1.2)

sun50i-a64-pinephone-1.2.dtb

?PineRiver Mini X-Plus

sun4i-a10-mini-xplus.dtb

Pinebook

sun50i-a64-pinebook.dtb

?PineTab

sun50i-a64-pinetab.dtb

Sinovoip Banana Pi M3

sun8i-a83t-bananapi-m3.dtb

Sinovoip Banana Pi M2 Berry

sun8i-v40-bananapi-m2-berry.dtb

Wiki notes

Xunlong Orange Pi Zero

sun8i-h2-plus-orangepi-zero.dtb

Unstable

Unstable untested

Hardware systems for which the Sid installer has support code, but on which installation has not been tested yet.

If you succeed in installing Debian on one of these boards, then please file an installation report.

System

Device Tree Blob

Notes

The installer can also be used on other sunxi-based systems as long as device-tree support for them is available, but on those systems manual intervention during the installation is required (see below).

Unsupported Platforms

Unsupported installer

Hardware systems that should work using purely Debian with all essential parts available in same release of Debian, but involving custom setup of debian-installer.

If you succeed in installing Debian on one of these boards (e.g. by manually adding the official Debian u-boot to a "bare" debian-installer SD-card image), then please a) file an installation report, and b) consider offering your help to the installer team to get it supported officially in Debian.

System

Device Tree Blob

Notes

Cubietech Cubieboard4

sun9i-a80-cubieboard4.dtb

NextThing C.H.I.P.

sun5i-r8-chip.dtb

Orange Pi Zero

sun8i-h2-plus-orangepi-zero.dtb

PineRiver Mini X-Plus

sun4i-a10-mini-xplus.dtb

SoPine with baseboard

sun50i-a64-sopine-baseboard.dtb

kernel in Bullseye but u-boot only since Bookworm

Unsupported bootstrapping

Hardware systems which should work with linux kernel packages officially part of Debian, but lacks boot support in official Debian u-boot or some related package.

If you succeed in installing Debian on one of these boards (e.g. using a fork of the official Debian u-boot package combined with a "bare" debian-installer SD-card image), then please a) file an installation report, and b) consider offering your help to the u-boot maintainers to get the board supported officially in Debian.

System

Device Tree Blob

Notes

A10s-Wobo i5

sun5i-a10s-wobo-i5.dtb

Allwinner A23 Evaluation Board

sun8i-a23-evb.dtb

Allwinner A31 APP4 EVB1 Evaluation Board

sun6i-a31-app4-evb1.dtb

Allwinner A83T H8Homlet Proto Dev Board v2.0

sun8i-a83t-allwinner-h8homlet-v2.dtb

Allwinner GA10H Quad Core Tablet (v1.1)

sun8i-a33-ga10h-v1.1.dtb

Allwinner GT90H Dual Core Tablet (v4)

sun8i-a23-gt90h-v4.dtb

Allwinner R16 EVB (Parrot)

sun8i-r16-parrot.dtb

Amarula A64-Relic

sun50i-a64-amarula-relic.dtb

Auxtek t003 A10s hdmi tv-stick

sun5i-a10s-auxtek-t003.dtb

Auxtek t004 A10s hdmi tv-stick

sun5i-a10s-auxtek-t004.dtb

BA10 tvbox

sun4i-a10-ba10-tvbox.dtb

Banana Pi BPI-M1-Plus

sun7i-a20-bananapi-m1-plus.dtb

Banana Pi BPI-M2-Plus

sun8i-h3-bananapi-m2-plus.dtb

Banana Pi BPI-M2-Plus H5

sun50i-h5-bananapi-m2-plus-v1.2.dtb

Banana Pi BPI-M2-Plus v1.2 H3

sun8i-h3-bananapi-m2-plus-v1.2.dtb

Banana Pi BPI-M2-Plus v1.2 H5

sun50i-h5-bananapi-m2-plus.dtb

Banana Pi BPI-M2-Ultra

sun8i-r40-bananapi-m2-ultra.dtb

Banana Pi BPI-M2-Zero

sun8i-h2-plus-bananapi-m2-zero.dtb

BananaPi M2 Magic

sun8i-r16-bananapi-m2m.dtb

BananaPi-M64

sun50i-a64-bananapi-m64.dtb

Beelink GS1

sun50i-h6-beelink-gs1.dtb

Beelink X2

sun8i-h3-beelink-x2.dtb

Chuwi V7 CW0825 - CSQ CS908 top set box

sun4i-a10-chuwi-v7-cw0825.dtb

Colorfly E708 Q1 tablet

sun6i-a31s-colorfly-e708-q1.dtb

CSQ CS908 top set box

sun6i-a31s-cs908.dtb

Difrnce DIT4350

sun5i-a13-difrnce-dit4350.dtb

Dserve DSRV9703C

sun4i-a10-dserve-dsrv9703c.dtb

Emlid Neutis N5 Developer board

sun50i-h5-emlid-neutis-n5-devboard.dtb

Emlid Neutis N5H3 Developer board

sun8i-h3-emlid-neutis-n5h3-devboard.dtb

Empire Electronix D709 tablet

sun5i-a13-empire-electronix-d709.dtb

Empire Electronix M712 tablet

sun5i-a13-empire-electronix-m712.dtb

ET Q8 Quad Core Tablet (v1.6)

sun8i-a33-et-q8-v1.6.dtb

FriendlyARM NanoPi A64

sun50i-a64-nanopi-a64.dtb

FriendlyARM NanoPi Duo2

sun8i-h3-nanopi-duo2.dtb

FriendlyArm NanoPi M1 Plus

sun8i-h3-nanopi-m1-plus.dtb

FriendlyArm NanoPi M1

sun8i-h3-nanopi-m1.dtb

Gemei G9 Tablet

sun4i-a10-gemei-g9.dtb

HAOYU Electronics Marsboard A10

sun4i-a10-marsboard.dtb

HSG H702

sun5i-a13-hsg-h702.dtb

Hyundai A7HD

sun4i-a10-hyundai-a7hd.dtb

I12 / Q5 / QT840A A20 tvbox

sun7i-a20-i12-tvbox.dtb

ICnova-A20 SWAC

sun7i-a20-icnova-swac.dtb

iNet-1

sun4i-a10-inet1.dtb

INet-86DZ Rev 01

sun8i-a23-inet86dz.dtb

INet-97F Rev 02

sun4i-a10-inet97fv2.dtb

INet-98V Rev 02

sun5i-a13-inet-98v-rev2.dtb

iNet-9F Rev 03

sun4i-a10-inet9f-rev03.dtb

INet-D978 Rev 02

sun8i-a33-inet-d978-rev2.dtb

iNet Q972 tablet

sun6i-a31s-inet-q972.dtb

Ippo Q8H Dual Core Tablet (v1.2)

sun8i-a23-ippo-q8h-v1.2.dtb

Ippo Q8H Dual Core Tablet (v5)

sun8i-a23-ippo-q8h-v5.dtb

Itead Ibox A20

sun7i-a20-itead-ibox.dtb

Iteaduino Plus A10

sun4i-a10-itead-iteaduino-plus.dtb

Jesurun Q5

sun4i-a10-jesurun-q5.dtb

Lamobo R1 [Linutronix Testbox v2]

sun7i-a20-linutronix-testbox-v2.dtb

Libre Computer Board ALL-H3-CC H2+

sun8i-h2-plus-libretech-all-h3-cc.dtb

Libre Computer Board ALL-H3-CC H3

sun8i-h3-libretech-all-h3-cc.dtb

Libre Computer Board ALL-H3-CC H5

sun50i-h5-libretech-all-h3-cc.dtb

Libre Computer Board ALL-H3-IT H5

sun50i-h5-libretech-all-h3-it.dtb

Libre Computer Board ALL-H5-CC H5

sun50i-h5-libretech-all-h5-cc.dtb

Lichee Pi One

sun5i-a13-licheepi-one.dtb

Lichee Pi Zero

sun8i-v3s-licheepi-zero.dtb

Lichee Pi Zero with Dock

sun8i-v3s-licheepi-zero-dock.dtb

LinkSprite pcDuino2

sun4i-a10-pcduino2.dtb

LinkSprite pcDuino3 Nano

sun7i-a20-pcduino3-nano.dtb

requires (at least) non-Debian U-boot; on-board Ethernet card needs a non-free firmware, on-board 4GB Flash doesn't work out-of-the-box

MapleBoard MP130

sun8i-h3-mapleboard-mp130.dtb

Mele A1000G Quad top set box

sun6i-a31-mele-a1000g-quad.dtb

Mele A1000

sun4i-a10-a1000.dtb

Installation Report requires custom build of mainline U-boot; on-board wifi card needs a non-free firmware, installation done via eth

Mele I7 Quad top set box

sun6i-a31-i7.dtb

Mele M3

sun7i-a20-m3.dtb

Mele M9 top set box

sun6i-a31-m9.dtb

Merrii A20 Hummingbird

sun7i-a20-hummingbird.dtb

Merrii A31 Hummingbird

sun6i-a31-hummingbird.dtb

Merrii A80 Optimus Board

sun9i-a80-optimus.dtb

Miniand Hackberry

sun4i-a10-hackberry.dtb

MK802-A10s

sun5i-a10s-mk802.dtb

MK802ii

sun4i-a10-mk802ii.dtb

MK802

sun4i-a10-mk802.dtb

MK808c

sun7i-a20-mk808c.dtb

MSI Primo81 tablet

sun6i-a31s-primo81.dtb

NextThing C.H.I.P. Pro

sun5i-gr8-chip-pro.dtb

NextThing GR8-EVB

sun5i-gr8-evb.dtb

Nintendo NES Classic Edition

sun8i-r16-nintendo-nes-classic.dtb

Nintendo SuperNES Classic Edition

sun8i-r16-nintendo-super-nes-classic.dtb

Oceanic 5205 5inMFD

sun50i-a64-oceanic-5205-5inmfd.dtb

Olimex A13-Olinuxino Micro

sun5i-a13-olinuxino-micro.dtb

Olimex A13-OLinuXino

sun5i-a13-olinuxino.dtb

Installation Report requires custom build of mainline U-boot; some EHCI timeouts in u-boot

Olimex A20-Olimex-SOM-EVB-eMMC

sun7i-a20-olimex-som-evb-emmc.dtb

Olimex A20-OLinuXino-MICRO-eMMC

sun7i-a20-olinuxino-micro-emmc.dtb

Olimex A20-SOM204-EVB-eMMC

sun7i-a20-olimex-som204-evb-emmc.dtb

Olimex A20-SOM204-EVB

sun7i-a20-olimex-som204-evb.dtb

Olimex A33-OLinuXino

sun8i-a33-olinuxino.dtb

Orange Pi Mini

sun7i-a20-orangepi-mini.dtb

Orange Pi

sun7i-a20-orangepi.dtb

OrangePi 3

sun50i-h6-orangepi-3.dtb

OrangePi Lite2

sun50i-h6-orangepi-lite2.dtb

OrangePi One Plus

sun50i-h6-orangepi-one-plus.dtb

OrangePi Win/Win Plus

sun50i-a64-orangepi-win.dtb

OrangePi Zero Plus2 H3

sun8i-h3-orangepi-zero-plus2.dtb

Pine64 PinePhone Braveheart (1.1)

sun50i-a64-pinephone-1.1.dtb

Pine64 PinePhone Developer Batch (1.0)

sun50i-a64-pinephone-1.0.dtb

Pine H64 model A

sun50i-h6-pine-h64.dtb

Pine H64 model B

sun50i-h6-pine-h64-model-b.dtb

PineTab

sun50i-a64-pinetab.dtb

PocketBook Touch Lux 3

sun5i-a13-pocketbook-touch-lux-3.dtb

Point of View Protab2-IPS9

sun4i-a10-pov-protab2-ips9.dtb

Polaroid MID2407PXE03 tablet

sun8i-a23-polaroid-mid2407pxe03.dtb

Polaroid MID2809PXE04 tablet

sun8i-a23-polaroid-mid2809pxe04.dtb

Q8 A13 Tablet

sun5i-a13-q8-tablet.dtb

Q8 A23 Tablet

sun8i-a23-q8-tablet.dtb

Q8 A33 Tablet

sun8i-a33-ippo-q8h-v1.2.dtb

Q8 A33 Tablet

sun8i-a33-q8-tablet.dtb

R7 A10s hdmi tv-stick

sun5i-a10s-r7-tv-dongle.dtb

RerVision H3-DVK

sun8i-h3-rervision-dvk.dtb

Sinlinx SinA31s Development Board

sun6i-a31s-sina31s.dtb

Sinlinx SinA33

sun8i-a33-sinlinx-sina33.dtb

Sinovoip BPI-M2

sun6i-a31s-sinovoip-bpi-m2.dtb

Sipeed Lichee Zero Plus

sun8i-s3-lichee-zero-plus.dtb

t3-cqa3t-bv3

sun8i-t3-cqa3t-bv3.dtb

Tanix TX6

sun50i-h6-tanix-tx6.dtb

TBS A711 Tablet

sun8i-a83t-tbs-a711.dtb

Utoo P66

sun5i-a13-utoo-p66.dtb

Wexler TAB7200

sun7i-a20-wexler-tab7200.dtb

WITS A31 Colombus Evaluation Board

sun6i-a31-colombus.dtb

Wits Pro A20 DKT

sun7i-a20-wits-pro-a20-dkt.dtb

Xunlong Orange Pi 2

sun8i-h3-orangepi-2.dtb

Xunlong Orange Pi Lite

sun8i-h3-orangepi-lite.dtb

Xunlong Orange Pi One

sun8i-h3-orangepi-one.dtb

Xunlong Orange Pi PC 2

sun50i-h5-orangepi-pc2.dtb

Xunlong Orange Pi PC Plus

sun8i-h3-orangepi-pc-plus.dtb

Xunlong Orange Pi PC

sun8i-h3-orangepi-pc.dtb

Xunlong Orange Pi Plus 2E

sun8i-h3-orangepi-plus2e.dtb

Xunlong Orange Pi Prime

sun50i-h5-orangepi-prime.dtb

Xunlong Orange Pi R1

sun8i-h2-plus-orangepi-r1.dtb

Xunlong Orange Pi Zero Plus

sun50i-h5-orangepi-zero-plus.dtb

Yones TopTech BS1078 v2 Tablet

sun6i-a31s-yones-toptech-bs1078-v2.dtb

Storage options

Debian-Installer allows installing to either a SATA disk or to an MMC/SD card. Installation to the on-board NAND flash available on some sunxi-based systems is not supported.

Booting the installed system directly from a SATA disk requires a u-boot with AHCI support (see the corresponding uboot information below).

Pre-installation preparations

On sunxi-based systems, u-boot is the system firmware that initializes the hardware and then allows to boot an operating system. It is the sunxi-equivalent of the BIOS on a PC. In contrast to PCs, where the BIOS is stored in an on-board flash memory chip, on sunxi-based devices u-boot is usually stored on an SD card. Some sunxi-based devices have on-board flash memory and even contain a stripped-down u-boot version in it, but this version is usually unsuitable for Debian. Therefore you usually have to setup an SD card with the appropriate u-boot version for your particular device (see below) as a prerequisite for installing Debian. If you use the pre-made SD card images with the installer, this step is not necessary, as these images already contain u-boot.

Installing over the network by TFTP

Debian provides a ready-made netboot tarball Bullseye version, Bookworm version, daily sid build) that can simply be unpacked in the root directory of a TFTP server. It contains the installer as well as a network boot script which can automatically be executed by mainline u-boot as part of the default boot order (MMC/SD -> SATA -> USB mass storage -> TFTP). Manually executing the boot script is possible by entering "run bootcmd_dhcp" at the u-boot prompt.

Manually setting up TFTP booting

If you do not want to use the netboot tarball, you can of course also manually set up TFTP booting:

Download the kernel vmlinuz, installer initrd.gz and the appropriate Flattended Device Tree (FDT) Blob (or DTB) for the board and copy them to a path on your TFTP server. e.g.

# mkdir -p /srv/tftp/didaily/armhf/daily/{netboot,device-tree}
# cd /srv/tftp/didaily/armhf/daily/
# wget -P netboot http://d-i.debian.org/daily-images/armhf/daily/netboot/vmlinuz http://d-i.debian.org/daily-images/armhf/daily/netboot/initrd.gz
# wget -P device-tree http://d-i.debian.org/daily-images/armhf/daily/device-tree/sun7i-a20-cubietruck.dtb

Create a script to boot the installer. e.g. /srv/tftp/didaily/cubietruck:

#setenv diargs <EXTRA ARGUMENTS>

setenv fdt_addr       0x43000000
setenv ramdisk_addr_r 0x48000000
setenv kernel_addr_r  0x47000000

setenv dibase /didaily/armhf/daily

tftp ${kernel_addr_r} ${dibase}/netboot/vmlinuz
setenv bootargs "console=ttyS0,115200 --- ${diargs}"

tftp ${fdt_addr} ${dibase}/device-tree/sun7i-a20-cubietruck.dtb
fdt addr ${fdt_addr} 0x40000

tftp ${ramdisk_addr_r} ${dibase}/netboot/initrd.gz
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}

then to make a script which u-boot can run:

# mkimage -T script -A arm -d /srv/tftp/didaily/cubietruck /srv/tftp/didaily/cubietruck.scr

At the u-boot prompt, boot the images which were just downloaded via the script:

uboot> setenv autoload no
uboot> dhcp
uboot> tftp ${scriptaddr} /didaily/cubietruck.scr
uboot> source ${scriptaddr}

Install in the usual way. Use setenv diargs foo=bar to pass arguments to the installer (e.g. for preseeding)

Installing from a USB stick

The daily installer builds offer the option to install the system from a USB stick, provided you are running mainline u-boot and have a device for which u-boot provides EHCI support.

Unpack the daily hd-media tarball or stable hd-media tarball onto a USB stick with a filesystem that is supported by u-boot (FAT16 / FAT32 / ext2 / ext3 / ext4) and copy the ISO image of either the weekly testing Debian/testing CD #1 or the weekly testing Debian/testing DVD #1 or for stable Debian/10.4 CD #1 onto the stick.

Notes: Prepare USB stick: Create an empty DOS parition table using fdisk and create a new primary parition. Use mkfs.ext2 to create file system on the new parition. Choose HDMI for installer display: On A20-Olinuxino-Lime2, the serial console is selected by default, so you need to run bootargs=console=tty1 and saveenv commands to choose HDMI display.

Insert the USB stick into the target system and issue the command

uboot> run bootcmd_usb0

at the u-boot command prompt to start the installer.

Notice: The combination of the daily-built hd-media tarball and the weekly-built CD/DVD image might not work correctly in periods of kernel transitions in Debian. The installer assumes that the kernel in the hd-media tarball and the kernel modules in the ISO image have the same version, which of course might not be the case directly after a kernel version bump.

Installing from an SD card image

Debian offers SD card images with u-boot and the netinstall version of the Debian-Installer for various sunxi-based systems for stable or daily builds of unstable. The images are provided in the form of a device-specific part (containing the partition table and the device-specific u-boot) and a device-independent part (containing the actual installer), which can be unpacked and concatenated together to build a complete installer image.

The device-specific part is named firmware.<board_name>.img.gz and the device-independent part is named partition.img.gz. To write a full image to an SD card, simply unpack, concatenate and write the parts to an SD card in a single step with

zcat firmware.<board_name>.img.gz partition.img.gz > /dev/SDCARD_DEVICE

These images are meant for the SD card slot on the device and will not work when SD card is inserted into USB based SD card readers. Once the installer is started, it runs completely in the system's RAM and does not need to load anything from the SD card anymore, so you can delete all existing partitions and use the full card for installing Debian. It is recommended to use the "guided partitioning" option in the installer to create a proper partition layout on the SD card.

The above installation methods may require a serial cable to interact with the installer. Debian installer by default uses the HDMI output with simplefb. To change that, at the u-boot prompt, use tty1 as console and disable framebuffer in the installer:

uboot> setenv console tty1
uboot> setenv bootargs console=tty1 fb=false
uboot> saveenv
uboot> boot

You can install a non-default system (e.g. an older system using a newer installer) by changing the debconf priority to low when choosing the mirror.

If your USB-Keyboard does not work in u-boot, you can mount the partition.img, copy the configuration directives from boot.scr to boot.cmd (i.e. strip initial "noise") and insert the setenv commands above manually. Then run the following command

mkimage -C none -A arm -T script -d boot.cmd boot.scr

taken from here https://linux-sunxi.org/Mainline_U-boot and the installer will boot in non-framebuffer mode without any further input needed.

Booting the installed system

Booting the Installed System from MMC/SD Card

If you are running a current mainline u-boot or a recent u-boot-sunxi (cf. the u-boot overview below), have installed the system to an MMC/SD card and have used the guided partitioning option in the installer, auto booting the installed system works without requiring any user interaction. Note that guided partitioning must be selected to use the *whole* card and not only available space. Otherwise Debian installer will not be removed from the card. To fix this then please use the instruction for Creating a bootable SD Card with u-boot from above to install a recent U-Boot version.

Some background information:

By default, u-boot-sunxi expects the first partition on the MMC/SD card to be the boot partition and to contain either a FAT or an ext2 filesystem. The guided partitioning option in the installer takes care of this and sets up an ext2-formatted /boot partition as the first partition. If you have chosen a different layout, you have to manually set the u-boot environment variable ${partition} to the number of the partition containing /boot.

Mainline u-boot does not impose restrictions on the filesystem type of the boot partition, as long as u-boot generally supports the particular filesystem (which by default includes ext2/ext3/ext4). Mainline u-boot also does not use the ${device}/${partition} scheme used by u-boot-sunxi, but instead automatically checks all available devices for a boot script.

Booting the Installed System from a SATA Disk on Mainline U-Boot

If booting from MMC fails and a SATA disk is available, mainline u-boot automatically tries to boot from it. If you want to manually boot from a SATA disk at the u-boot prompt, just enter the command "run bootcmd_scsi0".

Booting the Installed System from a SATA Disk on U-Boot-Sunxi

Note: u-boot-sunxi does by default not support booting from SATA. This paragraph applies only if you use a u-boot-sunxi version on which additional AHCI patches have been applied.

U-boot-sunxi does not have an autoboot mechanism for SATA disks. To manually boot from a SATA disk on u-boot-sunxi, run the following at the u-boot prompt:

uboot> scsi scan
uboot> setenv device scsi
uboot> setenv partition 0
uboot> load ${device} ${partition} ${scriptaddr} boot.scr
uboot> setenv bootargs console=ttyS0,115200n8 root=/dev/sda2 rootwait
uboot> source ${scriptaddr}

This can be made the default with:

uboot> setenv device scsi
uboot> setenv partition 0
uboot> setenv bootargs console=ttyS0,115200n8 root=/dev/sda2 rootwait
uboot> setenv boot_debian scsi scan\;load \${device} \${partition} \${scriptaddr} boot.scr\;source \${scriptaddr}
uboot> setenv bootcmd run boot_debian
uboot> saveenv
uboot> boot

Installing on systems that are not supported out of the box

First find a suitable device tree blob (DTB) for your board. You might find one in the daily builds, or in the device-tree git repo. The latter is a repository containing all of the device tree files shipped with the upstream Linux kernel but in a separate git tree (which is much quicker to clone and build than the full kernel) which tracks mainline Linux development. You can build all of the ARM (and therefore Allwinner/sunxi) device tree blobs in that tree in only a few seconds devices with:

$ sudo apt-get install device-tree-compiler git make cpp
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git
$ cd devicetree-rebasing
$ make -j all_arm

The device tree blobs will be found in src/arm/*.dtb. You can build a single device tree by passing it to make instead of all_arm. e.g.

$ make src/arm/sun7i-a20-cubietruck.dtb

Otherwise you might need to write a device tree file yourself (or find someone who is willing to do it for you). If you only have the device tree source (DTS) you can convert it to DTB using these commands:

$ sudo apt-get install device-tree-compiler
$ dtc -I dts -O dtb infile.dts > outfile.dtb

Once you have a suitable DTB you can populate the TFTP server with the vmlinuz, initrd.gz and the DTB and create a suitable installer boot script by modifying the one above.

Boot the installer and proceed as usual. Towards the end you will encounter:

   ┌─────────────────┤ [!] Continue without boot loader ├──────────────────┐
   │                                                                       │
   │                       No boot loader installed                        │
   │ No boot loader has been installed, either because you chose not to or │
   │ because your specific architecture doesn't support a boot loader yet. │
   │                                                                       │
   │ You will need to boot manually with the /vmlinuz kernel on partition  │
   │ /dev/sda1 and root=/dev/sda2 passed as a kernel argument.             │
   │                                                                       │
   │                              <Continue>                               │
   │                                                                       │
   └───────────────────────────────────────────────────────────────────────┘

This is expected. Make a note of the partitions and continue. Once the installer has completed the installation you need to boot the resulting system, but using the DTB from TFTP in order to fix things up. This can be done like in the following example (which assumes an installation to a SATA disk):

uboot> setenv fdt_addr       0x43000000
uboot> setenv ramdisk_addr_r 0x48000000
uboot> setenv kernel_addr_r  0x47000000
uboot> setenv dibase /didaily/armhf/daily
uboot> setenv autoload no;dhcp
uboot> tftp ${fdt_addr} ${dibase}/device-tree/sun7i-a20-cubieboard2.dtb
uboot> fdt addr ${fdt_addr} 0x40000
uboot> scsi scan
uboot> load scsi 0 ${kernel_addr_r} /vmlinuz
uboot> load scsi 0 ${ramdisk_addr_r} /initrd.img
uboot> setenv bootargs console=ttyS0,115200n8 root=/dev/sda2 rootwait
uboot> bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr}

This should now boot you to a login prompt.

Login and install flash-kernel and the u-boot-tools:

# apt-get install flash-kernel u-boot-tools

Now you need to create a flash-kernel database entry. Start by copying the entries for Cubietech Cubietruck from /usr/share/flash-kernel/db/all.db to /etc/flash-kernel/db. Now you need to modify the Machine and DTB-Id fields.

For the Machine use the output of:

# cat /proc/device-tree/model ; echo

For DTB-Id if you used a DTB from the daily builds then use that name for DTB-Id. If you got the DTB from somewhere else then install it as /boot/dtb-$(uname -r) and omit the DTB-Id field. In this case you will need to take care around kernel upgrades.

Now run flash-kernel and reboot. At this point you should be able to boot using the process from Booting the Installed System above. If this fails then boot again using the manual method described above and try again e.g. fix your /etc/flash-kernel/db.

Once you have it working run reportbug flash-kernel and report a wishlist bug to support your platform. Be sure to include the contents of /etc/flash-kernel/db and say where the DTB came from.

Mainline kernel and linux-sunxi.org 3.4 kernel

There are two different Linux kernel series for sunxi-based systems:

  • mainline kernel
  • linux-sunxi.org kernel

Development for sunxi-based systems had originally begun based on an Allwinner android kernel. The linux-sunxi.org 3.4 kernel series is based on this android kernel and is maintained by a group of volunteers at linux-sunxi.org.

The mainline kernel is the "official" Linux kernel series released by Linus Torvalds. Beginning with kernel 3.8, several developers have been working on integrating sunxi support into the mainline kernel. An overview of the progress can be found in the linux-sunxi.org wiki.

Debian uses the same kernel on all supported architectures and therefore supports only the mainline kernel. The disadvantage of the mainline kernel compared to the linux-sunxi.org kernel is that not all sunxi-specific drivers have yet been ported. The mainline kernel contains support for serial console, USB, SATA, Ethernet and MMC/SD, but the version in Bullseye may lack native display and audio drivers for some sunxi hardware. Mainline u-boot supports running Linux with graphics support by using the simplefb driver (which can handle a single resolution), and mainline linux can switch to use the display engine used in the A10/A10s/A13/A20/A64. The headphone jacks on some sunxi-based systems is supported.

While the installer always uses the mainline kernel, it is possible to manually install a linux-sunxi.org kernel on a Debian system later on, but in that case you are on your own with regard to kernel updates and bootloader setup. Several of the automatic mechanisms in Debian to smoothly handle kernel updates and bootloader configuration will not work properly with the linux-sunxi.org 3.4 series.

U-boot versions for sunxi-based systems

Overview

There are several u-boot versions for sunxi-based systems:

  • the original Allwinner u-boot
  • u-boot-sunxi
  • mainline u-boot

Allwinner u-boot

You can mostly ignore the original Allwinner u-boot for Debian purposes. Compared to u-boot-sunxi and in particular to mainline u-boot its codebase is rather old, and it relies on proprietary bootloader components ("boot0"/"boot1") to perform basic hardware initialization. About the only use case for it is booting from the NAND flash available on some sunxi-based boards in conjunction with using an android or android-derived kernel version that contains the original Allwinner NAND flash driver for Android.

U-boot-sunxi

U-boot-sunxi is derived from the original Allwinner u-boot and is maintained by a group of volunteers at linux-sunxi.org. It contains an SPL component that takes care of the basic hardware initialization and therefore does not need the proprietary boot0/boot1 loaders from Allwinner. It can boot locally from MMC/SD card and over the network by TFTP, but it cannot access the NAND flash. The current version (as of 08/2014) has been updated to the featureset of mainline u-boot v2014.04; it does not have PSCI-, AHCI- and EHCI-support. Development of u-boot-sunxi has mostly stopped; active development happens in mainline u-boot nowadays. Therefore u-boot-sunxi is only interesting for a few systems which are not yet supported by mainline u-boot.

Mainline u-boot

Mainline u-boot is the official upstream u-boot version. It contains PSCI-, AHCI- and EHCI-support. The first mainline u-boot version with sunxi support was v2014.10, the current mainline u-boot (v2016.01) has added support for many more sunxi-based systems. If a system is supported by mainline u-boot, you should use it instead of u-boot-sunxi. Mainline u-boot has - besides the master git tree at http://git.denx.de/u-boot.git/ - so-called "custodian trees" for each supported platform, in which platform-specific changes get integrated first before being merged into the central u-boot git repository for the next release. The sunxi custodian tree is available at http://git.denx.de/u-boot-sunxi.git/ and provides "bleeding-edge" development versions. Those are primarily interesting for developers, normal users should use the master git tree instead.

During the v2014.10 development cycle for mainline u-boot, some rather invasive changes have been introduced. This includes restructuring the build system and introducing a new default environment and a new generic bootcmd handling. The new default environment is not fully compatible with some older bootscripts written for u-boot-sunxi, but flash-kernel >= 3.24 creates bootscripts that work with both the old and the new default environment. If you are using a flash-kernel version older than 3.24 and intend to change from u-boot-sunxi to mainline u-boot, you should update flash-kernel first.

Creating a bootable SD Card with u-boot

Debian provides mainline u-boot images for a variety of supported systems in the daily installer builds at http://d-i.debian.org/daily-images/armhf/daily/u-boot/. The daily builds contain both a ready-made gzipped SD card image (<boardname>.sdcard.img.gz) as well as a gzipped "bare" u-boot image (u-boot-sunxi-with-spl.bin.gz).

The easiest way to create a bootable SD card with u-boot is to copy the ready-made card image to the card, e.g. with

$ zcat Cubietruck.sdcard.img.gz > /dev/SDCARD_DEVICE

Please note that writing the SD card image overwrites an already existing partition table on the card and thereby causes loss of any data that was on the card previously!

U-Boot images can also be taken from the u-boot-sunxi:armhf package. To create a bootable SD card with help of the u-boot-sunxi package, copy the appropriate u-boot image to offset 8kb on the SD card, e.g. with

$ dd if=/usr/lib/u-boot/Cubietruck/u-boot-sunxi-with-spl.bin of=/dev/SDCARD_DEVICE bs=1k seek=8

for the Cubietruck. This method keeps an existing partition table on the SD card untouched.

Please note that the u-boot-sunxi package contains both normal as well as FEL images for various systems. FEL mode is a special boot mode that allows sunxi-based systems to be booted via a USB cable from another system instead of from a mass storage device. FEL mode requires specifically adapted u-boot builds which are unsuitable for booting from SD card, so use the normal non-FEL images for building bootable SD cards.

To install the u-boot-sunxi:armhf package on a non-armhf system (e.g. on an amd64-based PC), you can use Debian's multiarch functionality:

$ sudo dpkg --add-architecture armhf
$ sudo apt-get update
$ sudo apt-get install u-boot-sunxi:armhf

SMP/PSCI support

For SMP support on Allwinner SOCs, i.e. for using more than one CPU core, the mainline Linux kernel requires support for PSCI (Power State Coordination Interface) in u-boot, which is only available in mainline u-boot.

AHCI support

AHCI support allows u-boot to boot the kernel, initrd and dtb from a SATA harddisk. U-boot itself has still to be installed on an SD card, but the rest of the system can be put onto a (much faster) harddisk. This feature is available in mainline u-boot for most mainline-supported systems with a SATA socket.

EHCI support

EHCI support allows u-boot to boot the kernel, initrd and dtb from a USB mass storage device such as a USB memory stick or a USB harddisk. U-boot itself has still to be installed on an SD card, but the rest of the system can be put onto a USB device. This feature is available in mainline u-boot for most mainline-supported systems with a USB host (type "A") socket.

Board Specific Information

Cubietech Cubietruck

Wifi requires non-free firmware firmware-brcm80211 at least version 0.42 plus an additional firmware file which is not yet packaged but can be installed with:

wget -O /lib/firmware/brcm/brcmfmac43362-sdio.txt http://dl.cubieboard.org/public/Cubieboard/benn/firmware/ap6210/nvram_ap6210.txt

Message such as brcmfmac: brcmf_fil_cmd_data: Failed err=-23 are expected and do not represent a actual problem.

Olimex A20-OLinuXino-MICRO/A20-OLinuXino-LIME2 + 7" or 10"LCD

If you have one of those boards+lcd display and want to use the mainline kernel with simplefb http://karme.de/prisirah/ might be interesting for you.

Olimex A20-OLinuXino-LIME2 rev. F and newer and Debian11/ bullseye kernel

/!\ Revision F and newer LIME2 boards fails to work with gigagit ethernet with recent kernel.

The issue is covered in detail at the sunxi wiki, and to a lesser extend in 911560 and 927397.

Here's the recipe to build and install u-boot for this card. You can use an existing installation (e.g. after update to bullseye), but you will need physical access to the card due to the resulting lag fo SSH.

Note that the revision of the card is written on the PCB of the device.

Setup u-boot source:

  • git clone https://salsa.debian.org/debian/u-boot.git

  • sudo apt build-dep u-boot

In u-boot repository:

  • apply all debian patches: quilt push -a

  • run: make CROSS_COMPILE=arm-linux-gnueabihf- A20-OLinuXino-Lime2_defconfig

  • edit .config to set CONFIG_GMAC_TX_DELAY=3 (or run make CROSS_COMPILE=arm-linux-gnueabihf- menuconfig

    • Or for revision G2 with the upgrade to Debian11/ Bullseye use CONFIG_GMAC_TX_DELAY=4 instead

  • build u-boot: make CROSS_COMPILE=arm-linux-gnueabihf-

You should get a u-boot-sunxi-with-spl.bin file which is the bootloader to install on your SD card (see Sunxi doc)

First backup your SD card:

  • sudo cp /dev/$sdcard backup.img

Then copy the bootloader:

  • sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/$sdcard bs=1024 seek=8

In both case, $sdcard is to be replaced with the block device file of your SD card.

Banana PI M2 Berry

(Those are just notes at this point, added by LucasNussbaum)

  • You will need a UART (console) cable.

Installing Debian

Post-installation stuff

  • It might be a bit difficult to get the system to boot, because the installer does not set everything up correctly. You will need to install flash-kernel.
  • Ethernet does not work, because the device tree file for the device is incomplete. Add the data related to ethernet in the M2 ultra dts and recompile the dtd.
  • Wifi needs an additional firmware that is not shipped in the firmware-brcm80211 package (see https://bugs.debian.org/797779, that is not going to be fixed).

Resources

http://linux-sunxi.org/