Alpine on ARM

From Alpine Linux
This material needs wiki syntax or style improvements ...

Please feel free to help us clean it up.

This page is proposed for moving ...

It should be renamed to ARM SOCs. (Discuss)

(Parts of this page are WIP, still incomplete and some might be incorrect.)


Supported SoCs

Currently Alpine supports the following SoCs

(This is taken from the DTBs which Alpine includes)

armv7
am335x-baltos-ir2110 am335x-baltos-ir3220 am335x-baltos-ir5221 am335x-base0033 am335x-bone am335x-boneblack-wireless am335x-boneblack am335x-boneblue am335x-bonegreen-wireless am335x-bonegreen am335x-chiliboard
am335x-cm-t335 am335x-evm am335x-evmsk am335x-guardian am335x-icev2 am335x-lxm am335x-moxa-uc-2101 am335x-moxa-uc-8100-me-t am335x-myirtech-myd am335x-nano am335x-netcan-plus-1xx
am335x-netcom-plus-2xx am335x-netcom-plus-8xx am335x-osd3358-sm-red am335x-pdu001 am335x-pepper am335x-phycore-rdk am335x-pocketbeagle am335x-regor-rdk am335x-sancloud-bbe-lite am335x-sancloud-bbe am335x-sbc-t335
am335x-shc am335x-sl50 am335x-wega-rdk bcm2711-rpi-4-b bcm2711-rpi-400 bcm2835-rpi-a-plus bcm2835-rpi-a bcm2835-rpi-b-plus bcm2835-rpi-b-rev2 bcm2835-rpi-b bcm2835-rpi-cm1-io1
bcm2835-rpi-zero-w bcm2835-rpi-zero bcm2836-rpi-2-b bcm2837-rpi-3-a-plus bcm2837-rpi-3-b-plus bcm2837-rpi-3-b bcm2837-rpi-cm3-io3 exynos4210-i9100 exynos4210-origen exynos4210-smdkv310 exynos4210-trats
exynos4210-universal_c210 exynos4412-i9300 exynos4412-i9305 exynos4412-itop-elite exynos4412-n710x exynos4412-odroidu3 exynos4412-odroidx exynos4412-odroidx2 exynos4412-origen exynos4412-p4note-n8010 exynos4412-smdk4412
exynos4412-tiny4412 exynos4412-trats2 exynos5250-arndale exynos5250-smdk5250 exynos5250-snow-rev5 exynos5250-snow exynos5250-spring exynos5260-xyref5260 exynos5410-odroidxu exynos5410-smdk5410 exynos5420-arndale-octa
exynos5420-peach-pit exynos5420-smdk5420 exynos5422-odroidhc1 exynos5422-odroidxu3-lite exynos5422-odroidxu3 exynos5422-odroidxu4 exynos5800-peach-pi imx51-apf51 imx51-apf51dev imx51-babbage imx51-digi-connectcore-jsk
imx51-eukrea-mbimxsd51-baseboard imx51-ts4800 imx51-zii-rdu1 imx51-zii-scu2-mezz imx51-zii-scu3-esb imx53-ard imx53-cx9020 imx53-kp-ddc imx53-kp-hsc imx53-m53evk imx53-m53menlo
imx53-mba53 imx53-ppd imx53-qsb imx53-qsrb imx53-smd imx53-tx53-x03x imx53-tx53-x13x imx53-usbarmory imx53-voipac-bsb imx6dl-alti6p imx6dl-apf6dev
imx6dl-aristainetos2_4 imx6dl-aristainetos2_7 imx6dl-aristainetos_4 imx6dl-aristainetos_7 imx6dl-b105pv2 imx6dl-b105v2 imx6dl-b125pv2 imx6dl-b125v2 imx6dl-b155v2 imx6dl-colibri-eval-v3 imx6dl-colibri-v1_1-eval-v3
imx6dl-cubox-i-emmc-som-v15 imx6dl-cubox-i-som-v15 imx6dl-cubox-i imx6dl-dfi-fs700-m60 imx6dl-dhcom-picoitx imx6dl-eckelmann-ci4x10 imx6dl-emcon-avari imx6dl-gw51xx imx6dl-gw52xx imx6dl-gw53xx imx6dl-gw54xx
imx6dl-gw551x imx6dl-gw552x imx6dl-gw553x imx6dl-gw560x imx6dl-gw5903 imx6dl-gw5904 imx6dl-gw5907 imx6dl-gw5910 imx6dl-gw5912 imx6dl-gw5913 imx6dl-hummingboard-emmc-som-v15
imx6dl-hummingboard-som-v15 imx6dl-hummingboard imx6dl-hummingboard2-emmc-som-v15 imx6dl-hummingboard2-som-v15 imx6dl-hummingboard2 imx6dl-icore-mipi imx6dl-icore-rqs imx6dl-icore imx6dl-lanmcu imx6dl-mamoj imx6dl-nit6xlite
imx6dl-nitrogen6x imx6dl-phytec-mira-rdk-nand imx6dl-phytec-pbab01 imx6dl-pico-dwarf imx6dl-pico-hobbit imx6dl-pico-nymph imx6dl-pico-pi imx6dl-plybas imx6dl-plym2m imx6dl-prtmvt imx6dl-prtrvt
imx6dl-prtvt7 imx6dl-rex-basic imx6dl-riotboard imx6dl-sabreauto imx6dl-sabrelite imx6dl-sabresd imx6dl-savageboard imx6dl-skov-revc-lt2 imx6dl-skov-revc-lt6 imx6dl-solidsense imx6dl-ts4900
imx6dl-ts7970 imx6dl-tx6dl-comtft imx6dl-tx6s-8034-mb7 imx6dl-tx6s-8034 imx6dl-tx6s-8035-mb7 imx6dl-tx6s-8035 imx6dl-tx6u-801x imx6dl-tx6u-8033-mb7 imx6dl-tx6u-8033 imx6dl-tx6u-80xx-mb7 imx6dl-tx6u-811x
imx6dl-tx6u-81xx-mb7 imx6dl-udoo imx6dl-victgo imx6dl-vicut1 imx6dl-wandboard-revb1 imx6dl-wandboard-revd1 imx6dl-wandboard imx6dl-yapp4-draco imx6dl-yapp4-hydra imx6dl-yapp4-orion imx6dl-yapp4-ursa
imx6q-apalis-eval imx6q-apalis-ixora-v1.1 imx6q-apalis-ixora imx6q-apf6dev imx6q-arm2 imx6q-b450v3 imx6q-b650v3 imx6q-b850v3 imx6q-cm-fx6 imx6q-cubox-i-emmc-som-v15 imx6q-cubox-i-som-v15
imx6q-cubox-i imx6q-dfi-fs700-m60 imx6q-dhcom-pdk2 imx6q-display5-tianma-tm070-1280x768 imx6q-dmo-edmqmx6 imx6q-dms-ba16 imx6q-ds imx6q-emcon-avari imx6q-evi imx6q-gk802 imx6q-gw51xx
imx6q-gw52xx imx6q-gw53xx imx6q-gw5400-a imx6q-gw54xx imx6q-gw551x imx6q-gw552x imx6q-gw553x imx6q-gw560x imx6q-gw5903 imx6q-gw5904 imx6q-gw5907
imx6q-gw5910 imx6q-gw5912 imx6q-gw5913 imx6q-h100 imx6q-hummingboard-emmc-som-v15 imx6q-hummingboard-som-v15 imx6q-hummingboard imx6q-hummingboard2-emmc-som-v15 imx6q-hummingboard2-som-v15 imx6q-hummingboard2 imx6q-icore-mipi
imx6q-icore-ofcap10 imx6q-icore-ofcap12 imx6q-icore-rqs imx6q-icore imx6q-kp-tpc imx6q-logicpd imx6q-marsboard imx6q-mccmon6 imx6q-nitrogen6_max imx6q-nitrogen6_som2 imx6q-nitrogen6x
imx6q-novena imx6q-phytec-mira-rdk-emmc imx6q-phytec-mira-rdk-nand imx6q-phytec-pbab01 imx6q-pico-dwarf imx6q-pico-hobbit imx6q-pico-nymph imx6q-pico-pi imx6q-pistachio imx6q-prti6q imx6q-prtwd2
imx6q-rex-pro imx6q-sabreauto imx6q-sabrelite imx6q-sabresd imx6q-savageboard imx6q-sbc6x imx6q-skov-revc-lt2 imx6q-skov-revc-lt6 imx6q-skov-reve-mi1010ait-1cp1 imx6q-solidsense imx6q-tbs2910
imx6q-ts4900 imx6q-ts7970 imx6q-tx6q-1010-comtft imx6q-tx6q-1010 imx6q-tx6q-1020-comtft imx6q-tx6q-1020 imx6q-tx6q-1036-mb7 imx6q-tx6q-1036 imx6q-tx6q-10x0-mb7 imx6q-tx6q-1110 imx6q-tx6q-11x0-mb7
imx6q-udoo imx6q-utilite-pro imx6q-var-dt6customboard imx6q-vicut1 imx6q-wandboard-revb1 imx6q-wandboard-revd1 imx6q-wandboard imx6q-zii-rdu2 imx6qp-nitrogen6_max imx6qp-nitrogen6_som2 imx6qp-phytec-mira-rdk-nand
imx6qp-prtwd3 imx6qp-sabreauto imx6qp-sabresd imx6qp-tx6qp-8037-mb7 imx6qp-tx6qp-8037 imx6qp-tx6qp-8137-mb7 imx6qp-tx6qp-8137 imx6qp-vicutp imx6qp-wandboard-revd1 imx6qp-zii-rdu2 imx6s-dhcom-drc02
imx6sl-evk imx6sl-tolino-shine2hd imx6sl-tolino-shine3 imx6sl-warp imx6sx-nitrogen6sx imx6sx-sabreauto imx6sx-sdb-mqs imx6sx-sdb-reva imx6sx-sdb-sai imx6sx-sdb imx6sx-softing-vining-2000
imx6sx-udoo-neo-basic imx6sx-udoo-neo-extended imx6sx-udoo-neo-full imx6ul-14x14-evk imx6ul-ccimx6ulsbcexpress imx6ul-ccimx6ulsbcpro imx6ul-geam imx6ul-isiot-emmc imx6ul-isiot-nand imx6ul-kontron-n6310-s-43 imx6ul-kontron-n6310-s
imx6ul-liteboard imx6ul-opos6uldev imx6ul-phytec-segin-ff-rdk-emmc imx6ul-phytec-segin-ff-rdk-nand imx6ul-pico-dwarf imx6ul-pico-hobbit imx6ul-pico-pi imx6ul-prti6g imx6ul-tx6ul-0010 imx6ul-tx6ul-0011 imx6ul-tx6ul-mainboard
imx6ull-14x14-evk imx6ull-colibri-eval-v3 imx6ull-colibri-wifi-eval-v3 imx6ull-myir-mys-6ulx-eval imx6ull-opos6uldev imx6ull-phytec-segin-ff-rdk-emmc imx6ull-phytec-segin-ff-rdk-nand imx6ull-phytec-segin-lc-rdk-nand imx6ulz-14x14-evk imx7d-cl-som-imx7 imx7d-colibri-aster
imx7d-colibri-emmc-aster imx7d-colibri-emmc-eval-v3 imx7d-colibri-eval-v3 imx7d-flex-concentrator-mfg imx7d-flex-concentrator imx7d-mba7 imx7d-meerkat96 imx7d-nitrogen7 imx7d-pico-dwarf imx7d-pico-hobbit imx7d-pico-nymph
imx7d-pico-pi imx7d-remarkable2 imx7d-sbc-imx7 imx7d-sdb-reva imx7d-sdb-sht11 imx7d-sdb imx7d-zii-rmu2 imx7d-zii-rpu2 imx7s-colibri-aster imx7s-colibri-eval-v3 imx7s-mba7
imx7s-warp qcom-apq8060-dragonboard qcom-apq8064-asus-nexus7-flo qcom-apq8064-cm-qs600 qcom-apq8064-ifc6410 qcom-apq8064-sony-xperia-yuga qcom-apq8074-dragonboard qcom-apq8084-ifc6540 qcom-apq8084-mtp qcom-ipq4018-ap120c-ac-bit qcom-ipq4018-ap120c-ac
qcom-ipq4018-jalapeno qcom-ipq4019-ap.dk01.1-c1 qcom-ipq4019-ap.dk04.1-c1 qcom-ipq4019-ap.dk04.1-c3 qcom-ipq4019-ap.dk07.1-c1 qcom-ipq4019-ap.dk07.1-c2 qcom-ipq8064-ap148 qcom-ipq8064-rb3011 qcom-mdm9615-wp8548-mangoh-green qcom-msm8226-samsung-s3ve3g qcom-msm8660-surf
qcom-msm8960-cdp qcom-msm8974-fairphone-fp2 qcom-msm8974-lge-nexus5-hammerhead qcom-msm8974-samsung-klte qcom-msm8974-sony-xperia-amami qcom-msm8974-sony-xperia-castor qcom-msm8974-sony-xperia-honami qcom-sdx55-mtp qcom-sdx55-t55 qcom-sdx55-telit-fn980-tlb sun4i-a10-a1000
sun4i-a10-ba10-tvbox sun4i-a10-chuwi-v7-cw0825 sun4i-a10-cubieboard sun4i-a10-dserve-dsrv9703c sun4i-a10-gemei-g9 sun4i-a10-hackberry sun4i-a10-hyundai-a7hd sun4i-a10-inet1 sun4i-a10-inet97fv2 sun4i-a10-inet9f-rev03 sun4i-a10-itead-iteaduino-plus
sun4i-a10-jesurun-q5 sun4i-a10-marsboard sun4i-a10-mini-xplus sun4i-a10-mk802 sun4i-a10-mk802ii sun4i-a10-olinuxino-lime sun4i-a10-pcduino sun4i-a10-pcduino2 sun4i-a10-pov-protab2-ips9 sun4i-a10-topwise-a721 sun5i-a10s-auxtek-t003
sun5i-a10s-auxtek-t004 sun5i-a10s-mk802 sun5i-a10s-olinuxino-micro sun5i-a10s-r7-tv-dongle sun5i-a10s-wobo-i5 sun5i-a13-difrnce-dit4350 sun5i-a13-empire-electronix-d709 sun5i-a13-empire-electronix-m712 sun5i-a13-hsg-h702 sun5i-a13-inet-98v-rev2 sun5i-a13-licheepi-one
sun5i-a13-olinuxino-micro sun5i-a13-olinuxino sun5i-a13-pocketbook-touch-lux-3 sun5i-a13-q8-tablet sun5i-a13-utoo-p66 sun5i-gr8-chip-pro sun5i-gr8-evb sun5i-r8-chip sun6i-a31-app4-evb1 sun6i-a31-colombus sun6i-a31-hummingbird
sun6i-a31-i7 sun6i-a31-m9 sun6i-a31-mele-a1000g-quad sun6i-a31s-colorfly-e708-q1 sun6i-a31s-cs908 sun6i-a31s-inet-q972 sun6i-a31s-primo81 sun6i-a31s-sina31s sun6i-a31s-sinovoip-bpi-m2 sun6i-a31s-yones-toptech-bs1078-v2 sun7i-a20-bananapi-m1-plus
sun7i-a20-bananapi sun7i-a20-bananapro sun7i-a20-cubieboard2 sun7i-a20-cubietruck sun7i-a20-hummingbird sun7i-a20-i12-tvbox sun7i-a20-icnova-swac sun7i-a20-itead-ibox sun7i-a20-lamobo-r1 sun7i-a20-linutronix-testbox-v2 sun7i-a20-m3
sun7i-a20-mk808c sun7i-a20-olimex-som-evb-emmc sun7i-a20-olimex-som-evb sun7i-a20-olimex-som204-evb-emmc sun7i-a20-olimex-som204-evb sun7i-a20-olinuxino-lime-emmc sun7i-a20-olinuxino-lime sun7i-a20-olinuxino-lime2-emmc sun7i-a20-olinuxino-lime2 sun7i-a20-olinuxino-micro-emmc sun7i-a20-olinuxino-micro
sun7i-a20-orangepi-mini sun7i-a20-orangepi sun7i-a20-pcduino3-nano sun7i-a20-pcduino3 sun7i-a20-wexler-tab7200 sun7i-a20-wits-pro-a20-dkt sun8i-a23-evb sun8i-a23-gt90h-v4 sun8i-a23-inet86dz sun8i-a23-ippo-q8h-v1.2 sun8i-a23-ippo-q8h-v5
sun8i-a23-polaroid-mid2407pxe03 sun8i-a23-polaroid-mid2809pxe04 sun8i-a23-q8-tablet sun8i-a33-et-q8-v1.6 sun8i-a33-ga10h-v1.1 sun8i-a33-inet-d978-rev2 sun8i-a33-ippo-q8h-v1.2 sun8i-a33-olinuxino sun8i-a33-q8-tablet sun8i-a33-sinlinx-sina33 sun8i-a83t-allwinner-h8homlet-v2
sun8i-a83t-bananapi-m3 sun8i-a83t-cubietruck-plus sun8i-a83t-tbs-a711 sun8i-h2-plus-bananapi-m2-zero sun8i-h2-plus-libretech-all-h3-cc sun8i-h2-plus-orangepi-r1 sun8i-h2-plus-orangepi-zero sun8i-h3-bananapi-m2-plus-v1.2 sun8i-h3-bananapi-m2-plus sun8i-h3-beelink-x2 sun8i-h3-emlid-neutis-n5h3-devboard
sun8i-h3-libretech-all-h3-cc sun8i-h3-mapleboard-mp130 sun8i-h3-nanopi-duo2 sun8i-h3-nanopi-m1-plus sun8i-h3-nanopi-m1 sun8i-h3-nanopi-neo-air sun8i-h3-nanopi-neo sun8i-h3-nanopi-r1 sun8i-h3-orangepi-2 sun8i-h3-orangepi-lite sun8i-h3-orangepi-one
sun8i-h3-orangepi-pc-plus sun8i-h3-orangepi-pc sun8i-h3-orangepi-plus sun8i-h3-orangepi-plus2e sun8i-h3-orangepi-zero-plus2 sun8i-h3-rervision-dvk sun8i-h3-zeropi sun8i-r16-bananapi-m2m sun8i-r16-nintendo-nes-classic sun8i-r16-nintendo-super-nes-classic sun8i-r16-parrot
sun8i-r40-bananapi-m2-ultra sun8i-r40-oka40i-c sun8i-s3-elimo-initium sun8i-s3-lichee-zero-plus sun8i-s3-pinecube sun8i-t3-cqa3t-bv3 sun8i-v3-sl631-imx179 sun8i-v3s-licheepi-zero-dock sun8i-v3s-licheepi-zero sun8i-v40-bananapi-m2-berry sun9i-a80-cubieboard4
sun9i-a80-optimus vexpress-v2p-ca15-tc1 vexpress-v2p-ca15_a7 vexpress-v2p-ca5s vexpress-v2p-ca9 zynq-cc108 zynq-ebaz4205 zynq-microzed zynq-parallella zynq-zc702 zynq-zc706
zynq-zc770-xm010 zynq-zc770-xm011 zynq-zc770-xm012 zynq-zc770-xm013 zynq-zed zynq-zturn-v5 zynq-zturn zynq-zybo-z7 zynq-zybo

