Alpine on ARM: Difference between revisions

From Alpine Linux
m (→‎Supported SoCs: add armada-3720-espressobin-v7-emmc)
(Generic information: add Wandboard example first version)
Line 249: Line 249:


(If anyone has one of the above devices and has successfully installed Alpine on it, please consider adding the missing info here.)
(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.<br>
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 ===
=== Specific guides ===

Revision as of 20:01, 23 August 2021

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 armv6/armhf arch on the following SoCs

(This is taken from the DTBs which Alpine includes)

am335x-base0033 am335x-bone am335x-boneblack am335x-evm am335x-evmsk am335x-nano am335x-pepper am3517-craneboard am3517-evm am3517_mt_ventoux am437x-gp-evm
am437x-sk-evm am43x-epos-evm exynos4210-origen exynos4210-smdkv310 exynos4210-trats exynos4210-universal_c210 exynos4412-odroidu3 exynos4412-odroidx exynos4412-odroidx2 exynos4412-origen exynos4412-smdk4412 exynos4412-tiny4412
exynos4412-trats2 exynos5250-arndale exynos5250-smdk5250 exynos5250-snow exynos5260-xyref5260 exynos5410-smdk5410 exynos5420-arndale-octa exynos5420-peach-pit exynos5420-smdk5420 exynos5440-sd5v1 exynos5440-ssdk5440 exynos5800-peach-pi
imx1-ads imx1-apf9328 imx25-eukrea-mbimxsd25-baseboard-cmo-qvga imx25-eukrea-mbimxsd25-baseboard-dvi-svga imx25-eukrea-mbimxsd25-baseboard-dvi-vga imx25-eukrea-mbimxsd25-baseboard imx25-karo-tx25 imx25-pdk imx27-apf27 imx27-apf27dev imx27-eukrea-mbimxsd27-baseboard imx27-pdk
imx27-phytec-phycard-s-rdk imx27-phytec-phycore-rdk imx31-bug imx35-eukrea-mbimxsd35-baseboard imx35-pdk imx50-evk imx51-apf51 imx51-apf51dev imx51-babbage imx51-digi-connectcore-jsk imx51-eukrea-mbimxsd51-baseboard imx53-ard
imx53-m53evk imx53-mba53 imx53-qsb imx53-qsrb imx53-smd imx53-tx53-x03x imx53-tx53-x13x imx53-voipac-bsb imx6dl-aristainetos_4 imx6dl-aristainetos_7 imx6dl-cubox-i imx6dl-dfi-fs700-m60
imx6dl-gw51xx imx6dl-gw52xx imx6dl-gw53xx imx6dl-gw54xx imx6dl-gw552x imx6dl-hummingboard imx6dl-nitrogen6x imx6dl-phytec-pbab01 imx6dl-rex-basic imx6dl-riotboard imx6dl-sabreauto imx6dl-sabrelite
imx6dl-sabresd imx6dl-tx6dl-comtft imx6dl-tx6u-801x imx6dl-tx6u-811x imx6dl-wandboard-revb1 imx6dl-wandboard imx6q-arm2 imx6q-cm-fx6 imx6q-cubox-i imx6q-dfi-fs700-m60 imx6q-dmo-edmqmx6 imx6q-gk802
imx6q-gw51xx imx6q-gw52xx imx6q-gw53xx imx6q-gw5400-a imx6q-gw54xx imx6q-gw552x imx6q-hummingboard imx6q-nitrogen6x imx6q-phytec-pbab01 imx6q-rex-pro imx6q-sabreauto imx6q-sabrelite
imx6q-sabresd imx6q-sbc6x imx6q-tx6q-1010-comtft imx6q-tx6q-1010 imx6q-tx6q-1020-comtft imx6q-tx6q-1020 imx6q-tx6q-1110 imx6q-udoo imx6q-wandboard-revb1 imx6q-wandboard imx6sl-evk imx6sx-sdb
armada-3720-espressobin-v7-emmc
omap3-beagle-xm-ab omap3-beagle-xm omap3-beagle omap3-cm-t3517 omap3-cm-t3530 omap3-cm-t3730 omap3-devkit8000 omap3-evm-37xx omap3-evm omap3-gta04a3 omap3-gta04a4 omap3-gta04a5
omap3-ha-lcd omap3-ha omap3-igep0020 omap3-igep0030 omap3-ldp omap3-lilly-dbb056 omap3-n9 omap3-n900 omap3-n950 omap3-overo-alto35 omap3-overo-chestnut43 omap3-overo-gallop43
omap3-overo-palo43 omap3-overo-storm-alto35 omap3-overo-storm-chestnut43 omap3-overo-storm-gallop43 omap3-overo-storm-palo43 omap3-overo-storm-summit omap3-overo-storm-tobi omap3-overo-summit omap3-overo-tobi omap3-sbc-t3517 omap3-sbc-t3530 omap3-sbc-t3730
omap3-thunder omap3-zoom3 omap3430-sdp omap4-duovero-parlor omap4-panda-a4 omap4-panda-es omap4-panda omap4-sdp-es23plus omap4-sdp omap4-var-dvk-om44 omap4-var-stk-om44 omap5-cm-t54
omap5-sbc-t54 omap5-uevm qcom-apq8064-cm-qs600 qcom-apq8064-ifc6410 qcom-apq8074-dragonboard qcom-apq8084-ifc6540 qcom-apq8084-mtp qcom-ipq8064-ap148 qcom-msm8660-surf qcom-msm8960-cdp qcom-msm8974-sony-xperia-honami sun4i-a10-a1000
sun4i-a10-ba10-tvbox sun4i-a10-cubieboard sun4i-a10-hackberry sun4i-a10-inet97fv2 sun4i-a10-mini-xplus sun4i-a10-olinuxino-lime sun4i-a10-pcduino sun5i-a10s-olinuxino-micro sun5i-a10s-r7-tv-dongle sun5i-a13-hsg-h702 sun5i-a13-olinuxino-micro sun5i-a13-olinuxino
sun6i-a31-app4-evb1 sun6i-a31-colombus sun6i-a31-hummingbird sun6i-a31-m9 sun7i-a20-cubieboard2 sun7i-a20-cubietruck sun7i-a20-hummingbird sun7i-a20-i12-tvbox sun7i-a20-olinuxino-lime sun7i-a20-olinuxino-micro sun7i-a20-pcduino3 sun8i-a23-ippo-q8h-v5
vexpress-v2p-ca15-tc1 vexpress-v2p-ca15_a7 vexpress-v2p-ca5s vexpress-v2p-ca9 vf610-colibri-eval-v3 vf610-cosmic vf610-twr

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


Requiremnets

  • 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