Install Alpine on supported SoCs

Generic information

(If anyone has one of the above devices and has successfully installed Alpine on it, please consider adding the missing info here.)

Example with Wandboard

Get latest Alpine image

Download the last Generic ARM image on https://alpinelinux.org/downloads/ Extract the archive somewhere.

Prepare SD Card

First install SPL and u-boot.img (this could change for other board): in root, write the SPL from Alpine extracted files :

dd if=u-boot/wandboard/SPL of=/dev/sdX seek=1 bs=1k

and the u-boot.img :

dd if=u-boot/wandboard/u-boot.img of=/dev/sdX seek=69 bs=1k

After create the partition on the sd-card with fdisk, then copy folders apks/ boot/ efi/ extlinux/ u-boot/ to the sd-card partition. (I'm not sure all folder as useful).

After you can put the sd-card in the Wandboard and boot it with serial console connected.
The board should boot on the sd-card. When the prompt ask a login, enter 'root'. Then launch 'setup-alpine' to configure the system.

Specific guides

Unupported SoCs

If you have an armv6/armv7 SoC which is not listed above but is supported by mainline uboot/kernel then it's still possible to install Alpine


Requirements

  • Alpine's forked uboot to support tarballs (fabled?)
  • serial console
  • crosscompiler/toolchain if you can not compile natively


The embedded world

A lot of the SoCs have their own way of doing things, although they use uboot and Linux kernel but often they are heavily modified to suit easy flashing of "ROMs" or other unknown reasons, e.g. Rockchip's notion "partition" are neither DOS nor GPT partitions. We will discuss to install Alpine in a more standard way like x86 with either DOS or GPT partitions. You will most likely have to install/flash the mainline uboot, which can be non-destructive if you use external storage.


Storage

One can load uboot from the following block devices if it's supported.

  • NAND
  • eMMC
  • SD card
  • USB


Power on

Some SoCs need both SPL and uboot, you need to check uboot for your board. Most (if not all) boards boots from the internal storage first (either NAND or eMMC) you will have to check documentation of your board if you wish to boot the SPL/uboot from SD/USB.

One can view SPL+uboot as BIOS and boot-loader on PC. Think that you could put the BIOS on an external storage :D

Once you have loaded the "standard" uboot, things are more or less like on x86.


Partitioning

Either DOS or GPT patitions should work. Start of the first partition should be on block 2048 so there is space for SPL/uboot and marked bootable (with the MBR bootable flag, or GPT legacy_bios_bootable attribute).

  • SPL starts at block 64 (please consult the docs for your board)
  • uboot starts at block 256 (please consult the docs for your board)

Just dd SPL and boot with the correct offset to the media you wish to boot

Booting Linux kernel

  • uboot uses extlinux.conf file to locate the kernel/initramfs/... just like syslinx, you need to put that file on the partitions which is marked bootable in the /boot directory
  • there should be an extra line "FDTDIR" which points to the DTBs

e.g.

label Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl) 22 (Rawhide)
	kernel /boot/vmlinuz-3.17.0-0.rc4.git2.1.fc22.armv7hl
	append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8 LANG=en_US.UTF-8 drm.debug=0xf
	fdtdir /boot/dtb-3.17.0-0.rc4.git2.1.fc22.armv7hl
	initrd /boot/initramfs-3.17.0-0.rc4.git2.1.fc22.armv7hl.img

Using QEMU

qemu-system-arm -M vexpress-a9 -kernel zImage -initrd initramfs-grsec -dtb vexpress-v2p-ca9.dtb -hda hda.img -serial stdio


References