<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yuu</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Yuu"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Yuu"/>
	<updated>2026-05-01T16:34:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31851</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31851"/>
		<updated>2025-12-21T14:18:32Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Added dmesg and /etc/os-release&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is now well supported by Alpine/Linux and the &amp;quot;Generic U-Boot (aarch64)&amp;quot; build contains everything we need !&lt;br /&gt;
&lt;br /&gt;
What about the hardware side ?&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* Debug only : USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
==Prepare the micro-SD card==&lt;br /&gt;
With a blank SD card, we can now format-it using the vfat file system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING&#039;&#039;&#039; : DOUBLE-CHECK &amp;lt;code&amp;gt;/dev/sda1&amp;lt;/code&amp;gt; is indeed your SD card ! Or you&#039;ll loose all your data ! You have been warned !&lt;br /&gt;
For this, it&#039;s preferable to run &amp;lt;code&amp;gt;dmesg -We&amp;lt;/code&amp;gt; to check for the name, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,004725] ums-realtek 1-1:1.0: USB Mass Storage device detected&lt;br /&gt;
[  +0,002985] scsi host0: usb-storage 1-1:1.0&lt;br /&gt;
[  +1,020024] scsi 0:0:0:0: Direct-Access     Generic- SD/MMC/MS PRO    1.00 PQ: 0 ANSI: 4&lt;br /&gt;
[  +0,000591] sd 0:0:0:0: Attached scsi generic sg0 type 0&lt;br /&gt;
[  +1,314707] sd 0:0:0:0: [sda] 15269888 512-byte logical blocks: (7.82 GB/7.28 GiB)&lt;br /&gt;
[  +0,000352] sd 0:0:0:0: [sda] Write Protect is off&lt;br /&gt;
[  +0,000008] sd 0:0:0:0: [sda] Mode Sense: 2f 00 00 00&lt;br /&gt;
[  +0,000408] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn&#039;t support DPO or FUA&lt;br /&gt;
[  +0,062938]  sda: sda1&lt;br /&gt;
[  +0,000238] sd 0:0:0:0: [sda] Attached SCSI removable disk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And also verify with &amp;lt;code&amp;gt;fdisk -l&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Disk /dev/sda: 7.28 GiB, 7818182656 bytes, 15269888 sectors&lt;br /&gt;
Disk model: SD/MMC/MS PRO   &lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Device     Boot Start      End  Sectors  Size Id Type&lt;br /&gt;
/dev/sda1        2048 15269887 15267840  7.3G  b W95 FAT32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we are sure that &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt; is really our SD card device and we can format our SD card using &amp;lt;code&amp;gt;mkfs.vfat /dev/sda1&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Extract Alpine Linux==&lt;br /&gt;
Then mount and extract the Alpine Linux archive, for example if you do everything as root:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount /dev/sda1 /mnt/sd&lt;br /&gt;
tar xvzfp /home/user/Downloads/alpine-uboot-3.23.2-aarch64.tar.gz -C /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, don&#039;t forget to flush changes before unmounting the device. Note that it can be a little slow depending of the speed of your device.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sync &amp;amp;&amp;amp; umount /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sign u-boot==&lt;br /&gt;
We don&#039;t need to build u-boot from source as the version provided does autoboot properly:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone --depth 1 https://github.com/LibreELEC/amlogic-boot-fip.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the u-boot.bin from your sd card to the git repository, and sign Amlogic u-boot binaries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd amlogic-boot-fip/&lt;br /&gt;
/mnt/sd/u-boot/odroid-c2/u-boot.bin alpine.u-boot.bin&lt;br /&gt;
./build-fip.sh odroid-c2 alpine.u-boot.bin my-output-dir &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==u-boot flashing==&lt;br /&gt;
&#039;&#039;&#039;WARNING&#039;&#039;&#039; : Make sure your device is &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt; !&lt;br /&gt;
Also, check that the device is un-mouted using &amp;lt;code&amp;gt;umount /dev/sda1&amp;lt;/code&amp;gt;, then use dd to write u-boot&lt;br /&gt;
For example, using /dev/sda from previous commands and the signed u-boot (u-boot.bin.sd.bin) from amlogic-boot-fip tool.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=512 skip=1 seek=1&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=1 count=444&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Connect at least your USB keyboard and your HDMI monitor to check the boot and all should work nicely :)&lt;br /&gt;
If not, check the Debugging part of this wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
Connect your USB to TTL converter on your board : I noticed that you don&#039;t need to connect all wires, pin 1 don&#039;t seems to be is not mandatory at all.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
_____UART____&lt;br /&gt;
|Pin 4 - GND|&lt;br /&gt;
|Pin 3 - RXD|&lt;br /&gt;
|Pin 2 - TXD|&lt;br /&gt;
|Pin 1 - VCC|&lt;br /&gt;
\___________|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details are available on the odroid wiki : https://wiki.odroid.com/accessory/development/usb_uart_kit&lt;br /&gt;
&lt;br /&gt;
I use minicom for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TERM=linux minicom -b 115200 -D /dev/ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Boot log==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]&lt;br /&gt;
[    0.000000] Linux version 6.18.1-0-lts (buildozer@build-3-23-aarch64) (cc (Alpine 15.2.0) 15.2.0, GNU ld (GNU Binutils) 2.45.1) #1-Alpine SMP PREEMPT_DYNAMIC 2025-12-15 07:25:33&lt;br /&gt;
[    0.000000] Machine model: Hardkernel ODROID-C2&lt;br /&gt;
[    0.000000] efi: EFI v2.11 by Das U-Boot&lt;br /&gt;
[    0.000000] efi: RTPROP=0x7af1c040 SMBIOS 3.0=0x7bf74000 INITRD=0x7aefd040 RNG=0x7aefc040 MEMRESERVE=0x7aefb040 &lt;br /&gt;
[    0.000000] random: crng init done&lt;br /&gt;
[    0.000000] Reserved memory: created CMA memory pool at 0x000000005d000000, size 256 MiB&lt;br /&gt;
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool&lt;br /&gt;
[    0.000000] OF: reserved mem: 0x000000005d000000..0x000000006cffffff (262144 KiB) map reusable linux,cma&lt;br /&gt;
[    0.000000] OF: reserved mem: 0x0000000000000000..0x0000000000ffffff (16384 KiB) nomap non-reusable hwrom@0&lt;br /&gt;
[    0.000000] OF: reserved mem: 0x0000000010000000..0x00000000101fffff (2048 KiB) nomap non-reusable secmon@10000000&lt;br /&gt;
[    0.000000] OF: reserved mem: 0x0000000005000000..0x00000000052fffff (3072 KiB) nomap non-reusable secmon@5000000&lt;br /&gt;
[    0.000000] OF: reserved mem: 0x0000000005300000..0x00000000072fffff (32768 KiB) nomap non-reusable secmon@5300000&lt;br /&gt;
[    0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff]&lt;br /&gt;
[    0.000000] NODE_DATA(0) allocated [mem 0x7f83e040-0x7f8505ff]&lt;br /&gt;
[    0.000000] Zone ranges:&lt;br /&gt;
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000007fffffff]&lt;br /&gt;
[    0.000000]   DMA32    empty&lt;br /&gt;
[    0.000000]   Normal   empty&lt;br /&gt;
[    0.000000] Movable zone start for each node&lt;br /&gt;
[    0.000000] Early memory node ranges&lt;br /&gt;
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000000ffffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x0000000001000000-0x0000000004ffffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x0000000005000000-0x00000000072fffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x0000000007300000-0x000000000fffffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x0000000010000000-0x00000000101fffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x0000000010200000-0x000000007abfffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007ac00000-0x000000007ac00fff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007ac01000-0x000000007af1bfff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007af1c000-0x000000007af1cfff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007af1d000-0x000000007af1dfff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007af1e000-0x000000007af3ffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007af40000-0x000000007bf73fff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007bf74000-0x000000007bf74fff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007bf75000-0x000000007df4ffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007df50000-0x000000007df5ffff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007df60000-0x000000007fe5afff]&lt;br /&gt;
[    0.000000]   node   0: [mem 0x000000007fe5b000-0x000000007fffffff]&lt;br /&gt;
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff]&lt;br /&gt;
[    0.000000] psci: probing for conduit method from DT.&lt;br /&gt;
[    0.000000] psci: PSCIv0.2 detected in firmware.&lt;br /&gt;
[    0.000000] psci: Using standard PSCI v0.2 function IDs&lt;br /&gt;
[    0.000000] psci: Trusted OS migration not required&lt;br /&gt;
[    0.000000] percpu: Embedded 34 pages/cpu s100952 r8192 d30120 u139264&lt;br /&gt;
[    0.000000] pcpu-alloc: s100952 r8192 d30120 u139264 alloc=34*4096&lt;br /&gt;
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 &lt;br /&gt;
[    0.000000] Detected VIPT I-cache on CPU0&lt;br /&gt;
[    0.000000] CPU features: detected: ARM erratum 843419&lt;br /&gt;
[    0.000000] CPU features: detected: ARM erratum 845719&lt;br /&gt;
[    0.000000] alternatives: applying boot alternatives&lt;br /&gt;
[    0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-lts modules=loop,squashfs,sd-mod,usb-storage quiet&lt;br /&gt;
[    0.000000] Unknown kernel command line parameters &amp;quot;modules=loop,squashfs,sd-mod,usb-storage&amp;quot;, will be passed to user space.&lt;br /&gt;
[    0.000000] printk: log buffer data + meta data: 131072 + 458752 = 589824 bytes&lt;br /&gt;
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)&lt;br /&gt;
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)&lt;br /&gt;
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 2MB&lt;br /&gt;
[    0.000000] software IO TLB: area num 4.&lt;br /&gt;
[    0.000000] software IO TLB: mapped [mem 0x000000007f29f000-0x000000007f49f000] (2MB)&lt;br /&gt;
[    0.000000] Fallback order for Node 0: 0 &lt;br /&gt;
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 524288&lt;br /&gt;
[    0.000000] Policy zone: DMA&lt;br /&gt;
[    0.000000] mem auto-init: stack:all(zero), heap alloc:on, heap free:off&lt;br /&gt;
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1&lt;br /&gt;
[    0.000000] kmemleak: Kernel memory leak detector disabled&lt;br /&gt;
[    0.000000] ftrace: allocating 45359 entries in 178 pages&lt;br /&gt;
[    0.000000] ftrace: allocated 178 pages with 4 groups&lt;br /&gt;
[    0.000000] Dynamic Preempt: voluntary&lt;br /&gt;
[    0.000000] rcu: Preemptible hierarchical RCU implementation.&lt;br /&gt;
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=4.&lt;br /&gt;
[    0.000000] 	Trampoline variant of Tasks RCU enabled.&lt;br /&gt;
[    0.000000] 	Rude variant of Tasks RCU enabled.&lt;br /&gt;
[    0.000000] 	Tracing variant of Tasks RCU enabled.&lt;br /&gt;
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.&lt;br /&gt;
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4&lt;br /&gt;
[    0.000000] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.&lt;br /&gt;
[    0.000000] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.&lt;br /&gt;
[    0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.&lt;br /&gt;
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0&lt;br /&gt;
[    0.000000] Root IRQ handler: gic_handle_irq&lt;br /&gt;
[    0.000000] GIC: Using split EOI/Deactivate mode&lt;br /&gt;
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.&lt;br /&gt;
[    0.000000] arch_timer: cp15 timer running at 24.00MHz (phys).&lt;br /&gt;
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns&lt;br /&gt;
[    0.000000] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns&lt;br /&gt;
[    0.000800] kfence: initialized - using 2097152 bytes for 255 objects at 0x(____ptrval____)-0x(____ptrval____)&lt;br /&gt;
[    0.001028] Console: colour dummy device 80x25&lt;br /&gt;
[    0.001040] printk: legacy console [tty0] enabled&lt;br /&gt;
[    0.001209] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=24000)&lt;br /&gt;
[    0.001223] pid_max: default: 32768 minimum: 301&lt;br /&gt;
[    0.001379] LSM: initializing lsm=lockdown,capability,landlock,yama&lt;br /&gt;
[    0.001551] landlock: Up and running.&lt;br /&gt;
[    0.001556] Yama: becoming mindful.&lt;br /&gt;
[    0.001675] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)&lt;br /&gt;
[    0.001694] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)&lt;br /&gt;
[    0.004293] rcu: Hierarchical SRCU implementation.&lt;br /&gt;
[    0.004313] rcu: 	Max phase no-delay instances is 400.&lt;br /&gt;
[    0.004552] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level&lt;br /&gt;
[    0.006137] Remapping and enabling EFI services.&lt;br /&gt;
[    0.006487] smp: Bringing up secondary CPUs ...&lt;br /&gt;
[    0.007630] Detected VIPT I-cache on CPU1&lt;br /&gt;
[    0.007776] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]&lt;br /&gt;
[    0.009079] Detected VIPT I-cache on CPU2&lt;br /&gt;
[    0.009200] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]&lt;br /&gt;
[    0.010412] Detected VIPT I-cache on CPU3&lt;br /&gt;
[    0.010531] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]&lt;br /&gt;
[    0.010662] smp: Brought up 1 node, 4 CPUs&lt;br /&gt;
[    0.010676] SMP: Total of 4 processors activated.&lt;br /&gt;
[    0.010681] CPU: All CPU(s) started at EL2&lt;br /&gt;
[    0.010699] CPU features: detected: 32-bit EL0 Support&lt;br /&gt;
[    0.010703] CPU features: detected: 32-bit EL1 Support&lt;br /&gt;
[    0.010711] CPU features: detected: CRC32 instructions&lt;br /&gt;
[    0.010721] CPU features: detected: PMUv3&lt;br /&gt;
[    0.010765] alternatives: applying system-wide alternatives&lt;br /&gt;
[    0.011888] Memory: 1527796K/2097152K available (15744K kernel code, 2970K rwdata, 12020K rodata, 3712K init, 3510K bss, 301136K reserved, 262144K cma-reserved)&lt;br /&gt;
[    0.012919] devtmpfs: initialized&lt;br /&gt;
[    0.019322] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns&lt;br /&gt;
[    0.019382] posixtimers hash table entries: 2048 (order: 3, 32768 bytes, linear)&lt;br /&gt;
[    0.019460] futex hash table entries: 1024 (65536 bytes on 1 NUMA nodes, total 64 KiB, linear).&lt;br /&gt;
[    0.023417] 23216 pages in range for non-PLT usage&lt;br /&gt;
[    0.023441] 514736 pages in range for PLT usage&lt;br /&gt;
[    0.023773] pinctrl core: initialized pinctrl subsystem&lt;br /&gt;
[    0.024728] SMBIOS 3.7.0 present.&lt;br /&gt;
[    0.024746] DMI: Hardkernel Co., Ltd. ODROID-C2/ODROID-C2, BIOS 2025.10 10/01/2025&lt;br /&gt;
[    0.024784] DMI: Memory slots populated: 0/0&lt;br /&gt;
[    0.027296] NET: Registered PF_NETLINK/PF_ROUTE protocol family&lt;br /&gt;
[    0.029185] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations&lt;br /&gt;
[    0.030098] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations&lt;br /&gt;
[    0.031290] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations&lt;br /&gt;
[    0.031356] audit: initializing netlink subsys (disabled)&lt;br /&gt;
[    0.031614] audit: type=2000 audit(0.029:1): state=initialized audit_enabled=0 res=1&lt;br /&gt;
[    0.032703] thermal_sys: Registered thermal governor &#039;fair_share&#039;&lt;br /&gt;
[    0.032710] thermal_sys: Registered thermal governor &#039;bang_bang&#039;&lt;br /&gt;
[    0.032716] thermal_sys: Registered thermal governor &#039;step_wise&#039;&lt;br /&gt;
[    0.032721] thermal_sys: Registered thermal governor &#039;user_space&#039;&lt;br /&gt;
[    0.032781] cpuidle: using governor ladder&lt;br /&gt;
[    0.032805] cpuidle: using governor menu&lt;br /&gt;
[    0.032952] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.&lt;br /&gt;
[    0.033051] ASID allocator initialised with 65536 entries&lt;br /&gt;
[    0.033915] Serial: AMBA PL011 UART driver&lt;br /&gt;
[    0.038430] /soc/interrupt-controller@c4301000: Fixed dependency cycle(s) with /soc/interrupt-controller@c4301000&lt;br /&gt;
[    0.038607] /soc/vpu@d0100000: Fixed dependency cycle(s) with /soc/hdmi-tx@c883a000&lt;br /&gt;
[    0.038630] /soc/hdmi-tx@c883a000: Fixed dependency cycle(s) with /soc/vpu@d0100000&lt;br /&gt;
[    0.045891] /soc/vpu@d0100000: Fixed dependency cycle(s) with /soc/hdmi-tx@c883a000&lt;br /&gt;
[    0.046143] /soc/vpu@d0100000: Fixed dependency cycle(s) with /soc/hdmi-tx@c883a000&lt;br /&gt;
[    0.046205] /soc/hdmi-tx@c883a000: Fixed dependency cycle(s) with /soc/vpu@d0100000&lt;br /&gt;
[    0.049641] /soc/hdmi-tx@c883a000: Fixed dependency cycle(s) with /hdmi-connector&lt;br /&gt;
[    0.049721] /hdmi-connector: Fixed dependency cycle(s) with /soc/hdmi-tx@c883a000&lt;br /&gt;
[    0.051188] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages&lt;br /&gt;
[    0.051206] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page&lt;br /&gt;
[    0.051213] HugeTLB: registered 32.0 MiB page size, pre-allocated 0 pages&lt;br /&gt;
[    0.051217] HugeTLB: 0 KiB vmemmap can be freed for a 32.0 MiB page&lt;br /&gt;
[    0.051223] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages&lt;br /&gt;
[    0.051228] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page&lt;br /&gt;
[    0.051234] HugeTLB: registered 64.0 KiB page size, pre-allocated 0 pages&lt;br /&gt;
[    0.051238] HugeTLB: 0 KiB vmemmap can be freed for a 64.0 KiB page&lt;br /&gt;
[    0.053003] ACPI: Interpreter disabled.&lt;br /&gt;
[    0.053613] iommu: Default domain type: Translated&lt;br /&gt;
[    0.053625] iommu: DMA domain TLB invalidation policy: lazy mode&lt;br /&gt;
[    0.057233] pps_core: LinuxPPS API ver. 1 registered&lt;br /&gt;
[    0.057254] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti &amp;lt;giometti@linux.it&amp;gt;&lt;br /&gt;
[    0.057271] PTP clock support registered&lt;br /&gt;
[    0.057622] EDAC MC: Ver: 3.0.0&lt;br /&gt;
[    0.057896] scmi_core: SCMI protocol bus registered&lt;br /&gt;
[    0.057957] efivars: Registered efivars operations&lt;br /&gt;
[    0.059895] vgaarb: loaded&lt;br /&gt;
[    0.060354] clocksource: Switched to clocksource arch_sys_counter&lt;br /&gt;
[    0.061045] VFS: Disk quotas dquot_6.6.0&lt;br /&gt;
[    0.061085] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)&lt;br /&gt;
[    0.061557] pnp: PnP ACPI: disabled&lt;br /&gt;
[    0.068400] NET: Registered PF_INET protocol family&lt;br /&gt;
[    0.068648] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)&lt;br /&gt;
[    0.108233] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)&lt;br /&gt;
[    0.108372] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)&lt;br /&gt;
[    0.108481] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)&lt;br /&gt;
[    0.108718] TCP bind hash table entries: 16384 (order: 7, 524288 bytes, linear)&lt;br /&gt;
[    0.109068] TCP: Hash tables configured (established 16384 bind 16384)&lt;br /&gt;
[    0.109414] MPTCP token hash table entries: 2048 (order: 4, 49152 bytes, linear)&lt;br /&gt;
[    0.109521] UDP hash table entries: 1024 (order: 4, 65536 bytes, linear)&lt;br /&gt;
[    0.109600] UDP-Lite hash table entries: 1024 (order: 4, 65536 bytes, linear)&lt;br /&gt;
[    0.109804] NET: Registered PF_UNIX/PF_LOCAL protocol family&lt;br /&gt;
[    0.109844] NET: Registered PF_XDP protocol family&lt;br /&gt;
[    0.109864] PCI: CLS 0 bytes, default 64&lt;br /&gt;
[    0.110179] Trying to unpack rootfs image as initramfs...&lt;br /&gt;
[    0.119795] kvm [1]: nv: 568 coarse grained trap handlers&lt;br /&gt;
[    0.120337] kvm [1]: IPA Size Limit: 40 bits&lt;br /&gt;
[    0.123491] kvm [1]: vgic interrupt IRQ9&lt;br /&gt;
[    0.123540] kvm [1]: Hyp nVHE mode initialized successfully&lt;br /&gt;
[    0.125490] Initialise system trusted keyrings&lt;br /&gt;
[    0.125735] workingset: timestamp_bits=37 max_order=19 bucket_order=0&lt;br /&gt;
[    0.126143] Key type asymmetric registered&lt;br /&gt;
[    0.126155] Asymmetric key parser &#039;x509&#039; registered&lt;br /&gt;
[    0.126241] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)&lt;br /&gt;
[    0.126464] io scheduler mq-deadline registered&lt;br /&gt;
[    0.126476] io scheduler kyber registered&lt;br /&gt;
[    0.126533] io scheduler bfq registered&lt;br /&gt;
[    0.127930] irq_meson_gpio: 133 to 8 gpio interrupt mux initialized&lt;br /&gt;
[    0.160777] soc soc0: Amlogic Meson GXBB (S905) Revision 1f:c (0:1) Detected&lt;br /&gt;
[    0.166402] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled&lt;br /&gt;
[    0.170303] Serial: AMBA driver&lt;br /&gt;
[    0.171277] c81004c0.serial: ttyAML0 at MMIO 0xc81004c0 (irq = 14, base_baud = 1500000) is a meson_uart&lt;br /&gt;
[    0.171332] printk: legacy console [ttyAML0] enabled&lt;br /&gt;
[    0.185811] brd: module loaded&lt;br /&gt;
[    0.190075] meson-sm: secure-monitor enabled&lt;br /&gt;
[    0.192230] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 (0,8000003f) counters available&lt;br /&gt;
[    0.194651] gre: GRE over IPv4 demultiplexer driver&lt;br /&gt;
[    0.194813] NET: Registered PF_INET6 protocol family&lt;br /&gt;
[    0.196113] Segment Routing with IPv6&lt;br /&gt;
[    0.196163] In-situ OAM (IOAM) with IPv6&lt;br /&gt;
[    0.196511] Key type dns_resolver registered&lt;br /&gt;
[    0.207852] registered taskstats version 1&lt;br /&gt;
[    0.208756] Loading compiled-in X.509 certificates&lt;br /&gt;
[    1.890951] Freeing initrd memory: 161572K&lt;br /&gt;
[    1.915766] Loaded X.509 cert &#039;alpinelinux.org: Alpine Linux kernel key: 87fa969a47f3e2a6aa35859eb932a17c95abcd82&#039;&lt;br /&gt;
[    1.925972] Demotion targets for Node 0: null&lt;br /&gt;
[    1.926394] Key type .fscrypt registered&lt;br /&gt;
[    1.926408] Key type fscrypt-provisioning registered&lt;br /&gt;
[    1.990532] clk: Disabling unused clocks&lt;br /&gt;
[    1.990750] PM: genpd: Disabling unused power domains&lt;br /&gt;
[    1.997464] Freeing unused kernel memory: 3712K&lt;br /&gt;
[    1.997642] Run /init as init process&lt;br /&gt;
[    1.997651]   with arguments:&lt;br /&gt;
[    1.997657]     /init&lt;br /&gt;
[    1.997663]   with environment:&lt;br /&gt;
[    1.997668]     HOME=/&lt;br /&gt;
[    1.997673]     TERM=linux&lt;br /&gt;
[    1.997678]     modules=loop,squashfs,sd-mod,usb-storage&lt;br /&gt;
[    2.035274] Alpine Init 3.13.0-r0&lt;br /&gt;
[    2.038758] Loading boot drivers...&lt;br /&gt;
[    2.059104] loop: module loaded&lt;br /&gt;
[    2.064737] squashfs: version 4.0 (2009/01/31) Phillip Lougher&lt;br /&gt;
[    2.080813] SCSI subsystem initialized&lt;br /&gt;
[    2.103687] usbcore: registered new interface driver usbfs&lt;br /&gt;
[    2.103764] usbcore: registered new interface driver hub&lt;br /&gt;
[    2.103843] usbcore: registered new device driver usb&lt;br /&gt;
[    2.111310] usbcore: registered new interface driver usb-storage&lt;br /&gt;
[    2.180617] [drm] Initialized simpledrm 1.0.0 for 7fe5b000.framebuffer on minor 0&lt;br /&gt;
[    2.183224] fbcon: Deferring console take-over&lt;br /&gt;
[    2.183248] simple-framebuffer 7fe5b000.framebuffer: [drm] fb0: simpledrmdrmfb frame buffer device&lt;br /&gt;
[    2.192025] Loading boot drivers: ok.&lt;br /&gt;
[    2.198046] Mounting boot media...&lt;br /&gt;
[    2.378869] meson-gx-mmc d0072000.mmc: Got CD GPIO&lt;br /&gt;
[    2.456331] lima d00c0000.gpu: gp - mali450 version major 0 minor 0&lt;br /&gt;
[    2.456438] lima d00c0000.gpu: pp0 - mali450 version major 0 minor 0&lt;br /&gt;
[    2.456514] lima d00c0000.gpu: pp1 - mali450 version major 0 minor 0&lt;br /&gt;
[    2.456584] lima d00c0000.gpu: pp2 - mali450 version major 0 minor 0&lt;br /&gt;
[    2.456625] lima d00c0000.gpu: l2_cache0 8K, 4-way, 64byte cache line, 128bit external bus&lt;br /&gt;
[    2.456639] lima d00c0000.gpu: l2_cache1 64K, 4-way, 64byte cache line, 128bit external bus&lt;br /&gt;
[    2.457168] lima d00c0000.gpu: bus rate = 166666667&lt;br /&gt;
[    2.457179] lima d00c0000.gpu: mod rate = 24000000&lt;br /&gt;
[    2.457269] lima d00c0000.gpu: error -ENODEV: _opp_set_regulators: no regulator (mali) found&lt;br /&gt;
[    2.463630] lima d00c0000.gpu: devfreq_add_device: Unable to find governor for the device&lt;br /&gt;
[    2.463824] lima d00c0000.gpu: Couldn&#039;t initialize GPU devfreq&lt;br /&gt;
[    2.463832] lima d00c0000.gpu: Fatal error during devfreq init&lt;br /&gt;
[    2.517377] lima d00c0000.gpu: probe with driver lima failed with error -22&lt;br /&gt;
[    2.583042] mmc0: new high speed SDHC card at address 59b4&lt;br /&gt;
[    2.603130] meson-drm d0100000.vpu: Queued 1 outputs on vpu&lt;br /&gt;
[    2.650630] meson-drm d0100000.vpu: CVBS Output connector not available&lt;br /&gt;
[    2.671777] meson-drm d0100000.vpu: Couldn&#039;t bind all components&lt;br /&gt;
[    2.975512] meson-drm d0100000.vpu: CVBS Output connector not available&lt;br /&gt;
[    2.996876] meson-drm d0100000.vpu: Couldn&#039;t bind all components&lt;br /&gt;
[    3.001616] meson-gx-mmc d0074000.mmc: allocated mmc-pwrseq&lt;br /&gt;
[    3.001665] meson-drm d0100000.vpu: CVBS Output connector not available&lt;br /&gt;
[    3.023778] meson-drm d0100000.vpu: Couldn&#039;t bind all components&lt;br /&gt;
[    3.030231] meson-drm d0100000.vpu: CVBS Output connector not available&lt;br /&gt;
[    3.045224] mmc1: Failed to initialize a non-removable card&lt;br /&gt;
[    3.051765] meson-drm d0100000.vpu: Couldn&#039;t bind all components&lt;br /&gt;
[    3.061777] meson-drm d0100000.vpu: CVBS Output connector not available&lt;br /&gt;
[    3.072815] mmcblk0: mmc0:59b4 USDU1 14.9 GiB&lt;br /&gt;
[    3.075908]  mmcblk0: p1&lt;br /&gt;
[    3.083517] meson-dw-hdmi c883a000.hdmi-tx: Detected HDMI TX controller v2.01a with HDCP (meson_dw_hdmi_phy)&lt;br /&gt;
[    3.084214] meson-dw-hdmi c883a000.hdmi-tx: registered DesignWare HDMI I2C bus driver&lt;br /&gt;
[    3.084830] meson-drm d0100000.vpu: bound c883a000.hdmi-tx (ops meson_dw_hdmi_ops [meson_dw_hdmi])&lt;br /&gt;
[    3.087221] [drm] Initialized meson 1.0.0 for d0100000.vpu on minor 0&lt;br /&gt;
[    3.087571] meson-drm d0100000.vpu: [drm] Cannot find any crtc or sizes&lt;br /&gt;
[    3.087876] meson-drm d0100000.vpu: [drm] Cannot find any crtc or sizes&lt;br /&gt;
[    3.262226] FAT-fs (mmcblk0p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!&lt;br /&gt;
[    3.335730] Mounting boot media: ok.&lt;br /&gt;
[    3.341301] Loading user settings from /media/mmcblk0p1/c2.apkovl.tar.gz...&lt;br /&gt;
[    3.377619] Loading user settings from /media/mmcblk0p1/c2.apkovl.tar.gz: ok.&lt;br /&gt;
[    4.232143] Installing packages to root filesystem...&lt;br /&gt;
[    5.557258] Installing packages to root filesystem: ok.&lt;br /&gt;
[   13.281481] meson_ee_pwrc c883c000.system-controller:power-controller: sync_state() pending due to c9410000.ethernet&lt;br /&gt;
[   18.229705] loop0: detected capacity change from 0 to 509712&lt;br /&gt;
[   19.928765] stmmaceth c9410000.ethernet: IRQ eth_wake_irq not found&lt;br /&gt;
[   19.928792] stmmaceth c9410000.ethernet: IRQ eth_lpi not found&lt;br /&gt;
[   19.928800] stmmaceth c9410000.ethernet: IRQ sfty not found&lt;br /&gt;
[   19.928909] stmmaceth c9410000.ethernet: PTP uses main clock&lt;br /&gt;
[   19.929231] stmmaceth c9410000.ethernet: User ID: 0x11, Synopsys ID: 0x37&lt;br /&gt;
[   19.929252] stmmaceth c9410000.ethernet: 	DWMAC1000&lt;br /&gt;
[   19.929261] stmmaceth c9410000.ethernet: DMA HW capability register supported&lt;br /&gt;
[   19.929268] stmmaceth c9410000.ethernet: RX Checksum Offload Engine supported&lt;br /&gt;
[   19.929274] stmmaceth c9410000.ethernet: COE Type 2&lt;br /&gt;
[   19.929281] stmmaceth c9410000.ethernet: TX Checksum insertion supported&lt;br /&gt;
[   19.929288] stmmaceth c9410000.ethernet: Wake-Up On Lan supported&lt;br /&gt;
[   19.929564] stmmaceth c9410000.ethernet: Normal descriptors&lt;br /&gt;
[   19.929582] stmmaceth c9410000.ethernet: Ring mode enabled&lt;br /&gt;
[   19.929589] stmmaceth c9410000.ethernet: Enable RX Mitigation via HW Watchdog Timer&lt;br /&gt;
[   20.249379] Registered IR keymap rc-odroid&lt;br /&gt;
[   20.263322] IR NEC protocol handler initialized&lt;br /&gt;
[   20.284506] rc rc0: meson-ir as /devices/platform/soc/c8100000.bus/c8100580.ir/rc/rc0&lt;br /&gt;
[   20.284665] input: meson-ir as /devices/platform/soc/c8100000.bus/c8100580.ir/rc/rc0/input0&lt;br /&gt;
[   20.284847] rc rc0: sw decoder init&lt;br /&gt;
[   20.284920] meson-ir c8100580.ir: receiver initialized&lt;br /&gt;
[   20.308460] platform-mhu c883c404.mailbox: Platform MHU Mailbox registered&lt;br /&gt;
[   20.452494] dwc2 c9100000.usb: supply vusb_d not found, using dummy regulator&lt;br /&gt;
[   20.452658] dwc2 c9100000.usb: supply vusb_a not found, using dummy regulator&lt;br /&gt;
[   20.504703] dwc2 c9100000.usb: DWC OTG Controller&lt;br /&gt;
[   20.504745] dwc2 c9100000.usb: new USB bus registered, assigned bus number 1&lt;br /&gt;
[   20.504787] dwc2 c9100000.usb: irq 43, io mem 0xc9100000&lt;br /&gt;
[   20.504991] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.18&lt;br /&gt;
[   20.505002] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1&lt;br /&gt;
[   20.505010] usb usb1: Product: DWC OTG Controller&lt;br /&gt;
[   20.505017] usb usb1: Manufacturer: Linux 6.18.1-0-lts dwc2_hsotg&lt;br /&gt;
[   20.505024] usb usb1: SerialNumber: c9100000.usb&lt;br /&gt;
[   20.505695] hub 1-0:1.0: USB hub found&lt;br /&gt;
[   20.505742] hub 1-0:1.0: 1 port detected&lt;br /&gt;
[   20.781387] usb 1-1: new high-speed USB device number 2 using dwc2&lt;br /&gt;
[   20.956690] usb 1-1: New USB device found, idVendor=05e3, idProduct=0610, bcdDevice=32.98&lt;br /&gt;
[   20.956713] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0&lt;br /&gt;
[   20.956721] usb 1-1: Product: USB2.0 Hub&lt;br /&gt;
[   20.960535] hub 1-1:1.0: USB hub found&lt;br /&gt;
[   20.960938] hub 1-1:1.0: 4 ports detected&lt;br /&gt;
[   21.400017] NET: Registered PF_PACKET protocol family&lt;br /&gt;
[   22.049733] stmmaceth c9410000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0&lt;br /&gt;
[   22.126395] stmmaceth c9410000.ethernet eth0: PHY [stmmac-0:00] driver [RTL8211F Gigabit Ethernet] (irq=38)&lt;br /&gt;
[   22.141555] stmmaceth c9410000.ethernet eth0: No Safety Features support found&lt;br /&gt;
[   22.159969] stmmaceth c9410000.ethernet eth0: PTP not supported by HW&lt;br /&gt;
[   22.160000] stmmaceth c9410000.ethernet eth0: configuring for phy/rgmii link mode&lt;br /&gt;
[   25.021598] stmmaceth c9410000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx&lt;br /&gt;
[   27.551668] fbcon: Taking over console&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/os-release &lt;br /&gt;
NAME=&amp;quot;Alpine Linux&amp;quot;&lt;br /&gt;
ID=alpine&lt;br /&gt;
VERSION_ID=3.23.2&lt;br /&gt;
PRETTY_NAME=&amp;quot;Alpine Linux v3.23&amp;quot;&lt;br /&gt;
HOME_URL=&amp;quot;https://alpinelinux.org/&amp;quot;&lt;br /&gt;
BUG_REPORT_URL=&amp;quot;https://gitlab.alpinelinux.org/alpine/aports/-/issues&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31850</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31850"/>
		<updated>2025-12-21T14:07:54Z</updated>

		<summary type="html">&lt;p&gt;Yuu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is now well supported by Alpine/Linux and the &amp;quot;Generic U-Boot (aarch64)&amp;quot; build contains everything we need !&lt;br /&gt;
&lt;br /&gt;
What about the hardware side ?&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* Debug only : USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
==Prepare the micro-SD card==&lt;br /&gt;
With a blank SD card, we can now format-it using the vfat file system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WARNING&#039;&#039;&#039; : DOUBLE-CHECK &amp;lt;code&amp;gt;/dev/sda1&amp;lt;/code&amp;gt; is indeed your SD card ! Or you&#039;ll loose all your data ! You have been warned !&lt;br /&gt;
For this, it&#039;s preferable to run &amp;lt;code&amp;gt;dmesg -We&amp;lt;/code&amp;gt; to check for the name, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,004725] ums-realtek 1-1:1.0: USB Mass Storage device detected&lt;br /&gt;
[  +0,002985] scsi host0: usb-storage 1-1:1.0&lt;br /&gt;
[  +1,020024] scsi 0:0:0:0: Direct-Access     Generic- SD/MMC/MS PRO    1.00 PQ: 0 ANSI: 4&lt;br /&gt;
[  +0,000591] sd 0:0:0:0: Attached scsi generic sg0 type 0&lt;br /&gt;
[  +1,314707] sd 0:0:0:0: [sda] 15269888 512-byte logical blocks: (7.82 GB/7.28 GiB)&lt;br /&gt;
[  +0,000352] sd 0:0:0:0: [sda] Write Protect is off&lt;br /&gt;
[  +0,000008] sd 0:0:0:0: [sda] Mode Sense: 2f 00 00 00&lt;br /&gt;
[  +0,000408] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn&#039;t support DPO or FUA&lt;br /&gt;
[  +0,062938]  sda: sda1&lt;br /&gt;
[  +0,000238] sd 0:0:0:0: [sda] Attached SCSI removable disk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And also verify with &amp;lt;code&amp;gt;fdisk -l&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Disk /dev/sda: 7.28 GiB, 7818182656 bytes, 15269888 sectors&lt;br /&gt;
Disk model: SD/MMC/MS PRO   &lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Device     Boot Start      End  Sectors  Size Id Type&lt;br /&gt;
/dev/sda1        2048 15269887 15267840  7.3G  b W95 FAT32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we are sure that &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt; is really our SD card device and we can format our SD card using &amp;lt;code&amp;gt;mkfs.vfat /dev/sda1&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Extract Alpine Linux==&lt;br /&gt;
Then mount and extract the Alpine Linux archive, for example if you do everything as root:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount /dev/sda1 /mnt/sd&lt;br /&gt;
tar xvzfp /home/user/Downloads/alpine-uboot-3.23.2-aarch64.tar.gz -C /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, don&#039;t forget to flush changes before unmounting the device. Note that it can be a little slow depending of the speed of your device.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sync &amp;amp;&amp;amp; umount /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sign u-boot==&lt;br /&gt;
We don&#039;t need to build u-boot from source as the version provided does autoboot properly:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone --depth 1 https://github.com/LibreELEC/amlogic-boot-fip.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the u-boot.bin from your sd card to the git repository, and sign Amlogic u-boot binaries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd amlogic-boot-fip/&lt;br /&gt;
/mnt/sd/u-boot/odroid-c2/u-boot.bin alpine.u-boot.bin&lt;br /&gt;
./build-fip.sh odroid-c2 alpine.u-boot.bin my-output-dir &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==u-boot flashing==&lt;br /&gt;
&#039;&#039;&#039;WARNING&#039;&#039;&#039; : Make sure your device is &amp;lt;code&amp;gt;/dev/sda&amp;lt;/code&amp;gt; !&lt;br /&gt;
Also, check that the device is un-mouted using &amp;lt;code&amp;gt;umount /dev/sda1&amp;lt;/code&amp;gt;, then use dd to write u-boot&lt;br /&gt;
For example, using /dev/sda from previous commands and the signed u-boot (u-boot.bin.sd.bin) from amlogic-boot-fip tool.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=512 skip=1 seek=1&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=1 count=444&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Connect at least your USB keyboard and your HDMI monitor to check the boot and all should work nicely :)&lt;br /&gt;
If not, check the Debugging part of this wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
Connect your USB to TTL converter on your board : I noticed that you don&#039;t need to connect all wires, pin 1 don&#039;t seems to be is not mandatory at all.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
_____UART____&lt;br /&gt;
|Pin 4 - GND|&lt;br /&gt;
|Pin 3 - RXD|&lt;br /&gt;
|Pin 2 - TXD|&lt;br /&gt;
|Pin 1 - VCC|&lt;br /&gt;
\___________|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details are available on the odroid wiki : https://wiki.odroid.com/accessory/development/usb_uart_kit&lt;br /&gt;
&lt;br /&gt;
I use minicom for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TERM=linux minicom -b 115200 -D /dev/ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31849</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31849"/>
		<updated>2025-12-21T13:56:26Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Changed platform : generic arm to generic uboot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is now well supported by Alpine/Linux and the &amp;quot;Generic U-Boot (aarch64)&amp;quot; build contains everything we need !&lt;br /&gt;
&lt;br /&gt;
What about the hardware side ?&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* Debug only : USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
==Prepare the micro-SD card==&lt;br /&gt;
With a blank SD card, we can now format-it using the vfat file system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039; : DOUBLE-CHECK /dev/sda1 is indeed your SD card ! Or you&#039;ll loose all your data ! You have been warned !&lt;br /&gt;
For this, it&#039;s preferable to run &amp;lt;pre&amp;gt;dmesg -We&amp;lt;/pre&amp;gt; to check for the name, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,004725] ums-realtek 1-1:1.0: USB Mass Storage device detected&lt;br /&gt;
[  +0,002985] scsi host0: usb-storage 1-1:1.0&lt;br /&gt;
[  +1,020024] scsi 0:0:0:0: Direct-Access     Generic- SD/MMC/MS PRO    1.00 PQ: 0 ANSI: 4&lt;br /&gt;
[  +0,000591] sd 0:0:0:0: Attached scsi generic sg0 type 0&lt;br /&gt;
[  +1,314707] sd 0:0:0:0: [sda] 15269888 512-byte logical blocks: (7.82 GB/7.28 GiB)&lt;br /&gt;
[  +0,000352] sd 0:0:0:0: [sda] Write Protect is off&lt;br /&gt;
[  +0,000008] sd 0:0:0:0: [sda] Mode Sense: 2f 00 00 00&lt;br /&gt;
[  +0,000408] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn&#039;t support DPO or FUA&lt;br /&gt;
[  +0,062938]  sda: sda1&lt;br /&gt;
[  +0,000238] sd 0:0:0:0: [sda] Attached SCSI removable disk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And also verify with &amp;lt;pre&amp;gt;fdisk -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Disk /dev/sda: 7.28 GiB, 7818182656 bytes, 15269888 sectors&lt;br /&gt;
Disk model: SD/MMC/MS PRO   &lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Device     Boot Start      End  Sectors  Size Id Type&lt;br /&gt;
/dev/sda1        2048 15269887 15267840  7.3G  b W95 FAT32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we are sure that `/dev/sda` is really our SD card device and we can format our SD card:&lt;br /&gt;
&amp;lt;pre&amp;gt;mkfs.vfat /dev/sda1&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Extract Alpine Linux==&lt;br /&gt;
Then mount and extract the Alpine Linux archive, for example if you do everything as root:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount /dev/sda1 /mnt/sd&lt;br /&gt;
# tar xvzfp /home/user/Downloads/alpine-uboot-3.23.2-aarch64.tar.gz -C /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, don&#039;t forget to flush changes before unmounting the device. Note that it can be a little slow depending of the speed of your device.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sync &amp;amp;&amp;amp; umount /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sign u-boot==&lt;br /&gt;
We don&#039;t need to build u-boot from source as the version provided does autoboot properly:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone --depth 1 https://github.com/LibreELEC/amlogic-boot-fip.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the u-boot.bin from your sd card to the git repository, and sign Amlogic u-boot binaries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd amlogic-boot-fip/;&lt;br /&gt;
/mnt/sd/u-boot/odroid-c2/u-boot.bin alpine.u-boot.bin;&lt;br /&gt;
./build-fip.sh odroid-c2 alpine.u-boot.bin my-output-dir &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==u-boot flashing==&lt;br /&gt;
Now, make sure your device is un-mouted &amp;lt;pre&amp;gt;umount /dev/sda1&amp;lt;/pre&amp;gt;, then use dd to write u-boot.&lt;br /&gt;
For example, using /dev/sda from previous commands and the signed u-boot (u-boot.bin.sd.bin) from amlogic-boot-fip tool.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=512 skip=1 seek=1&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=1 count=444&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Connect at least your USB keyboard and your HDMI monitor to check the boot and all should work nicely :)&lt;br /&gt;
If not, check the Debugging part of this wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
Connect your USB to TTL converter on your board : I noticed that you don&#039;t need to connect all wires, pin 1 don&#039;t seems to be is not mandatory at all.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
_____UART____&lt;br /&gt;
|Pin 4 - GND|&lt;br /&gt;
|Pin 3 - RXD|&lt;br /&gt;
|Pin 2 - TXD|&lt;br /&gt;
|Pin 1 - VCC|&lt;br /&gt;
\___________|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details are available on the odroid wiki : https://wiki.odroid.com/accessory/development/usb_uart_kit&lt;br /&gt;
&lt;br /&gt;
I use minicom for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TERM=linux minicom -b 115200 -D /dev/ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31848</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=31848"/>
		<updated>2025-12-21T10:21:50Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Alpine Linux now boot just fine for me :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is now well supported by Alpine/Linux and the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains everything we need !&lt;br /&gt;
&lt;br /&gt;
What about the hardware side ?&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* Debug only : USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
==Prepare the micro-SD card==&lt;br /&gt;
With a blank SD card, we can now format-it using the vfat file system.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039; : DOUBLE-CHECK /dev/sda1 is indeed your SD card ! Or you&#039;ll loose all your data ! You have been warned !&lt;br /&gt;
For this, it&#039;s preferable to run &amp;lt;pre&amp;gt;dmesg -We&amp;lt;/pre&amp;gt; to check for the name, for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[  +0,004725] ums-realtek 1-1:1.0: USB Mass Storage device detected&lt;br /&gt;
[  +0,002985] scsi host0: usb-storage 1-1:1.0&lt;br /&gt;
[  +1,020024] scsi 0:0:0:0: Direct-Access     Generic- SD/MMC/MS PRO    1.00 PQ: 0 ANSI: 4&lt;br /&gt;
[  +0,000591] sd 0:0:0:0: Attached scsi generic sg0 type 0&lt;br /&gt;
[  +1,314707] sd 0:0:0:0: [sda] 15269888 512-byte logical blocks: (7.82 GB/7.28 GiB)&lt;br /&gt;
[  +0,000352] sd 0:0:0:0: [sda] Write Protect is off&lt;br /&gt;
[  +0,000008] sd 0:0:0:0: [sda] Mode Sense: 2f 00 00 00&lt;br /&gt;
[  +0,000408] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn&#039;t support DPO or FUA&lt;br /&gt;
[  +0,062938]  sda: sda1&lt;br /&gt;
[  +0,000238] sd 0:0:0:0: [sda] Attached SCSI removable disk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And also verify with &amp;lt;pre&amp;gt;fdisk -l&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Disk /dev/sda: 7.28 GiB, 7818182656 bytes, 15269888 sectors&lt;br /&gt;
Disk model: SD/MMC/MS PRO   &lt;br /&gt;
Units: sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disklabel type: dos&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Device     Boot Start      End  Sectors  Size Id Type&lt;br /&gt;
/dev/sda1        2048 15269887 15267840  7.3G  b W95 FAT32&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we are sure that `/dev/sda` is really our SD card device and we can format our SD card:&lt;br /&gt;
&amp;lt;pre&amp;gt;mkfs.vfat /dev/sda1&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Extract Alpine Linux==&lt;br /&gt;
Then mount and extract the Alpine Linux archive, for example if you do everything as root:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount /dev/sda1 /mnt/sd&lt;br /&gt;
# tar xvzfp /home/user/Downloads/alpine-uboot-3.23.2-aarch64.tar.gz -C /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, don&#039;t forget to flush changes before unmounting the device. Note that it can be a little slow depending of the speed of your device.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sync &amp;amp;&amp;amp; umount /mnt/sd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Sign u-boot==&lt;br /&gt;
We don&#039;t need to build u-boot from source as the version provided does autoboot properly:&lt;br /&gt;
&amp;lt;pre&amp;gt;git clone --depth 1 https://github.com/LibreELEC/amlogic-boot-fip.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the u-boot.bin from your sd card to the git repository, and sign Amlogic u-boot binaries:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd amlogic-boot-fip/;&lt;br /&gt;
/mnt/sd/u-boot/odroid-c2/u-boot.bin alpine.u-boot.bin;&lt;br /&gt;
./build-fip.sh odroid-c2 alpine.u-boot.bin my-output-dir &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==u-boot flashing==&lt;br /&gt;
Now, make sure your device is un-mouted &amp;lt;pre&amp;gt;umount /dev/sda1&amp;lt;/pre&amp;gt;, then use dd to write u-boot.&lt;br /&gt;
For example, using /dev/sda from previous commands and the signed u-boot (u-boot.bin.sd.bin) from amlogic-boot-fip tool.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=512 skip=1 seek=1&lt;br /&gt;
dd if=./amlogic-boot-fip/my-output-dir/u-boot.bin.sd.bin of=/dev/sda conv=fsync,notrunc bs=1 count=444&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Connect at least your USB keyboard and your HDMI monitor to check the boot and all should work nicely :)&lt;br /&gt;
If not, check the Debugging part of this wiki.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
Connect your USB to TTL converter on your board : I noticed that you don&#039;t need to connect all wires, pin 1 don&#039;t seems to be is not mandatory at all.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
_____UART____&lt;br /&gt;
|Pin 4 - GND|&lt;br /&gt;
|Pin 3 - RXD|&lt;br /&gt;
|Pin 2 - TXD|&lt;br /&gt;
|Pin 1 - VCC|&lt;br /&gt;
\___________|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details are available on the odroid wiki : https://wiki.odroid.com/accessory/development/usb_uart_kit&lt;br /&gt;
&lt;br /&gt;
I use minicom for this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TERM=linux minicom -b 115200 -D /dev/ttyUSB0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ARM]]&lt;br /&gt;
[[Category:Hardware]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=22247</id>
		<title>Upgrading Alpine Linux to a new release branch</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=22247"/>
		<updated>2022-08-16T20:20:05Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Update alpine version example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to newer releases.&lt;br /&gt;
&lt;br /&gt;
Doing regular security updates with the package manager is shown at [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading a running system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before actually upgrading your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from older versions ===&lt;br /&gt;
&lt;br /&gt;
In case an older version needs to be upgraded, i.e. not just upgrading from the last release to the subsequent version as covered by the individual release notes, also check [[Upgrading from older versions]] for potential specifically required upgrade steps.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&lt;br /&gt;
&lt;br /&gt;
When Alpine Linux is installed in &#039;&#039;&#039;sys&#039;&#039;&#039; mode, e.g. on a hard drive, upgrading to the next stable version should be a straightforward package manager operation. However, for specific info always refer to the appropriate release notes.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to Edge ===&lt;br /&gt;
{{:Include:Upgrading to Edge}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
=== Boot media === &lt;br /&gt;
&lt;br /&gt;
If the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO.&lt;br /&gt;
&lt;br /&gt;
If booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine Linux box. &lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
If you have locally installed and configured additional packages using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Backup the local configuration prior to upgrading.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
After upgrading the packages, save the upgraded configuration changes.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on other removable media (such as CF/USB) ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are for run-from-RAM Alpine installations running on Compact Flash or USB media. Updating your repositories using [[#Upgrading_an_Alpine_Linux_Hard-disk_installation|the procedures detailed above]], then running:&lt;br /&gt;
{{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
will suffice for some purposes. (If you want the new packages to be used after a reboot, you should [[How_to_enable_APK_caching|enable APK caching]].)&lt;br /&gt;
&lt;br /&gt;
However, this is not an adequate general solution because it won&#039;t honor any kernel upgrades and the like. For the general solution, you&#039;ll need to upgrade your boot medium (Compact Flash or USB). That is what the following steps describe how to do.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading_Alpine_environmentvars}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Operating System ===&lt;br /&gt;
&lt;br /&gt;
Start by checking that you have enough space on your media. For a &#039;&#039;&#039;standard&#039;&#039;&#039; Alpine image, you need at least 400MB available space.&lt;br /&gt;
{{Cmd|df -h {{!}} grep &amp;quot;Filesystem\{{!}}$LBU_MEDIA&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
==== Download and verify new release ====&lt;br /&gt;
&lt;br /&gt;
Make sure the media that holds your Alpine system is mounted readwrite.&lt;br /&gt;
{{Cmd|mount -oremount,rw /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 2.2.3 or newer&#039;&#039;&#039;: Download the latest release, {{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/&amp;lt;arch&amp;gt;/&amp;lt;image&amp;gt;.iso}} and then use the following command to mount and copy files as needed for you: {{Cmd|setup-bootable -u alpine-extended-&amp;lt;version&amp;gt;-&amp;lt;arch&amp;gt;.iso /media/$LBU_MEDIA}} Once the command completes, proceed to the [[#Save changes|Save changes]] section.&lt;br /&gt;
&lt;br /&gt;
==== For older versions of Alpine ====&lt;br /&gt;
Start downloading a new &#039;.iso&#039; and a &#039;.sha1&#039; file &lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA&lt;br /&gt;
wget -c {{#latestalp:alpine|url}}&lt;br /&gt;
wget {{#latestalp:alpine|url}}.sha1}}&lt;br /&gt;
&lt;br /&gt;
Check integrity of the downloaded files &#039;&#039;(it might take some time)&#039;&#039;:&lt;br /&gt;
{{Cmd|sha1sum -c {{#latestalp:alpine|file}}.sha1}}&lt;br /&gt;
&#039;&#039;The output of the above command should say &#039;OK&#039;.&amp;lt;BR&amp;gt;&#039;&#039;&lt;br /&gt;
&#039;&#039;If says &#039;FAILED&#039;, delete the iso file and download it again.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 1.10.4 or newer&#039;&#039;&#039;: there is a tool &#039;&#039;setup-bootable&#039;&#039; that will mount and copy the image you just downloaded to your boot medium. With this tool simply do: {{Cmd|setup-bootable -u {{#latestalp:alpine|file}} /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
[[Upgrading from older versions#Upgrading_a_removable_medium_from_Alpine_before_1.10.4|Instructions for older versions of Alpine]] are located elsewhere.&lt;br /&gt;
&lt;br /&gt;
=== Save changes ===&lt;br /&gt;
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
=== Load new kernel ===&lt;br /&gt;
In most cases you will need to reboot Alpine Linux (especially if there are changes in the kernel):&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}&lt;br /&gt;
&lt;br /&gt;
=== Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) ===&lt;br /&gt;
On Alpine 3.X and newer, kernel is not upgraded when using &amp;lt;code&amp;gt;apk upgrade&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; does not work properly.&lt;br /&gt;
&lt;br /&gt;
If you want to upgrade your kernel, you will need to get it from the latest release, but first you must have and run :&lt;br /&gt;
{{Cmd|apk update; apk version -l &#039;&amp;lt;&#039;;&lt;br /&gt;
apk upgrade;&lt;br /&gt;
lbu ci;}}&lt;br /&gt;
&lt;br /&gt;
So now all your packages are upgraded, you can upgrade your kernel.&lt;br /&gt;
&lt;br /&gt;
1. We need to get some variables :&lt;br /&gt;
{{Cmd|. /etc/os-release;&lt;br /&gt;
. /etc/lbu/lbu.conf;&lt;br /&gt;
ARCH&amp;amp;#61;$(cat /etc/apk/arch);}}&lt;br /&gt;
&lt;br /&gt;
2. You &#039;&#039;&#039;must&#039;&#039;&#039; verify if they are correctly set, using this :&lt;br /&gt;
{{Cmd|echo &amp;quot;alpine version : $VERSION_ID&amp;quot;;&lt;br /&gt;
echo &amp;quot;lbu media : $LBU_MEDIA&amp;quot;;&lt;br /&gt;
echo &amp;quot;arch : $ARCH&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
3. And it will output something like this (if not, do not continue this process) :&lt;br /&gt;
{{Cmd|alpine version : 3.16.2&lt;br /&gt;
lbu media : mmcblk0p1&lt;br /&gt;
arch : armhf}}&lt;br /&gt;
&lt;br /&gt;
4. Then you can run this script (WARNING : config.txt will be overwritten!) :&lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA;&lt;br /&gt;
mount -oremount,rw /media/$LBU_MEDIA;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
sha256sum -c *.sha256;&lt;br /&gt;
rm /media/$LBU_MEDIA/apks/$ARCH/*;&lt;br /&gt;
rm /media/$LBU_MEDIA/cache/*;&lt;br /&gt;
apk update &amp;amp;&amp;amp; apk cache -v download;&lt;br /&gt;
tar xzf alpine-rpi-$VERSION_ID-$ARCH.tar.gz;&lt;br /&gt;
rm alpine-rpi-$VERSION_ID-$ARCH.tar.gz alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256;&lt;br /&gt;
sync;&lt;br /&gt;
reboot;}}&lt;br /&gt;
&lt;br /&gt;
5. Test-it !&lt;br /&gt;
{{Cmd|uname -a}}&lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
This is done just as at [[#Update local package installations]], above.&lt;br /&gt;
&lt;br /&gt;
== Updating a USB/CF diskless install without setup-bootable ==&lt;br /&gt;
It is possible to update a diskless install of Alpine from another system, or without using the setup-bootable script. This was tested for the 3.13 to the 3.14 upgrade on a Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
Before starting, update /etc/apk/repositories file to retrieve packages for the new release. Then update all packages with:&lt;br /&gt;
{{Cmd|apk update &amp;amp;&amp;amp; apk upgrade -i -a --update-cache}}&lt;br /&gt;
&lt;br /&gt;
We can then use update-conf to check for changes to configurations from the new packages.&lt;br /&gt;
{{Cmd|# check apk-new config changes&lt;br /&gt;
update-conf -a -l&lt;br /&gt;
update-conf -a&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We now need to prepare to update the kernel and boot materials. To do this, we stop the modloop (which is the loopback mount providing kernel modules) and remount the SD media as read/write.&lt;br /&gt;
&lt;br /&gt;
We can also shutdown the system, eject the media, and perform the next steps on another machine (if so, skip this command block)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
cd /media/mmcblk0p1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
At this point, remove all files from the SD media &#039;&#039;&#039;except for /cache, *.apkvol.tar.gz, usercfg.txt, and config.txt&#039;&#039;&#039; Rename config.txt to config.txt.bak temporarily, as extracting the new tar file will overwrite the file.&lt;br /&gt;
&lt;br /&gt;
We can now download the new release and extract it. This example is for an Alpine Raspberry Pi release, so feel free to adjust the URLs for your system. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz.sha256&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz&lt;br /&gt;
sha256sum -c *.sha256&lt;br /&gt;
tar zxf *-aarch64.tar.gz &amp;amp;&amp;amp; sync&lt;br /&gt;
rm alpine-rpi-*&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Restore the original config.txt:&lt;br /&gt;
{{Cmd|mv config.txt.bak config.txt}}&lt;br /&gt;
&lt;br /&gt;
Update the persistent storage using lbu:&lt;br /&gt;
{{Cmd|lbu ci -d}}&lt;br /&gt;
&lt;br /&gt;
We can now reboot, and this should boot into the new kernel. Once this is done, we can clean up and re-download apk caches:&lt;br /&gt;
{{Cmd|mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
rm /media/mmcblk0p1/cache/*&lt;br /&gt;
sync &amp;amp;&amp;amp; apk update &amp;amp;&amp;amp; apk cache -v download&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,ro&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=22246</id>
		<title>Upgrading Alpine Linux to a new release branch</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=22246"/>
		<updated>2022-08-16T20:19:38Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Re-populate cache after deleting it&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to newer releases.&lt;br /&gt;
&lt;br /&gt;
Doing regular security updates with the package manager is shown at [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading a running system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before actually upgrading your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from older versions ===&lt;br /&gt;
&lt;br /&gt;
In case an older version needs to be upgraded, i.e. not just upgrading from the last release to the subsequent version as covered by the individual release notes, also check [[Upgrading from older versions]] for potential specifically required upgrade steps.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&lt;br /&gt;
&lt;br /&gt;
When Alpine Linux is installed in &#039;&#039;&#039;sys&#039;&#039;&#039; mode, e.g. on a hard drive, upgrading to the next stable version should be a straightforward package manager operation. However, for specific info always refer to the appropriate release notes.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to Edge ===&lt;br /&gt;
{{:Include:Upgrading to Edge}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
=== Boot media === &lt;br /&gt;
&lt;br /&gt;
If the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO.&lt;br /&gt;
&lt;br /&gt;
If booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine Linux box. &lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
If you have locally installed and configured additional packages using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Backup the local configuration prior to upgrading.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
After upgrading the packages, save the upgraded configuration changes.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on other removable media (such as CF/USB) ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are for run-from-RAM Alpine installations running on Compact Flash or USB media. Updating your repositories using [[#Upgrading_an_Alpine_Linux_Hard-disk_installation|the procedures detailed above]], then running:&lt;br /&gt;
{{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
will suffice for some purposes. (If you want the new packages to be used after a reboot, you should [[How_to_enable_APK_caching|enable APK caching]].)&lt;br /&gt;
&lt;br /&gt;
However, this is not an adequate general solution because it won&#039;t honor any kernel upgrades and the like. For the general solution, you&#039;ll need to upgrade your boot medium (Compact Flash or USB). That is what the following steps describe how to do.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading_Alpine_environmentvars}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Operating System ===&lt;br /&gt;
&lt;br /&gt;
Start by checking that you have enough space on your media. For a &#039;&#039;&#039;standard&#039;&#039;&#039; Alpine image, you need at least 400MB available space.&lt;br /&gt;
{{Cmd|df -h {{!}} grep &amp;quot;Filesystem\{{!}}$LBU_MEDIA&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
==== Download and verify new release ====&lt;br /&gt;
&lt;br /&gt;
Make sure the media that holds your Alpine system is mounted readwrite.&lt;br /&gt;
{{Cmd|mount -oremount,rw /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 2.2.3 or newer&#039;&#039;&#039;: Download the latest release, {{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/&amp;lt;arch&amp;gt;/&amp;lt;image&amp;gt;.iso}} and then use the following command to mount and copy files as needed for you: {{Cmd|setup-bootable -u alpine-extended-&amp;lt;version&amp;gt;-&amp;lt;arch&amp;gt;.iso /media/$LBU_MEDIA}} Once the command completes, proceed to the [[#Save changes|Save changes]] section.&lt;br /&gt;
&lt;br /&gt;
==== For older versions of Alpine ====&lt;br /&gt;
Start downloading a new &#039;.iso&#039; and a &#039;.sha1&#039; file &lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA&lt;br /&gt;
wget -c {{#latestalp:alpine|url}}&lt;br /&gt;
wget {{#latestalp:alpine|url}}.sha1}}&lt;br /&gt;
&lt;br /&gt;
Check integrity of the downloaded files &#039;&#039;(it might take some time)&#039;&#039;:&lt;br /&gt;
{{Cmd|sha1sum -c {{#latestalp:alpine|file}}.sha1}}&lt;br /&gt;
&#039;&#039;The output of the above command should say &#039;OK&#039;.&amp;lt;BR&amp;gt;&#039;&#039;&lt;br /&gt;
&#039;&#039;If says &#039;FAILED&#039;, delete the iso file and download it again.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 1.10.4 or newer&#039;&#039;&#039;: there is a tool &#039;&#039;setup-bootable&#039;&#039; that will mount and copy the image you just downloaded to your boot medium. With this tool simply do: {{Cmd|setup-bootable -u {{#latestalp:alpine|file}} /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
[[Upgrading from older versions#Upgrading_a_removable_medium_from_Alpine_before_1.10.4|Instructions for older versions of Alpine]] are located elsewhere.&lt;br /&gt;
&lt;br /&gt;
=== Save changes ===&lt;br /&gt;
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
=== Load new kernel ===&lt;br /&gt;
In most cases you will need to reboot Alpine Linux (especially if there are changes in the kernel):&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}&lt;br /&gt;
&lt;br /&gt;
=== Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) ===&lt;br /&gt;
On Alpine 3.X and newer, kernel is not upgraded when using &amp;lt;code&amp;gt;apk upgrade&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; does not work properly.&lt;br /&gt;
&lt;br /&gt;
If you want to upgrade your kernel, you will need to get it from the latest release, but first you must have and run :&lt;br /&gt;
{{Cmd|apk update; apk version -l &#039;&amp;lt;&#039;;&lt;br /&gt;
apk upgrade;&lt;br /&gt;
lbu ci;}}&lt;br /&gt;
&lt;br /&gt;
So now all your packages are upgraded, you can upgrade your kernel.&lt;br /&gt;
&lt;br /&gt;
1. We need to get some variables :&lt;br /&gt;
{{Cmd|. /etc/os-release;&lt;br /&gt;
. /etc/lbu/lbu.conf;&lt;br /&gt;
ARCH&amp;amp;#61;$(cat /etc/apk/arch);}}&lt;br /&gt;
&lt;br /&gt;
2. You &#039;&#039;&#039;must&#039;&#039;&#039; verify if they are correctly set, using this :&lt;br /&gt;
{{Cmd|echo &amp;quot;alpine version : $VERSION_ID&amp;quot;;&lt;br /&gt;
echo &amp;quot;lbu media : $LBU_MEDIA&amp;quot;;&lt;br /&gt;
echo &amp;quot;arch : $ARCH&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
3. And it will output something like this (if not, do not continue this process) :&lt;br /&gt;
{{Cmd|alpine version : 3.13.5&lt;br /&gt;
lbu media : mmcblk0p1&lt;br /&gt;
arch : armhf}}&lt;br /&gt;
&lt;br /&gt;
4. Then you can run this script (WARNING : config.txt will be overwritten!) :&lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA;&lt;br /&gt;
mount -oremount,rw /media/$LBU_MEDIA;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
sha256sum -c *.sha256;&lt;br /&gt;
rm /media/$LBU_MEDIA/apks/$ARCH/*;&lt;br /&gt;
rm /media/$LBU_MEDIA/cache/*;&lt;br /&gt;
apk update &amp;amp;&amp;amp; apk cache -v download;&lt;br /&gt;
tar xzf alpine-rpi-$VERSION_ID-$ARCH.tar.gz;&lt;br /&gt;
rm alpine-rpi-$VERSION_ID-$ARCH.tar.gz alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256;&lt;br /&gt;
sync;&lt;br /&gt;
reboot;}}&lt;br /&gt;
&lt;br /&gt;
5. Test-it !&lt;br /&gt;
{{Cmd|uname -a}}&lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
This is done just as at [[#Update local package installations]], above.&lt;br /&gt;
&lt;br /&gt;
== Updating a USB/CF diskless install without setup-bootable ==&lt;br /&gt;
It is possible to update a diskless install of Alpine from another system, or without using the setup-bootable script. This was tested for the 3.13 to the 3.14 upgrade on a Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
Before starting, update /etc/apk/repositories file to retrieve packages for the new release. Then update all packages with:&lt;br /&gt;
{{Cmd|apk update &amp;amp;&amp;amp; apk upgrade -i -a --update-cache}}&lt;br /&gt;
&lt;br /&gt;
We can then use update-conf to check for changes to configurations from the new packages.&lt;br /&gt;
{{Cmd|# check apk-new config changes&lt;br /&gt;
update-conf -a -l&lt;br /&gt;
update-conf -a&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We now need to prepare to update the kernel and boot materials. To do this, we stop the modloop (which is the loopback mount providing kernel modules) and remount the SD media as read/write.&lt;br /&gt;
&lt;br /&gt;
We can also shutdown the system, eject the media, and perform the next steps on another machine (if so, skip this command block)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
cd /media/mmcblk0p1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
At this point, remove all files from the SD media &#039;&#039;&#039;except for /cache, *.apkvol.tar.gz, usercfg.txt, and config.txt&#039;&#039;&#039; Rename config.txt to config.txt.bak temporarily, as extracting the new tar file will overwrite the file.&lt;br /&gt;
&lt;br /&gt;
We can now download the new release and extract it. This example is for an Alpine Raspberry Pi release, so feel free to adjust the URLs for your system. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz.sha256&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz&lt;br /&gt;
sha256sum -c *.sha256&lt;br /&gt;
tar zxf *-aarch64.tar.gz &amp;amp;&amp;amp; sync&lt;br /&gt;
rm alpine-rpi-*&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Restore the original config.txt:&lt;br /&gt;
{{Cmd|mv config.txt.bak config.txt}}&lt;br /&gt;
&lt;br /&gt;
Update the persistent storage using lbu:&lt;br /&gt;
{{Cmd|lbu ci -d}}&lt;br /&gt;
&lt;br /&gt;
We can now reboot, and this should boot into the new kernel. Once this is done, we can clean up and re-download apk caches:&lt;br /&gt;
{{Cmd|mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
rm /media/mmcblk0p1/cache/*&lt;br /&gt;
sync &amp;amp;&amp;amp; apk update &amp;amp;&amp;amp; apk cache -v download&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,ro&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21723</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21723"/>
		<updated>2022-04-11T20:48:54Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Aligments&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==U-Boot scripting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. The mkimage binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&lt;br /&gt;
Connect your USB to TTL converter on your board : I noticed that you don&#039;t need to connect all wires, pin 1 don&#039;t seems to be is not mandatory at all.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
_____UART____&lt;br /&gt;
|Pin 4 - GND|&lt;br /&gt;
|Pin 3 - RXD|&lt;br /&gt;
|Pin 2 - TXD|&lt;br /&gt;
|Pin 1 - VCC|&lt;br /&gt;
\___________|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details are available on the odroid wiki : https://wiki.odroid.com/accessory/development/usb_uart_kit&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21722</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21722"/>
		<updated>2022-04-11T20:46:23Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Removed troubleshooting section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==U-Boot scripting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. The mkimage binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&lt;br /&gt;
Connect your USB to TTL converter on your board : I noticed that you don&#039;t need to connect all wires, pin 1 don&#039;t seems to be is not mandatory at all.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
_____UART____&lt;br /&gt;
|Pin 4 - GND|&lt;br /&gt;
|Pin 3 - RXD|&lt;br /&gt;
|Pin 2 - TXD|&lt;br /&gt;
|Pin 1 - VCC|&lt;br /&gt;
\___________|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details are available on the odroid wiki : https://wiki.odroid.com/accessory/development/usb_uart_kit&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21721</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21721"/>
		<updated>2022-04-11T20:45:55Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Booting part&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==U-Boot scripting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. The mkimage binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&lt;br /&gt;
Connect your USB to TTL converter on your board : I noticed that you don&#039;t need to connect all wires, pin 1 don&#039;t seems to be is not mandatory at all.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
_____UART____&lt;br /&gt;
|Pin 4 - GND|&lt;br /&gt;
|Pin 3 - RXD|&lt;br /&gt;
|Pin 2 - TXD|&lt;br /&gt;
|Pin 1 - VCC|&lt;br /&gt;
\___________|&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All details are available on the odroid wiki : https://wiki.odroid.com/accessory/development/usb_uart_kit&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21720</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21720"/>
		<updated>2022-04-11T20:27:26Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Added booting part&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==U-Boot scripting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. The mkimage binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21719</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21719"/>
		<updated>2022-04-11T20:26:26Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Change title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==U-Boot scripting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. The mkimage binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21718</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21718"/>
		<updated>2022-04-11T20:25:06Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Added spacing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. The mkimage binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21717</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21717"/>
		<updated>2022-04-11T20:22:53Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Mkimage precisions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. The mkimage binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21716</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21716"/>
		<updated>2022-04-11T20:18:35Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Added u-boot assembly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make odroidc2_defconfig&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&lt;br /&gt;
So, you need to get Amlogic u-boot&#039;s fork to assemble the u-boot binary :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ..&lt;br /&gt;
git clone --depth 1 https://github.com/hardkernel/u-boot.git -b odroidc2-v2015.01 u-boot&lt;br /&gt;
cd u-boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy &amp;quot;u-boot.bin&amp;quot; from the previous git repository (source.denx.de) to the amlogic u-boot repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;cp ../u-boot-denx.de/u-boot.bin .&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, generate u-boot using amlogic fip tools:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./fip/fip_create --bl30  ./fip/gxb/bl30.bin --bl301 ./fip/gxb/bl301.bin --bl31 ./fip/gxb/bl31.bin --bl33  u-boot.bin ./fip.bin&lt;br /&gt;
./fip/fip_create --dump ./fip.bin&lt;br /&gt;
cat ./fip/gxb/bl2.package ./fip.bin &amp;gt; ./boot_new.bin&lt;br /&gt;
./fip/gxb/aml_encrypt_gxb --bootsig --input ./boot_new.bin --output ./u-boot.img&lt;br /&gt;
dd if=./u-boot.img of=./u-boot.gxbb bs=512 skip=96&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. This binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21715</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21715"/>
		<updated>2022-04-11T20:11:46Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Added booting part&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
Create boot.cmd file to /dev/mmcblk0:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
cat &amp;lt;&amp;lt; EoF &amp;gt; boot.cmd&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
#&lt;br /&gt;
# HELP:&lt;br /&gt;
# boot.cmd = source file for humans&lt;br /&gt;
# boot.scr = destination file needed for the board&lt;br /&gt;
# recompile-me with:&lt;br /&gt;
# mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
#&lt;br /&gt;
#------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
# init.&lt;br /&gt;
setenv modloop &amp;quot;/boot/modloop&amp;quot;&lt;br /&gt;
setenv console &amp;quot;tty1&amp;quot;&lt;br /&gt;
setenv condev &amp;quot;console=ttyAML0,115200n8&amp;quot;&lt;br /&gt;
setenv verbosity &amp;quot;7&amp;quot;&lt;br /&gt;
setenv display_autodetect &amp;quot;true&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# console arguments configuration&lt;br /&gt;
setenv consoleargs &amp;quot;modules=loop,squashfs,sd-mod,usb-storage modloop=\${modloop} \${condev} console=\${console} panic=10&amp;quot;&lt;br /&gt;
setenv bootargs &amp;quot;\${consoleargs} loglevel=\${verbosity}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# load files&lt;br /&gt;
setenv devtype &amp;quot;mmc&amp;quot;&lt;br /&gt;
setenv devnum &amp;quot;0:1&amp;quot;&lt;br /&gt;
load \${devtype} \${devnum} \${kernel_addr_r} /boot/vmlinuz&lt;br /&gt;
load \${devtype} \${devnum} \${ramdisk_addr_r} /boot/initramfs-lts&lt;br /&gt;
load \${devtype} \${devnum} \${fdt_addr_r} /boot/dtbs/meson-gxbb-odroidc2.dtb&lt;br /&gt;
&lt;br /&gt;
# boot&lt;br /&gt;
booti \$kernel_addr_r \$ramdisk_addr_r:3200000 \$fdt_addr_r&lt;br /&gt;
EoF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, build this file for u-boot. This binary is available in the ./tools/ directory from the source.denx.de repository (see &amp;quot;Build u-boot from source&amp;quot; part).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkimage -C none -A arm -T script -d boot.cmd boot.scr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that those two files must be placed in the /boot/ directory.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21714</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21714"/>
		<updated>2022-04-11T20:04:04Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Carriage return&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21713</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21713"/>
		<updated>2022-04-11T20:00:07Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Added system part extraction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tar -C $DST -xzf alpine-uboot-3.15.4-aarch64.tar.gz ./.alpine-release ./alpine.apkovl.tar.gz ./apks ./boot/initramfs-lts 2&amp;gt;/dev/null&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21712</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21712"/>
		<updated>2022-04-11T19:06:28Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Linux kernel : disable unnecessary DRM modules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can also disable unrequired DRM modules. Hence you&#039;ll get les modules, vmlinux will be smaller and building kernel will be faster.&lt;br /&gt;
Note that you can also disable more modules or functionalities, by removing all DRM drivers or disable sound if you like it. It&#039;ll be perfect for a headless machine.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/CONFIG_DRM_\(.*\)=.*/# CONFIG_DRM_\1 is not set/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_LIMA.*/CONFIG_DRM_LIMA=m/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_DRM_PANFROST.*/CONFIG_DRM_PANFROST=m/&#039; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21691</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21691"/>
		<updated>2022-04-05T19:54:02Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Fix pre tag&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21690</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21690"/>
		<updated>2022-04-05T19:52:59Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Device tree is required to boot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy dtb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts ${DST}/boot/dtbs&lt;br /&gt;
cp arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dtb ${DST}/boot/dtbs&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System part:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21689</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21689"/>
		<updated>2022-04-05T19:49:24Z</updated>

		<summary type="html">&lt;p&gt;Yuu: DVFS for s905&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to enable DVFS for the s905 amlogic cpu :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git apply --ignore-space-change --ignore-whitespace - &amp;lt;&amp;lt; EOF&lt;br /&gt;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
index 201596247..027df3756 100644&lt;br /&gt;
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts&lt;br /&gt;
@@ -348,7 +348,8 @@ &amp;amp;saradc {&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 &amp;amp;scpi_clocks {&lt;br /&gt;
-       status = &amp;quot;disabled&amp;quot;;&lt;br /&gt;
+       /* Works only with new blobs that have limited DVFS table */&lt;br /&gt;
+       status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
 /* SD */&lt;br /&gt;
EOF&lt;br /&gt;
&amp;lt;/pe&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
System part:&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21685</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21685"/>
		<updated>2022-04-03T15:15:57Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Kernel assembly&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
Kernel part:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DST=&amp;quot;/mnt/mmcblk0p1&amp;quot;&lt;br /&gt;
gzip -c arch/arm64/boot/Image &amp;gt; ${DST}/vmlinuz&lt;br /&gt;
cp .config ${DST}/config&lt;br /&gt;
cp modloop ${DST}/modloop&lt;br /&gt;
cp System.map ${DST}/System.map&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
System part:&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21684</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21684"/>
		<updated>2022-04-03T14:52:53Z</updated>

		<summary type="html">&lt;p&gt;Yuu: missing squashfs-tools package&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git squashfs-tools&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21683</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21683"/>
		<updated>2022-04-03T14:35:39Z</updated>

		<summary type="html">&lt;p&gt;Yuu: libssl-dev is required to build kernel from source&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libssl-dev libncurses-dev git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21682</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21682"/>
		<updated>2022-04-03T14:34:58Z</updated>

		<summary type="html">&lt;p&gt;Yuu: fix kernel branch name, add ARCH and CROSS_COMPILE options&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libncurses-dev git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.15.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=21679</id>
		<title>Upgrading Alpine Linux to a new release branch</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=21679"/>
		<updated>2022-04-01T17:04:07Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Remove cached APK before extracting Alpine update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to newer releases.&lt;br /&gt;
&lt;br /&gt;
Doing regular security updates with the package manager is shown at [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading a running system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before actually upgrading your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from older versions ===&lt;br /&gt;
&lt;br /&gt;
In case an older version needs to be upgraded, i.e. not just upgrading from the last release to the subsequent version as covered by the individual release notes, also check [[Upgrading from older versions]] for potential specifically required upgrade steps.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&lt;br /&gt;
&lt;br /&gt;
When Alpine Linux is installed in &#039;&#039;&#039;sys&#039;&#039;&#039; mode, e.g. on a hard drive, upgrading to the next stable version should be a straightforward package manager operation. However, for specific info always refer to the appropriate release notes.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to Edge ===&lt;br /&gt;
{{:Include:Upgrading to Edge}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
=== Boot media === &lt;br /&gt;
&lt;br /&gt;
If the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO.&lt;br /&gt;
&lt;br /&gt;
If booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine Linux box. &lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
If you have locally installed and configured additional packages using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Backup the local configuration prior to upgrading.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
After upgrading the packages, save the upgraded configuration changes.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on other removable media (such as CF/USB) ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are for run-from-RAM Alpine installations running on Compact Flash or USB media. Updating your repositories using [[#Upgrading_an_Alpine_Linux_Hard-disk_installation|the procedures detailed above]], then running:&lt;br /&gt;
{{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
will suffice for some purposes. (If you want the new packages to be used after a reboot, you should [[How_to_enable_APK_caching|enable APK caching]].)&lt;br /&gt;
&lt;br /&gt;
However, this is not an adequate general solution because it won&#039;t honor any kernel upgrades and the like. For the general solution, you&#039;ll need to upgrade your boot medium (Compact Flash or USB). That is what the following steps describe how to do.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading_Alpine_environmentvars}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Operating System ===&lt;br /&gt;
&lt;br /&gt;
Start by checking that you have enough space on your media. For a &#039;&#039;&#039;standard&#039;&#039;&#039; Alpine image, you need at least 400MB available space.&lt;br /&gt;
{{Cmd|df -h {{!}} grep &amp;quot;Filesystem\{{!}}$LBU_MEDIA&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
==== Download and verify new release ====&lt;br /&gt;
&lt;br /&gt;
Make sure the media that holds your Alpine system is mounted readwrite.&lt;br /&gt;
{{Cmd|mount -oremount,rw /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 2.2.3 or newer&#039;&#039;&#039;: Download the latest release, {{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/&amp;lt;arch&amp;gt;/&amp;lt;image&amp;gt;.iso}} and then use the following command to mount and copy files as needed for you: {{Cmd|setup-bootable -u alpine-extended-&amp;lt;version&amp;gt;-&amp;lt;arch&amp;gt;.iso /media/$LBU_MEDIA}} Once the command completes, proceed to the [[#Save changes|Save changes]] section.&lt;br /&gt;
&lt;br /&gt;
==== For older versions of Alpine ====&lt;br /&gt;
Start downloading a new &#039;.iso&#039; and a &#039;.sha1&#039; file &lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA&lt;br /&gt;
wget -c {{#latestalp:alpine|url}}&lt;br /&gt;
wget {{#latestalp:alpine|url}}.sha1}}&lt;br /&gt;
&lt;br /&gt;
Check integrity of the downloaded files &#039;&#039;(it might take some time)&#039;&#039;:&lt;br /&gt;
{{Cmd|sha1sum -c {{#latestalp:alpine|file}}.sha1}}&lt;br /&gt;
&#039;&#039;The output of the above command should say &#039;OK&#039;.&amp;lt;BR&amp;gt;&#039;&#039;&lt;br /&gt;
&#039;&#039;If says &#039;FAILED&#039;, delete the iso file and download it again.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 1.10.4 or newer&#039;&#039;&#039;: there is a tool &#039;&#039;setup-bootable&#039;&#039; that will mount and copy the image you just downloaded to your boot medium. With this tool simply do: {{Cmd|setup-bootable -u {{#latestalp:alpine|file}} /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
[[Upgrading from older versions#Upgrading_a_removable_medium_from_Alpine_before_1.10.4|Instructions for older versions of Alpine]] are located elsewhere.&lt;br /&gt;
&lt;br /&gt;
=== Save changes ===&lt;br /&gt;
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
=== Load new kernel ===&lt;br /&gt;
In most cases you will need to reboot Alpine Linux (especially if there are changes in the kernel):&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}&lt;br /&gt;
&lt;br /&gt;
=== Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) ===&lt;br /&gt;
On Alpine 3.X and newer, kernel is not upgraded when using &amp;lt;code&amp;gt;apk upgrade&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; does not work properly.&lt;br /&gt;
&lt;br /&gt;
If you want to upgrade your kernel, you will need to get it from the latest release, but first you must have and run :&lt;br /&gt;
{{Cmd|apk update; apk version -l &#039;&amp;lt;&#039;;&lt;br /&gt;
apk upgrade;&lt;br /&gt;
lbu ci;}}&lt;br /&gt;
&lt;br /&gt;
So now all your packages are upgraded, you can upgrade your kernel.&lt;br /&gt;
&lt;br /&gt;
1. We need to get some variables :&lt;br /&gt;
{{Cmd|. /etc/os-release;&lt;br /&gt;
. /etc/lbu/lbu.conf;&lt;br /&gt;
ARCH&amp;amp;#61;$(cat /etc/apk/arch);}}&lt;br /&gt;
&lt;br /&gt;
2. You &#039;&#039;&#039;must&#039;&#039;&#039; verify if they are correctly set, using this :&lt;br /&gt;
{{Cmd|echo &amp;quot;alpine version : $VERSION_ID&amp;quot;;&lt;br /&gt;
echo &amp;quot;lbu media : $LBU_MEDIA&amp;quot;;&lt;br /&gt;
echo &amp;quot;arch : $ARCH&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
3. And it will output something like this (if not, do not continue this process) :&lt;br /&gt;
{{Cmd|alpine version : 3.13.5&lt;br /&gt;
lbu media : mmcblk0p1&lt;br /&gt;
arch : armhf}}&lt;br /&gt;
&lt;br /&gt;
4. Then you can run this script (WARNING : config.txt will be overwritten!) :&lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA;&lt;br /&gt;
mount -oremount,rw /media/$LBU_MEDIA;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
sha256sum -c *.sha256;&lt;br /&gt;
rm /media/$LBU_MEDIA/apks/$ARCH/*;&lt;br /&gt;
rm /media/$LBU_MEDIA/cache/*;&lt;br /&gt;
tar xzf alpine-rpi-$VERSION_ID-$ARCH.tar.gz;&lt;br /&gt;
rm alpine-rpi-$VERSION_ID-$ARCH.tar.gz alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256;&lt;br /&gt;
sync;&lt;br /&gt;
reboot;}}&lt;br /&gt;
&lt;br /&gt;
5. Test-it !&lt;br /&gt;
{{Cmd|uname -a}}&lt;br /&gt;
&lt;br /&gt;
6. Populate apk cache :&lt;br /&gt;
{{apk update &amp;amp;&amp;amp; apk cache -v download}}&lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
This is done just as at [[#Update local package installations]], above.&lt;br /&gt;
&lt;br /&gt;
== Updating a USB/CF diskless install without setup-bootable ==&lt;br /&gt;
It is possible to update a diskless install of Alpine from another system, or without using the setup-bootable script. This was tested for the 3.13 to the 3.14 upgrade on a Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
Before starting, update /etc/apk/repositories file to retrieve packages for the new release. Then update all packages with:&lt;br /&gt;
{{Cmd|apk update &amp;amp;&amp;amp; apk upgrade -i -a --update-cache}}&lt;br /&gt;
&lt;br /&gt;
We can then use update-conf to check for changes to configurations from the new packages.&lt;br /&gt;
{{Cmd|# check apk-new config changes&lt;br /&gt;
update-conf -a -l&lt;br /&gt;
update-conf -a&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We now need to prepare to update the kernel and boot materials. To do this, we stop the modloop (which is the loopback mount providing kernel modules) and remount the SD media as read/write.&lt;br /&gt;
&lt;br /&gt;
We can also shutdown the system, eject the media, and perform the next steps on another machine (if so, skip this command block)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
cd /media/mmcblk0p1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
At this point, remove all files from the SD media &#039;&#039;&#039;except for /cache, *.apkvol.tar.gz, usercfg.txt, and config.txt&#039;&#039;&#039; Rename config.txt to config.txt.bak temporarily, as extracting the new tar file will overwrite the file.&lt;br /&gt;
&lt;br /&gt;
We can now download the new release and extract it. This example is for an Alpine Raspberry Pi release, so feel free to adjust the URLs for your system. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz.sha256&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz&lt;br /&gt;
sha256sum -c *.sha256&lt;br /&gt;
tar zxf *-aarch64.tar.gz &amp;amp;&amp;amp; sync&lt;br /&gt;
rm alpine-rpi-*&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Restore the original config.txt:&lt;br /&gt;
{{Cmd|mv config.txt.bak config.txt}}&lt;br /&gt;
&lt;br /&gt;
Update the persistent storage using lbu:&lt;br /&gt;
{{Cmd|lbu ci -d}}&lt;br /&gt;
&lt;br /&gt;
We can now reboot, and this should boot into the new kernel. Once this is done, we can clean up and re-download apk caches:&lt;br /&gt;
{{Cmd|mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
rm /media/mmcblk0p1/cache/*&lt;br /&gt;
sync &amp;amp;&amp;amp; apk update &amp;amp;&amp;amp; apk cache -v download&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,ro&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=21678</id>
		<title>Upgrading Alpine Linux to a new release branch</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=21678"/>
		<updated>2022-04-01T17:00:30Z</updated>

		<summary type="html">&lt;p&gt;Yuu: /* Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to newer releases.&lt;br /&gt;
&lt;br /&gt;
Doing regular security updates with the package manager is shown at [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading a running system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before actually upgrading your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from older versions ===&lt;br /&gt;
&lt;br /&gt;
In case an older version needs to be upgraded, i.e. not just upgrading from the last release to the subsequent version as covered by the individual release notes, also check [[Upgrading from older versions]] for potential specifically required upgrade steps.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&lt;br /&gt;
&lt;br /&gt;
When Alpine Linux is installed in &#039;&#039;&#039;sys&#039;&#039;&#039; mode, e.g. on a hard drive, upgrading to the next stable version should be a straightforward package manager operation. However, for specific info always refer to the appropriate release notes.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to Edge ===&lt;br /&gt;
{{:Include:Upgrading to Edge}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
=== Boot media === &lt;br /&gt;
&lt;br /&gt;
If the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO.&lt;br /&gt;
&lt;br /&gt;
If booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine Linux box. &lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
If you have locally installed and configured additional packages using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Backup the local configuration prior to upgrading.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
After upgrading the packages, save the upgraded configuration changes.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on other removable media (such as CF/USB) ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are for run-from-RAM Alpine installations running on Compact Flash or USB media. Updating your repositories using [[#Upgrading_an_Alpine_Linux_Hard-disk_installation|the procedures detailed above]], then running:&lt;br /&gt;
{{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
will suffice for some purposes. (If you want the new packages to be used after a reboot, you should [[How_to_enable_APK_caching|enable APK caching]].)&lt;br /&gt;
&lt;br /&gt;
However, this is not an adequate general solution because it won&#039;t honor any kernel upgrades and the like. For the general solution, you&#039;ll need to upgrade your boot medium (Compact Flash or USB). That is what the following steps describe how to do.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading_Alpine_environmentvars}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Operating System ===&lt;br /&gt;
&lt;br /&gt;
Start by checking that you have enough space on your media. For a &#039;&#039;&#039;standard&#039;&#039;&#039; Alpine image, you need at least 400MB available space.&lt;br /&gt;
{{Cmd|df -h {{!}} grep &amp;quot;Filesystem\{{!}}$LBU_MEDIA&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
==== Download and verify new release ====&lt;br /&gt;
&lt;br /&gt;
Make sure the media that holds your Alpine system is mounted readwrite.&lt;br /&gt;
{{Cmd|mount -oremount,rw /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 2.2.3 or newer&#039;&#039;&#039;: Download the latest release, {{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/&amp;lt;arch&amp;gt;/&amp;lt;image&amp;gt;.iso}} and then use the following command to mount and copy files as needed for you: {{Cmd|setup-bootable -u alpine-extended-&amp;lt;version&amp;gt;-&amp;lt;arch&amp;gt;.iso /media/$LBU_MEDIA}} Once the command completes, proceed to the [[#Save changes|Save changes]] section.&lt;br /&gt;
&lt;br /&gt;
==== For older versions of Alpine ====&lt;br /&gt;
Start downloading a new &#039;.iso&#039; and a &#039;.sha1&#039; file &lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA&lt;br /&gt;
wget -c {{#latestalp:alpine|url}}&lt;br /&gt;
wget {{#latestalp:alpine|url}}.sha1}}&lt;br /&gt;
&lt;br /&gt;
Check integrity of the downloaded files &#039;&#039;(it might take some time)&#039;&#039;:&lt;br /&gt;
{{Cmd|sha1sum -c {{#latestalp:alpine|file}}.sha1}}&lt;br /&gt;
&#039;&#039;The output of the above command should say &#039;OK&#039;.&amp;lt;BR&amp;gt;&#039;&#039;&lt;br /&gt;
&#039;&#039;If says &#039;FAILED&#039;, delete the iso file and download it again.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 1.10.4 or newer&#039;&#039;&#039;: there is a tool &#039;&#039;setup-bootable&#039;&#039; that will mount and copy the image you just downloaded to your boot medium. With this tool simply do: {{Cmd|setup-bootable -u {{#latestalp:alpine|file}} /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
[[Upgrading from older versions#Upgrading_a_removable_medium_from_Alpine_before_1.10.4|Instructions for older versions of Alpine]] are located elsewhere.&lt;br /&gt;
&lt;br /&gt;
=== Save changes ===&lt;br /&gt;
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
=== Load new kernel ===&lt;br /&gt;
In most cases you will need to reboot Alpine Linux (especially if there are changes in the kernel):&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}&lt;br /&gt;
&lt;br /&gt;
=== Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) ===&lt;br /&gt;
On Alpine 3.X and newer, kernel is not upgraded when using &amp;lt;code&amp;gt;apk upgrade&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; does not work properly.&lt;br /&gt;
&lt;br /&gt;
If you want to upgrade your kernel, you will need to get it from the latest release, but first you must have and run :&lt;br /&gt;
{{Cmd|apk update; apk version -l &#039;&amp;lt;&#039;;&lt;br /&gt;
apk upgrade;&lt;br /&gt;
lbu ci;}}&lt;br /&gt;
&lt;br /&gt;
So now all your packages are upgraded, you can upgrade your kernel.&lt;br /&gt;
&lt;br /&gt;
1. We need to get some variables :&lt;br /&gt;
{{Cmd|. /etc/os-release;&lt;br /&gt;
. /etc/lbu/lbu.conf;&lt;br /&gt;
ARCH&amp;amp;#61;$(cat /etc/apk/arch);}}&lt;br /&gt;
&lt;br /&gt;
2. You &#039;&#039;&#039;must&#039;&#039;&#039; verify if they are correctly set, using this :&lt;br /&gt;
{{Cmd|echo &amp;quot;alpine version : $VERSION_ID&amp;quot;;&lt;br /&gt;
echo &amp;quot;lbu media : $LBU_MEDIA&amp;quot;;&lt;br /&gt;
echo &amp;quot;arch : $ARCH&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
3. And it will output something like this (if not, do not continue this process) :&lt;br /&gt;
{{Cmd|alpine version : 3.13.5&lt;br /&gt;
lbu media : mmcblk0p1&lt;br /&gt;
arch : armhf}}&lt;br /&gt;
&lt;br /&gt;
4. Then you can run this script (WARNING : config.txt will be overwritten!) :&lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA;&lt;br /&gt;
mount -oremount,rw /media/$LBU_MEDIA;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
wget &amp;lt;nowiki&amp;gt;https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
sha256sum -c *.sha256;&lt;br /&gt;
rm /media/$LBU_MEDIA/cache/*;&lt;br /&gt;
tar xzf alpine-rpi-$VERSION_ID-$ARCH.tar.gz;&lt;br /&gt;
rm alpine-rpi-$VERSION_ID-$ARCH.tar.gz alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256;&lt;br /&gt;
sync;&lt;br /&gt;
reboot;}}&lt;br /&gt;
&lt;br /&gt;
5. Test-it !&lt;br /&gt;
{{Cmd|uname -a}}&lt;br /&gt;
&lt;br /&gt;
6. Re-download cached apk :&lt;br /&gt;
{{apk update &amp;amp;&amp;amp; apk cache -v download}}&lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
This is done just as at [[#Update local package installations]], above.&lt;br /&gt;
&lt;br /&gt;
== Updating a USB/CF diskless install without setup-bootable ==&lt;br /&gt;
It is possible to update a diskless install of Alpine from another system, or without using the setup-bootable script. This was tested for the 3.13 to the 3.14 upgrade on a Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
Before starting, update /etc/apk/repositories file to retrieve packages for the new release. Then update all packages with:&lt;br /&gt;
{{Cmd|apk update &amp;amp;&amp;amp; apk upgrade -i -a --update-cache}}&lt;br /&gt;
&lt;br /&gt;
We can then use update-conf to check for changes to configurations from the new packages.&lt;br /&gt;
{{Cmd|# check apk-new config changes&lt;br /&gt;
update-conf -a -l&lt;br /&gt;
update-conf -a&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We now need to prepare to update the kernel and boot materials. To do this, we stop the modloop (which is the loopback mount providing kernel modules) and remount the SD media as read/write.&lt;br /&gt;
&lt;br /&gt;
We can also shutdown the system, eject the media, and perform the next steps on another machine (if so, skip this command block)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
cd /media/mmcblk0p1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
At this point, remove all files from the SD media &#039;&#039;&#039;except for /cache, *.apkvol.tar.gz, usercfg.txt, and config.txt&#039;&#039;&#039; Rename config.txt to config.txt.bak temporarily, as extracting the new tar file will overwrite the file.&lt;br /&gt;
&lt;br /&gt;
We can now download the new release and extract it. This example is for an Alpine Raspberry Pi release, so feel free to adjust the URLs for your system. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz.sha256&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz&lt;br /&gt;
sha256sum -c *.sha256&lt;br /&gt;
tar zxf *-aarch64.tar.gz &amp;amp;&amp;amp; sync&lt;br /&gt;
rm alpine-rpi-*&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Restore the original config.txt:&lt;br /&gt;
{{Cmd|mv config.txt.bak config.txt}}&lt;br /&gt;
&lt;br /&gt;
Update the persistent storage using lbu:&lt;br /&gt;
{{Cmd|lbu ci -d}}&lt;br /&gt;
&lt;br /&gt;
We can now reboot, and this should boot into the new kernel. Once this is done, we can clean up and re-download apk caches:&lt;br /&gt;
{{Cmd|mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
rm /media/mmcblk0p1/cache/*&lt;br /&gt;
sync &amp;amp;&amp;amp; apk update &amp;amp;&amp;amp; apk cache -v download&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,ro&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21668</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21668"/>
		<updated>2022-03-22T19:45:59Z</updated>

		<summary type="html">&lt;p&gt;Yuu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies, for Debian (as example) :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libncurses-dev git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to set specific environment variables IF you are not using an arm64 machine. Usually, you should be running on a x64 architecture (Intel or AMD I guess), so you would like to cross-compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
We need to build uboot from source as the u-boot provided does not autoboot without UART connected.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We used the specific deconfig for the Odroid-C2 but, as mentionned before : we want to autoboot with or without UART connection.&lt;br /&gt;
You can still access the SPL prompt by pressing the &#039;Enter&#039; key twice before the two seconds countdown.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_AUTOBOOT_KEYED .*/CONFIG_AUTOBOOT_KEYED=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, it&#039;s time to build :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Amlogic doesn’t provide sources for the firmware and for tools needed to create the bootloader image, so it is necessary to obtain them from the git tree published by the board vendor.&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.154.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig. This configuration is required for Alpine/Linux and not enabled by default.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The, build your kernel, associated modules and the [https://elinux.org/Device_Tree_Reference#What_Is_Device_Tree DTB] (Device Tree Blob) from the source :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_on_ARM&amp;diff=21664</id>
		<title>Alpine on ARM</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_on_ARM&amp;diff=21664"/>
		<updated>2022-03-20T16:01:06Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Added link to internal guide to install Alpine on the Odroid-C2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
{{Move|ARM SOCs}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Supported SoCs==&lt;br /&gt;
&lt;br /&gt;
Currently Alpine supports armv6/armhf arch on the following SoCs&lt;br /&gt;
&lt;br /&gt;
(This is taken from the DTBs which Alpine includes)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable collapsible&amp;quot;&lt;br /&gt;
| am335x-base0033&lt;br /&gt;
| am335x-bone&lt;br /&gt;
| am335x-boneblack&lt;br /&gt;
| am335x-evm&lt;br /&gt;
| am335x-evmsk&lt;br /&gt;
| am335x-nano&lt;br /&gt;
| am335x-pepper&lt;br /&gt;
| am3517-craneboard&lt;br /&gt;
| am3517-evm&lt;br /&gt;
| am3517_mt_ventoux&lt;br /&gt;
| am437x-gp-evm&lt;br /&gt;
|-&lt;br /&gt;
| am437x-sk-evm&lt;br /&gt;
| am43x-epos-evm&lt;br /&gt;
| exynos4210-origen&lt;br /&gt;
| exynos4210-smdkv310&lt;br /&gt;
| exynos4210-trats&lt;br /&gt;
| exynos4210-universal_c210&lt;br /&gt;
| exynos4412-odroidu3&lt;br /&gt;
| exynos4412-odroidx&lt;br /&gt;
| exynos4412-odroidx2&lt;br /&gt;
| exynos4412-origen&lt;br /&gt;
| exynos4412-smdk4412&lt;br /&gt;
| exynos4412-tiny4412&lt;br /&gt;
|-&lt;br /&gt;
| exynos4412-trats2&lt;br /&gt;
| exynos5250-arndale&lt;br /&gt;
| exynos5250-smdk5250&lt;br /&gt;
| exynos5250-snow&lt;br /&gt;
| exynos5260-xyref5260&lt;br /&gt;
| exynos5410-smdk5410&lt;br /&gt;
| exynos5420-arndale-octa&lt;br /&gt;
| exynos5420-peach-pit&lt;br /&gt;
| exynos5420-smdk5420&lt;br /&gt;
| exynos5440-sd5v1&lt;br /&gt;
| exynos5440-ssdk5440&lt;br /&gt;
| exynos5800-peach-pi&lt;br /&gt;
|-&lt;br /&gt;
| imx1-ads&lt;br /&gt;
| imx1-apf9328&lt;br /&gt;
| imx25-eukrea-mbimxsd25-baseboard-cmo-qvga&lt;br /&gt;
| imx25-eukrea-mbimxsd25-baseboard-dvi-svga&lt;br /&gt;
| imx25-eukrea-mbimxsd25-baseboard-dvi-vga&lt;br /&gt;
| imx25-eukrea-mbimxsd25-baseboard&lt;br /&gt;
| imx25-karo-tx25&lt;br /&gt;
| imx25-pdk&lt;br /&gt;
| imx27-apf27&lt;br /&gt;
| imx27-apf27dev&lt;br /&gt;
| imx27-eukrea-mbimxsd27-baseboard&lt;br /&gt;
| imx27-pdk&lt;br /&gt;
|-&lt;br /&gt;
| imx27-phytec-phycard-s-rdk&lt;br /&gt;
| imx27-phytec-phycore-rdk&lt;br /&gt;
| imx31-bug&lt;br /&gt;
| imx35-eukrea-mbimxsd35-baseboard&lt;br /&gt;
| imx35-pdk&lt;br /&gt;
| imx50-evk&lt;br /&gt;
| imx51-apf51&lt;br /&gt;
| imx51-apf51dev&lt;br /&gt;
| imx51-babbage&lt;br /&gt;
| imx51-digi-connectcore-jsk&lt;br /&gt;
| imx51-eukrea-mbimxsd51-baseboard&lt;br /&gt;
| imx53-ard&lt;br /&gt;
|-&lt;br /&gt;
| imx53-m53evk&lt;br /&gt;
| imx53-mba53&lt;br /&gt;
| imx53-qsb&lt;br /&gt;
| imx53-qsrb&lt;br /&gt;
| imx53-smd&lt;br /&gt;
| imx53-tx53-x03x&lt;br /&gt;
| imx53-tx53-x13x&lt;br /&gt;
| imx53-voipac-bsb&lt;br /&gt;
| imx6dl-aristainetos_4&lt;br /&gt;
| imx6dl-aristainetos_7&lt;br /&gt;
| imx6dl-cubox-i&lt;br /&gt;
| imx6dl-dfi-fs700-m60&lt;br /&gt;
|-&lt;br /&gt;
| imx6dl-gw51xx&lt;br /&gt;
| imx6dl-gw52xx&lt;br /&gt;
| imx6dl-gw53xx&lt;br /&gt;
| imx6dl-gw54xx&lt;br /&gt;
| imx6dl-gw552x&lt;br /&gt;
| imx6dl-hummingboard&lt;br /&gt;
| imx6dl-nitrogen6x&lt;br /&gt;
| imx6dl-phytec-pbab01&lt;br /&gt;
| imx6dl-rex-basic&lt;br /&gt;
| imx6dl-riotboard&lt;br /&gt;
| imx6dl-sabreauto&lt;br /&gt;
| imx6dl-sabrelite&lt;br /&gt;
|-&lt;br /&gt;
| imx6dl-sabresd&lt;br /&gt;
| imx6dl-tx6dl-comtft&lt;br /&gt;
| imx6dl-tx6u-801x&lt;br /&gt;
| imx6dl-tx6u-811x&lt;br /&gt;
| imx6dl-wandboard-revb1&lt;br /&gt;
| imx6dl-wandboard&lt;br /&gt;
| imx6q-arm2&lt;br /&gt;
| imx6q-cm-fx6&lt;br /&gt;
| imx6q-cubox-i&lt;br /&gt;
| imx6q-dfi-fs700-m60&lt;br /&gt;
| imx6q-dmo-edmqmx6&lt;br /&gt;
| imx6q-gk802&lt;br /&gt;
|-&lt;br /&gt;
| imx6q-gw51xx&lt;br /&gt;
| imx6q-gw52xx&lt;br /&gt;
| imx6q-gw53xx&lt;br /&gt;
| imx6q-gw5400-a&lt;br /&gt;
| imx6q-gw54xx&lt;br /&gt;
| imx6q-gw552x&lt;br /&gt;
| imx6q-hummingboard&lt;br /&gt;
| imx6q-nitrogen6x&lt;br /&gt;
| imx6q-phytec-pbab01&lt;br /&gt;
| imx6q-rex-pro&lt;br /&gt;
| imx6q-sabreauto&lt;br /&gt;
| imx6q-sabrelite&lt;br /&gt;
|-&lt;br /&gt;
| imx6q-sabresd&lt;br /&gt;
| imx6q-sbc6x&lt;br /&gt;
| imx6q-tx6q-1010-comtft&lt;br /&gt;
| imx6q-tx6q-1010&lt;br /&gt;
| imx6q-tx6q-1020-comtft&lt;br /&gt;
| imx6q-tx6q-1020&lt;br /&gt;
| imx6q-tx6q-1110&lt;br /&gt;
| imx6q-udoo&lt;br /&gt;
| imx6q-wandboard-revb1&lt;br /&gt;
| imx6q-wandboard&lt;br /&gt;
| imx6sl-evk&lt;br /&gt;
| imx6sx-sdb&lt;br /&gt;
|-&lt;br /&gt;
| armada-3720-espressobin-v7-emmc&lt;br /&gt;
|-&lt;br /&gt;
| omap3-beagle-xm-ab&lt;br /&gt;
| omap3-beagle-xm&lt;br /&gt;
| omap3-beagle&lt;br /&gt;
| omap3-cm-t3517&lt;br /&gt;
| omap3-cm-t3530&lt;br /&gt;
| omap3-cm-t3730&lt;br /&gt;
| omap3-devkit8000&lt;br /&gt;
| omap3-evm-37xx&lt;br /&gt;
| omap3-evm&lt;br /&gt;
| omap3-gta04a3&lt;br /&gt;
| omap3-gta04a4&lt;br /&gt;
| omap3-gta04a5&lt;br /&gt;
|-&lt;br /&gt;
| omap3-ha-lcd&lt;br /&gt;
| omap3-ha&lt;br /&gt;
| omap3-igep0020&lt;br /&gt;
| omap3-igep0030&lt;br /&gt;
| omap3-ldp&lt;br /&gt;
| omap3-lilly-dbb056&lt;br /&gt;
| omap3-n9&lt;br /&gt;
| omap3-n900&lt;br /&gt;
| omap3-n950&lt;br /&gt;
| omap3-overo-alto35&lt;br /&gt;
| omap3-overo-chestnut43&lt;br /&gt;
| omap3-overo-gallop43&lt;br /&gt;
|-&lt;br /&gt;
| omap3-overo-palo43&lt;br /&gt;
| omap3-overo-storm-alto35&lt;br /&gt;
| omap3-overo-storm-chestnut43&lt;br /&gt;
| omap3-overo-storm-gallop43&lt;br /&gt;
| omap3-overo-storm-palo43&lt;br /&gt;
| omap3-overo-storm-summit&lt;br /&gt;
| omap3-overo-storm-tobi&lt;br /&gt;
| omap3-overo-summit&lt;br /&gt;
| omap3-overo-tobi&lt;br /&gt;
| omap3-sbc-t3517&lt;br /&gt;
| omap3-sbc-t3530&lt;br /&gt;
| omap3-sbc-t3730&lt;br /&gt;
|-&lt;br /&gt;
| omap3-thunder&lt;br /&gt;
| omap3-zoom3&lt;br /&gt;
| omap3430-sdp&lt;br /&gt;
| omap4-duovero-parlor&lt;br /&gt;
| omap4-panda-a4&lt;br /&gt;
| omap4-panda-es&lt;br /&gt;
| omap4-panda&lt;br /&gt;
| omap4-sdp-es23plus&lt;br /&gt;
| omap4-sdp&lt;br /&gt;
| omap4-var-dvk-om44&lt;br /&gt;
| omap4-var-stk-om44&lt;br /&gt;
| omap5-cm-t54&lt;br /&gt;
|-&lt;br /&gt;
| omap5-sbc-t54&lt;br /&gt;
| omap5-uevm&lt;br /&gt;
| qcom-apq8064-cm-qs600&lt;br /&gt;
| qcom-apq8064-ifc6410&lt;br /&gt;
| qcom-apq8074-dragonboard&lt;br /&gt;
| qcom-apq8084-ifc6540&lt;br /&gt;
| qcom-apq8084-mtp&lt;br /&gt;
| qcom-ipq8064-ap148&lt;br /&gt;
| qcom-msm8660-surf&lt;br /&gt;
| qcom-msm8960-cdp&lt;br /&gt;
| qcom-msm8974-sony-xperia-honami&lt;br /&gt;
| sun4i-a10-a1000&lt;br /&gt;
|-&lt;br /&gt;
| sun4i-a10-ba10-tvbox&lt;br /&gt;
| sun4i-a10-cubieboard&lt;br /&gt;
| sun4i-a10-hackberry&lt;br /&gt;
| sun4i-a10-inet97fv2&lt;br /&gt;
| sun4i-a10-mini-xplus&lt;br /&gt;
| sun4i-a10-olinuxino-lime&lt;br /&gt;
| sun4i-a10-pcduino&lt;br /&gt;
| sun5i-a10s-olinuxino-micro&lt;br /&gt;
| sun5i-a10s-r7-tv-dongle&lt;br /&gt;
| sun5i-a13-hsg-h702&lt;br /&gt;
| sun5i-a13-olinuxino-micro&lt;br /&gt;
| sun5i-a13-olinuxino&lt;br /&gt;
|-&lt;br /&gt;
| sun6i-a31-app4-evb1&lt;br /&gt;
| sun6i-a31-colombus&lt;br /&gt;
| sun6i-a31-hummingbird&lt;br /&gt;
| sun6i-a31-m9&lt;br /&gt;
| sun7i-a20-cubieboard2&lt;br /&gt;
| sun7i-a20-cubietruck&lt;br /&gt;
| sun7i-a20-hummingbird&lt;br /&gt;
| sun7i-a20-i12-tvbox&lt;br /&gt;
| sun7i-a20-olinuxino-lime&lt;br /&gt;
| sun7i-a20-olinuxino-micro&lt;br /&gt;
| sun7i-a20-pcduino3&lt;br /&gt;
| sun8i-a23-ippo-q8h-v5&lt;br /&gt;
|-&lt;br /&gt;
| vexpress-v2p-ca15-tc1&lt;br /&gt;
| vexpress-v2p-ca15_a7&lt;br /&gt;
| vexpress-v2p-ca5s&lt;br /&gt;
| vexpress-v2p-ca9&lt;br /&gt;
| vf610-colibri-eval-v3&lt;br /&gt;
| vf610-cosmic&lt;br /&gt;
| vf610-twr&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Install Alpine on supported SoCs==&lt;br /&gt;
&lt;br /&gt;
=== Generic information ===&lt;br /&gt;
&lt;br /&gt;
(If anyone has one of the above devices and has successfully installed Alpine on it, please consider adding the missing info here.)&lt;br /&gt;
&lt;br /&gt;
==== Example with Wandboard ====&lt;br /&gt;
&lt;br /&gt;
===== Get latest Alpine image =====&lt;br /&gt;
Download the last Generic ARM image on https://alpinelinux.org/downloads/&lt;br /&gt;
Extract the archive somewhere.&lt;br /&gt;
&lt;br /&gt;
===== Prepare SD Card =====&lt;br /&gt;
First install SPL and u-boot.img (this could change for other board):&lt;br /&gt;
in root, write the SPL from Alpine extracted files :&lt;br /&gt;
 dd if=u-boot/wandboard/SPL of=/dev/sdX seek=1 bs=1k&lt;br /&gt;
and the u-boot.img :&lt;br /&gt;
 dd if=u-boot/wandboard/u-boot.img of=/dev/sdX seek=69 bs=1k&lt;br /&gt;
&lt;br /&gt;
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&#039;m not sure all folder as useful).&lt;br /&gt;
&lt;br /&gt;
After you can put the sd-card in the Wandboard and boot it with serial console connected.&amp;lt;br&amp;gt;&lt;br /&gt;
The board should boot on the sd-card. When the prompt ask a login, enter &#039;root&#039;.&lt;br /&gt;
Then launch &#039;setup-alpine&#039; to configure the system.&lt;br /&gt;
&lt;br /&gt;
=== Specific guides ===&lt;br /&gt;
&lt;br /&gt;
* [[DIY Fully working Alpine Linux for Allwinner and Other ARM SOCs]]&lt;br /&gt;
* [[Raspberry_Pi]]&lt;br /&gt;
* [[Raspberry_Pi_4_-_Persistent_system_acting_as_a_NAS_and_Time_Machine]]&lt;br /&gt;
* [[Odroid-C2]]&lt;br /&gt;
&lt;br /&gt;
==Unupported SoCs==&lt;br /&gt;
&lt;br /&gt;
If you have an armv6/armv7 SoC which is not listed above but is supported by mainline uboot/kernel then it&#039;s still possible to install Alpine&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Requiremnets===&lt;br /&gt;
&lt;br /&gt;
* Alpine&#039;s forked uboot to support tarballs (fabled?)&lt;br /&gt;
* serial console&lt;br /&gt;
* crosscompiler/toolchain if you can not compile natively&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===The embedded world===&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;ROMs&amp;quot; or other unknown reasons, e.g. Rockchip&#039;s notion &amp;quot;partition&amp;quot; are neither DOS nor GPT partitions.&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Storage====&lt;br /&gt;
&lt;br /&gt;
One can load uboot from the following block devices if it&#039;s supported.&lt;br /&gt;
* NAND&lt;br /&gt;
* eMMC&lt;br /&gt;
* SD card&lt;br /&gt;
* USB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Power on====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
One can view SPL+uboot as BIOS and boot-loader on PC. Think that you could put the BIOS on an external storage :D&lt;br /&gt;
&lt;br /&gt;
Once you have loaded the &amp;quot;standard&amp;quot; uboot, things are more or less like on x86.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Partitioning====&lt;br /&gt;
&lt;br /&gt;
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&lt;br /&gt;
the MBR bootable flag, or GPT legacy_bios_bootable attribute).&lt;br /&gt;
* SPL starts at block 64 (please consult the docs for your board)&lt;br /&gt;
* uboot starts at block 256 (please consult the docs for your board)&lt;br /&gt;
Just dd SPL and boot with the correct offset to the media you wish to boot&lt;br /&gt;
&lt;br /&gt;
====Booting Linux kernel====&lt;br /&gt;
&lt;br /&gt;
* 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&lt;br /&gt;
* there should be an extra line &amp;quot;FDTDIR&amp;quot; which points to the DTBs&lt;br /&gt;
e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
label Fedora (3.17.0-0.rc4.git2.1.fc22.armv7hl) 22 (Rawhide)&lt;br /&gt;
	kernel /boot/vmlinuz-3.17.0-0.rc4.git2.1.fc22.armv7hl&lt;br /&gt;
	append ro root=UUID=8eac677f-8ea8-4270-8479-d5ddbb797450 console=ttyS0,115200n8 LANG=en_US.UTF-8 drm.debug=0xf&lt;br /&gt;
	fdtdir /boot/dtb-3.17.0-0.rc4.git2.1.fc22.armv7hl&lt;br /&gt;
	initrd /boot/initramfs-3.17.0-0.rc4.git2.1.fc22.armv7hl.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using QEMU==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qemu-system-arm -M vexpress-a9 -kernel zImage -initrd initramfs-grsec -dtb vexpress-v2p-ca9.dtb -hda hda.img -serial stdio&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.armadeus.org/wiki/index.php?title=Kernel-with-device-tree dtb (Device Tree Binary)]&lt;br /&gt;
* [https://forum.odroid.com/viewtopic.php?t=30459 Odroid-C2] 2018 &#039;&#039;([https://archlinuxarm.org/platforms/armv8/amlogic/odroid-c2 ARMv8, AArch64];  [https://forum.odroid.com/viewtopic.php?f=138&amp;amp;t=32608 Alpine Linux custom build])&#039;&#039;&lt;br /&gt;
* [https://cusdeb.com/ CusDeb.com] - bootstrap SD-card images for single-board computers online; &#039;&#039;([https://github.com/tolstoyevsky/pieman Pieman])&#039;&#039;&lt;br /&gt;
* [https://kernelci.org/soc/ &amp;lt;s&amp;gt;Available&amp;lt;/s&amp;gt; SoCs]&lt;br /&gt;
&lt;br /&gt;
[[Category:Hardware]]&lt;br /&gt;
[[category:ARM]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21647</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21647"/>
		<updated>2022-03-19T10:30:06Z</updated>

		<summary type="html">&lt;p&gt;Yuu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Required environement and toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies:&lt;br /&gt;
Example on debian :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt install bc bison flex make gcc gcc-aarch64-linux-gnu libncurses-dev git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Environement variables&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=arm64&lt;br /&gt;
export CROSS_COMPILE=aarch64-linux-gnu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 https://source.denx.de/u-boot/u-boot.git -b v2022.01 u-boot-denx.de&lt;br /&gt;
cd u-boot-denx.de&lt;br /&gt;
export ARCH=arm64 &amp;amp;&amp;amp; export CROSS_COMPILE=aarch64-linux-gnu-&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make odroid-c2_defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change boot options:&lt;br /&gt;
TODO : remove lines&lt;br /&gt;
&amp;lt; # CONFIG_AUTOBOOT_KEYED is not set&lt;br /&gt;
&amp;lt; # CONFIG_AUTOBOOT_USE_MENUKEY is not set&lt;br /&gt;
&lt;br /&gt;
Patch default configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SD_BOOT.*/CONFIG_SD_BOOT=y/&#039; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_FLUSH_STDIN=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_PROMPT=&amp;quot;Press quickly &#039;Enter&#039; twice to stop autoboot: %d\n&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;# CONFIG_AUTOBOOT_ENCRYPTION is not set&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_DELAY_STR=&amp;quot;&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_STOP_STR=&amp;quot;\xd\xd&amp;quot;&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo &amp;quot;CONFIG_AUTOBOOT_KEYED_CTRLC=y&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Build time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git -b linux-5.154.y linux-stable&lt;br /&gt;
cd linux-stable&lt;br /&gt;
make mrproper &amp;amp;&amp;amp; make defconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We need to adapt the default arm64 generated by defconfig&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_SQUASHFS_XZ.*/CONFIG_SQUASHFS_XZ=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_UEVENT_HELPER.*/CONFIG_UEVENT_HELPER=y/&#039; .config&lt;br /&gt;
sed -i -e &#039;s/.*CONFIG_BLK_DEV_RAM.*/CONFIG_BLK_DEV_RAM=y/&#039; .config&lt;br /&gt;
echo CONFIG_UEVENT_HELPER_PATH=\&amp;quot;/sbin/hotplug\&amp;quot; &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_COUNT=16 &amp;gt;&amp;gt; .config&lt;br /&gt;
echo CONFIG_BLK_DEV_RAM_SIZE=4096 &amp;gt;&amp;gt; .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the kernel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
time make -j$(nproc) Image dtbs modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create modloop:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -rf installed-modules &amp;amp;&amp;amp; mkdir installed-modules&lt;br /&gt;
INSTALL_MOD_PATH=installed-modules make modules_install&lt;br /&gt;
find installed-modules -type l -delete&lt;br /&gt;
rm -f modloop&lt;br /&gt;
mksquashfs installed-modules/lib/ modloop -b 1048576 -comp xz -Xdict-size 100% -all-root&lt;br /&gt;
rm -rf installed-modules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21646</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21646"/>
		<updated>2022-03-19T10:15:25Z</updated>

		<summary type="html">&lt;p&gt;Yuu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* [https://wiki.odroid.com/odroid-c2/odroid-c2 Odroid-C2]&lt;br /&gt;
* Official PSU or just a micro-SD cable (notes : the barrel plug (inner(positive) diameter 0.8mm and outer(negative) diameter 2.5mm) is recommended, without the J1 jumper)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL ([https://wiki.odroid.com/accessory/development/usb_uart_kit official] or [https://duckduckgo.com/?q=CP2102+ttl&amp;amp;t=h_&amp;amp;iax=images&amp;amp;ia=images CP2102 chipset] or an old rpi)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Toolchain==&lt;br /&gt;
Using GNU/Linux is recommended and this guide and here are the required dependencies:&lt;br /&gt;
Example on debian : apt install bc bison flex make gcc gcc-aarch64-linux-gnu libncurses-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21645</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21645"/>
		<updated>2022-03-19T10:05:32Z</updated>

		<summary type="html">&lt;p&gt;Yuu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* Odroid-C2&lt;br /&gt;
* Official PSU or just a micro-SD cable (the barrel plug is recommended)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL (official or CP2102 chipset or an old rpi)&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21644</id>
		<title>Odroid-C2</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Odroid-C2&amp;diff=21644"/>
		<updated>2022-03-19T10:05:13Z</updated>

		<summary type="html">&lt;p&gt;Yuu: Alpine/Linux support for Odroid-C2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TOC right}}&lt;br /&gt;
{{Style}}&lt;br /&gt;
&lt;br /&gt;
(Parts of this page are WIP, still incomplete and some might be incorrect.)&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The Odroid-C2 single board computer is not very well supported by Alpine/Linux. However the &amp;quot;Generic ARM (aarch64)&amp;quot; build contains almost everything we need !&lt;br /&gt;
&lt;br /&gt;
What do we need ?&lt;br /&gt;
* kernel : provided kernel by the Alpine team does not boot&lt;br /&gt;
* u-boot : provided u-boot does not autoboot without serial&lt;br /&gt;
* system files : everything is okay&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the hardware side:&lt;br /&gt;
* Odroid-C2&lt;br /&gt;
* Official PSU or just a micro-SD cable (the barrel plug is recommended)&lt;br /&gt;
* micro-SD (or eMMC)&lt;br /&gt;
* USB to TTL (official or CP2102 chipset or an old rpi)&lt;br /&gt;
&lt;br /&gt;
==Build u-boot from source==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Build the latest LTS kernel from source==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Assembly==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Booting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
&#039;&#039;Work in progress&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=20124</id>
		<title>Upgrading Alpine Linux to a new release branch</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=20124"/>
		<updated>2021-08-29T15:28:33Z</updated>

		<summary type="html">&lt;p&gt;Yuu: /* Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to newer releases.&lt;br /&gt;
&lt;br /&gt;
Doing regular security updates with the package manager is shown at [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading a running system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before actually upgrading your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from older versions ===&lt;br /&gt;
&lt;br /&gt;
In case an older version needs to be upgraded, i.e. not just upgrading from the last release to the subsequent version as covered by the individual release notes, also check [[Upgrading from older versions]] for potential specifically required upgrade steps.&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&lt;br /&gt;
&lt;br /&gt;
When Alpine Linux is installed in &#039;&#039;&#039;sys&#039;&#039;&#039; mode, e.g. on a hard drive, upgrading to the next stable version should be a straightforward package manager operation. However, for specific info always refer to the appropriate release notes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to Edge ===&lt;br /&gt;
{{:Include:Upgrading to Edge}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
=== Boot media === &lt;br /&gt;
&lt;br /&gt;
If the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO.&lt;br /&gt;
&lt;br /&gt;
If booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine Linux box. &lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
If you have locally installed and configured additional packages using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
&lt;br /&gt;
Backup the local configuration prior to upgrading.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
After upgrading the packages, save the upgraded configuration changes.&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on other removable media (such as CF/USB) ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are for run-from-RAM Alpine installations running on Compact Flash or USB media. Updating your repositories using [[#Upgrading_an_Alpine_Linux_Hard-disk_installation|the procedures detailed above]], then running:&lt;br /&gt;
{{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
will suffice for some purposes. (If you want the new packages to be used after a reboot, you should [[How_to_enable_APK_caching|enable APK caching]].)&lt;br /&gt;
&lt;br /&gt;
However, this is not an adequate general solution because it won&#039;t honor any kernel upgrades and the like. For the general solution, you&#039;ll need to upgrade your boot medium (Compact Flash or USB). That is what the following steps describe how to do.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading_Alpine_environmentvars}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Operating System ===&lt;br /&gt;
&lt;br /&gt;
Start by checking that you have enough space on your media. For a &#039;&#039;&#039;standard&#039;&#039;&#039; Alpine image, you need at least 400MB available space.&lt;br /&gt;
{{Cmd|df -h {{!}} grep &amp;quot;Filesystem\{{!}}$LBU_MEDIA&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
==== Download and verify new release ====&lt;br /&gt;
&lt;br /&gt;
Make sure the media that holds your Alpine system is mounted readwrite.&lt;br /&gt;
{{Cmd|mount -oremount,rw /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 2.2.3 or newer&#039;&#039;&#039;: Download the latest release, {{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/&amp;lt;arch&amp;gt;/&amp;lt;image&amp;gt;.iso}} and then use the following command to mount and copy files as needed for you: {{Cmd|setup-bootable -u alpine-extended-&amp;lt;version&amp;gt;-&amp;lt;arch&amp;gt;.iso /media/$LBU_MEDIA}} Once the command completes, proceed to the [[#Save changes|Save changes]] section.&lt;br /&gt;
&lt;br /&gt;
==== For older versions of Alpine ====&lt;br /&gt;
Start downloading a new &#039;.iso&#039; and a &#039;.sha1&#039; file &lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA&lt;br /&gt;
wget -c {{#latestalp:alpine|url}}&lt;br /&gt;
wget {{#latestalp:alpine|url}}.sha1}}&lt;br /&gt;
&lt;br /&gt;
Check integrity of the downloaded files &#039;&#039;(it might take some time)&#039;&#039;:&lt;br /&gt;
{{Cmd|sha1sum -c {{#latestalp:alpine|file}}.sha1}}&lt;br /&gt;
&#039;&#039;The output of the above command should say &#039;OK&#039;.&amp;lt;BR&amp;gt;&#039;&#039;&lt;br /&gt;
&#039;&#039;If says &#039;FAILED&#039;, delete the iso file and download it again.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 1.10.4 or newer&#039;&#039;&#039;: there is a tool &#039;&#039;setup-bootable&#039;&#039; that will mount and copy the image you just downloaded to your boot medium. With this tool simply do: {{Cmd|setup-bootable -u {{#latestalp:alpine|file}} /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
[[Upgrading from older versions#Upgrading_a_removable_medium_from_Alpine_before_1.10.4|Instructions for older versions of Alpine]] are located elsewhere.&lt;br /&gt;
&lt;br /&gt;
=== Save changes ===&lt;br /&gt;
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
=== Load new kernel ===&lt;br /&gt;
In most cases you will need to reboot Alpine Linux (especially if there are changes in the kernel):&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}&lt;br /&gt;
&lt;br /&gt;
=== Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) ===&lt;br /&gt;
On Alpine 3.X and newer, kernel is not upgraded when using &amp;lt;code&amp;gt;apk upgrade&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; does not work properly.&lt;br /&gt;
&lt;br /&gt;
If you want to upgrade your kernel, you will need to get it from the latest release, but first you must have and run :&lt;br /&gt;
{{Cmd|apk update; apk version -l &#039;&amp;lt;&#039;;&lt;br /&gt;
apk upgrade;&lt;br /&gt;
lbu ci;}}&lt;br /&gt;
&lt;br /&gt;
So now all your packages are upgraded, you can upgrade your kernel.&lt;br /&gt;
&lt;br /&gt;
1. We need to get some variables :&lt;br /&gt;
{{Cmd|. /etc/os-release;&lt;br /&gt;
. /etc/lbu/lbu.conf;&lt;br /&gt;
ARCH&amp;amp;#61;$(cat /etc/apk/arch);}}&lt;br /&gt;
&lt;br /&gt;
2. You &#039;&#039;&#039;must&#039;&#039;&#039; verify if they are correctly set, using this :&lt;br /&gt;
{{Cmd|echo &amp;quot;alpine version : $VERSION_ID&amp;quot;;&lt;br /&gt;
echo &amp;quot;lbu media : $LBU_MEDIA&amp;quot;;&lt;br /&gt;
echo &amp;quot;arch : $ARCH&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
3. And it will output something like this (if not, do not continue this process) :&lt;br /&gt;
{{Cmd|alpine version : 3.13.5&lt;br /&gt;
lbu media : mmcblk0p1&lt;br /&gt;
arch : armhf}}&lt;br /&gt;
&lt;br /&gt;
4. Then you can run this script (WARNING : config.txt will be overwritten!) :&lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA;&lt;br /&gt;
mount -oremount,rw /media/$LBU_MEDIA;&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz;&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/$ARCH/alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256;&lt;br /&gt;
sha256sum -c *.sha256;&lt;br /&gt;
tar xzf alpine-rpi-$VERSION_ID-$ARCH.tar.gz;&lt;br /&gt;
rm alpine-rpi-$VERSION_ID-$ARCH.tar.gz alpine-rpi-$VERSION_ID-$ARCH.tar.gz.sha256;&lt;br /&gt;
sync;&lt;br /&gt;
reboot;}}&lt;br /&gt;
&lt;br /&gt;
5. Test-it !&lt;br /&gt;
{{Cmd|uname -a}}&lt;br /&gt;
&lt;br /&gt;
=== Update local package installations ===&lt;br /&gt;
&lt;br /&gt;
This is done just as at [[#Update local package installations]], above.&lt;br /&gt;
&lt;br /&gt;
== Updating a USB/CF diskless install without setup-bootable ==&lt;br /&gt;
It is possible to update a diskless install of Alpine from another system, or without using the setup-bootable script. This was tested for the 3.13 to the 3.14 upgrade on a Raspberry Pi.&lt;br /&gt;
&lt;br /&gt;
Before starting, update /etc/apk/repositories file to retrieve packages for the new release. Then update all packages with:&lt;br /&gt;
{{Cmd|apk update &amp;amp;&amp;amp; apk upgrade -i -a --update-cache}}&lt;br /&gt;
&lt;br /&gt;
We can then use update-conf to check for changes to configurations from the new packages.&lt;br /&gt;
{{Cmd|# check apk-new config changes&lt;br /&gt;
update-conf -a -l&lt;br /&gt;
update-conf -a&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We now need to prepare to update the kernel and boot materials. To do this, we stop the modloop (which is the loopback mount providing kernel modules) and remount the SD media as read/write.&lt;br /&gt;
&lt;br /&gt;
We can also shutdown the system, eject the media, and perform the next steps on another machine (if so, skip this command block)&lt;br /&gt;
&lt;br /&gt;
{{Cmd|/etc/init.d/modloop stop&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
cd /media/mmcblk0p1&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
At this point, remove all files from the SD media &#039;&#039;&#039;except for /cache, *.apkvol.tar.gz, usercfg.txt, and config.txt&#039;&#039;&#039; Rename config.txt to config.txt.bak temporarily, as extracting the new tar file will overwrite the file.&lt;br /&gt;
&lt;br /&gt;
We can now download the new release and extract it. This example is for an Alpine Raspberry Pi release, so feel free to adjust the URLs for your system. &lt;br /&gt;
&lt;br /&gt;
{{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz.sha256&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.0-aarch64.tar.gz&lt;br /&gt;
sha256sum -c *.sha256&lt;br /&gt;
tar zxf *-aarch64.tar.gz &amp;amp;&amp;amp; sync&lt;br /&gt;
rm alpine-rpi-*&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Restore the original config.txt:&lt;br /&gt;
{{Cmd|mv config.txt.bak config.txt}}&lt;br /&gt;
&lt;br /&gt;
Update the persistent storage using lbu:&lt;br /&gt;
{{Cmd|lbu ci -d}}&lt;br /&gt;
&lt;br /&gt;
We can now reboot, and this should boot into the new kernel. Once this is done, we can clean up and re-download apk caches:&lt;br /&gt;
{{Cmd|mount /media/mmcblk0p1 -o remount,rw&lt;br /&gt;
rm /media/mmcblk0p1/cache/*&lt;br /&gt;
sync &amp;amp;&amp;amp; apk update &amp;amp;&amp;amp; apk cache -v download&lt;br /&gt;
mount /media/mmcblk0p1 -o remount,ro&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=19326</id>
		<title>Upgrading Alpine Linux to a new release branch</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Upgrading_Alpine_Linux_to_a_new_release_branch&amp;diff=19326"/>
		<updated>2021-05-13T10:38:59Z</updated>

		<summary type="html">&lt;p&gt;Yuu: /* Upgrading Alpine Linux on other removable media (such as CF/USB) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page covers upgrading to newer releases.&lt;br /&gt;
&lt;br /&gt;
Doing regular security updates with the package manager is shown at [[Alpine_Linux_package_management#Upgrade_a_Running_System|Upgrading a running system]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before actually upgrading your system, make sure that you have a backup of your important data.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading an Alpine Linux Hard-disk installation ==&lt;br /&gt;
&lt;br /&gt;
=== Upgrading Alpine v2.x to v3.x ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Alpine Linux 3.x switched to a different libc implementation compared to previous versions. Because the new Musl libc is not ABI compatible with uClibc, there are additional steps required for an upgrade.}}&lt;br /&gt;
&lt;br /&gt;
==== Installing statically linked tools ====&lt;br /&gt;
&lt;br /&gt;
Statically linked version of apk-tools is needed, because the old musl version would stop working after a libc change (possibly in the middle of upgrade). Static version of busybox can be handy in case of the recovery from a failure.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add busybox-static apk-tools-static}}&lt;br /&gt;
&lt;br /&gt;
==== Changing repositories to v3.x ====&lt;br /&gt;
&lt;br /&gt;
To begin, you need to update your {{Path|/etc/apk/repositories}} file. Here are some shortcuts for doing so:&lt;br /&gt;
:* Launch {{Cmd|setup-apkrepos}} Enter {{Key|e}} to edit {{Path|/etc/apk/repositories}}. Change the version number by hand.&lt;br /&gt;
:* Or, edit the file in place. This is how you&#039;d change &amp;lt;var&amp;gt;v2.7&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;v3.0&amp;lt;/var&amp;gt;: {{Cmd|sed -i -e &#039;s/&amp;lt;var&amp;gt;v2\.7&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;v3.0&amp;lt;/var&amp;gt;/g&#039; /etc/apk/repositories}}&lt;br /&gt;
&lt;br /&gt;
==== Upgrading system ====&lt;br /&gt;
&lt;br /&gt;
Use statically linked version of apk to update content of repository:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk.static update}}&lt;br /&gt;
&lt;br /&gt;
Simulating upgrade is recommended in order to detect issues beforehand:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk.static upgrade --no-self-upgrade --available --simulate}}&lt;br /&gt;
&lt;br /&gt;
With no problems encountered or after resolving them, start proper upgrade:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk.static upgrade --no-self-upgrade --available}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to latest release ===&lt;br /&gt;
{{:Include:Upgrading to latest release}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading to Edge ===&lt;br /&gt;
{{:Include:Upgrading to Edge}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrading from older versions ===&lt;br /&gt;
&lt;br /&gt;
See [[Upgrading from older versions]].&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on CD ==&lt;br /&gt;
&lt;br /&gt;
You may have an installation where the boot media being used (such as a CD, for example) is separate from the media used to store the configuration information. In this case, simply download the latest ISO, and replace the boot media contents with the contents of the latest ISO. If you are booting from a CD, this would simply mean replacing the CD with a CD made from the new image and rebooting the Alpine Linux box. &lt;br /&gt;
&lt;br /&gt;
=== Update remaining packages from Web repository ===&lt;br /&gt;
&lt;br /&gt;
If you are using [[How_to_enable_APK_caching|APK caching]] you should also perform the following steps.&lt;br /&gt;
{{:Include:Using_Internet_Repositories_for_apk-tools}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re upgrading from a version of Alpine before 2.3.0_rc1, ensure you have the latest available version of the Alpine Linux Package Manager first before upgrading anything else:&lt;br /&gt;
{{Cmd|apk add --upgrade apk-tools}}&lt;br /&gt;
&lt;br /&gt;
Next, upgrade all your packages:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk upgrade --available&lt;br /&gt;
sync}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;--available&amp;lt;/code&amp;gt; switch is used to force all packages to be upgraded, even if they have the same version numbers. Sometimes changes in uClibc require doing this.&lt;br /&gt;
&lt;br /&gt;
After upgrading packages, save any configuration changes (you should have backed up your earlier configuration prior to upgrading).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Upgrading Alpine Linux on other removable media (such as CF/USB) ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are for run-from-RAM Alpine installations running on Compact Flash or USB media. Updating your repositories using [[#Upgrading_an_Alpine_Linux_Hard-disk_installation|the procedures detailed above]], then running:&lt;br /&gt;
{{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
will suffice for some purposes. (If you want the new packages to be used after a reboot, you should [[How_to_enable_APK_caching|enable APK caching]].)&lt;br /&gt;
&lt;br /&gt;
However, this is not an adequate general solution because it won&#039;t honor any kernel upgrades and the like. For the general solution, you&#039;ll need to upgrade your boot medium (Compact Flash or USB). That is what the following steps describe how to do.&lt;br /&gt;
&lt;br /&gt;
{{:Include:Upgrading_Alpine_environmentvars}}&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Operating System ===&lt;br /&gt;
&lt;br /&gt;
Start by checking that you have enough space on your media. For a &#039;&#039;&#039;standard&#039;&#039;&#039; Alpine image, you need at least 400MB available space.&lt;br /&gt;
{{Cmd|df -h {{!}} grep &amp;quot;Filesystem\{{!}}$LBU_MEDIA&amp;quot;}}&lt;br /&gt;
&lt;br /&gt;
==== Download and verify new release ====&lt;br /&gt;
&lt;br /&gt;
Make sure the media that holds your Alpine system is mounted readwrite.&lt;br /&gt;
{{Cmd|mount -oremount,rw /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 2.2.3 or newer&#039;&#039;&#039;: Download the latest release, {{Cmd|wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/&amp;lt;arch&amp;gt;/&amp;lt;image&amp;gt;.iso}} and then use the following command to mount and copy files as needed for you: {{Cmd|setup-bootable -u alpine-extended-&amp;lt;version&amp;gt;-&amp;lt;arch&amp;gt;.iso /media/$LBU_MEDIA}} Once the command completes, proceed to the [[#Save changes|Save changes]] section.&lt;br /&gt;
&lt;br /&gt;
==== For older versions of Alpine ====&lt;br /&gt;
Start downloading a new &#039;.iso&#039; and a &#039;.sha1&#039; file &lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA&lt;br /&gt;
wget -c {{#latestalp:alpine|url}}&lt;br /&gt;
wget {{#latestalp:alpine|url}}.sha1}}&lt;br /&gt;
&lt;br /&gt;
Check integrity of the downloaded files &#039;&#039;(it might take some time)&#039;&#039;:&lt;br /&gt;
{{Cmd|sha1sum -c {{#latestalp:alpine|file}}.sha1}}&lt;br /&gt;
&#039;&#039;The output of the above command should say &#039;OK&#039;.&amp;lt;BR&amp;gt;&#039;&#039;&lt;br /&gt;
&#039;&#039;If says &#039;FAILED&#039;, delete the iso file and download it again.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If using Alpine Linux 1.10.4 or newer&#039;&#039;&#039;: there is a tool &#039;&#039;setup-bootable&#039;&#039; that will mount and copy the image you just downloaded to your boot medium. With this tool simply do: {{Cmd|setup-bootable -u {{#latestalp:alpine|file}} /media/$LBU_MEDIA}}&lt;br /&gt;
&lt;br /&gt;
[[Upgrading from older versions#Upgrading_a_removable_medium_from_Alpine_before_1.10.4|Instructions for older versions of Alpine]] are located elsewhere.&lt;br /&gt;
&lt;br /&gt;
=== Save changes ===&lt;br /&gt;
Now that all upgrades are done, we should save our settings to our media (which you hopefully have backed up prior to doing this upgrade).&lt;br /&gt;
{{Cmd|lbu ci}}&lt;br /&gt;
&lt;br /&gt;
=== Load new kernel ===&lt;br /&gt;
In most cases you will need to reboot Alpine Linux (especially if there are changes in the kernel):&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
&lt;br /&gt;
{{Note|If you know what you are doing, you might not need to reboot. But make sure that all services affected by the upgrade are restarted.}}&lt;br /&gt;
&lt;br /&gt;
=== Update to latest kernel on armhf (eg. Raspberry Pi 0 or 1) ===&lt;br /&gt;
On Alpine 3.X and newer, kernel is not upgraded when using &amp;lt;code&amp;gt;apk upgrade&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;setup-bootable&amp;lt;/code&amp;gt; does not work properly.&lt;br /&gt;
&lt;br /&gt;
If you want to upgrade your kernel, you will need to get it from the latest release, but first you must have and run :&lt;br /&gt;
{{Cmd|apk update; apk version -l &#039;&amp;lt;&#039;;&lt;br /&gt;
apk upgrade;&lt;br /&gt;
lbu ci;}}&lt;br /&gt;
&lt;br /&gt;
So now all your packages are upgraded, you can upgrade your kernel.&lt;br /&gt;
&lt;br /&gt;
1. We need to get some variables :&lt;br /&gt;
{{Cmd|. /etc/os-release;&lt;br /&gt;
. /etc/lbu/lbu.conf;}}&lt;br /&gt;
&lt;br /&gt;
2. You &#039;&#039;&#039;must&#039;&#039;&#039; verify if they are correctly set, using this :&lt;br /&gt;
{{Cmd|echo &amp;quot;alpine version : $VERSION_ID&amp;quot;;&lt;br /&gt;
echo &amp;quot;lbu media : $LBU_MEDIA&amp;quot;;}}&lt;br /&gt;
&lt;br /&gt;
3. And it will output something like this (if not, do not continue this process) :&lt;br /&gt;
{{Cmd|alpine version : 3.13.5&lt;br /&gt;
lbu media : mmcblk0p1}}&lt;br /&gt;
&lt;br /&gt;
4. Then you can run this script :&lt;br /&gt;
{{Cmd|cd /media/$LBU_MEDIA;&lt;br /&gt;
mount -oremount,rw /media/$LBU_MEDIA;&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf/alpine-rpi-$VERSION_ID-armhf.tar.gz;&lt;br /&gt;
wget https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/armhf/alpine-rpi-$VERSION_ID-armhf.tar.gz.sha256;&lt;br /&gt;
sha256sum -c *.sha256;&lt;br /&gt;
tar xzf alpine-rpi-$VERSION_ID-armhf.tar.gz;&lt;br /&gt;
rm alpine-rpi-$VERSION_ID-armhf.tar.gz alpine-rpi-$VERSION_ID-armhf.tar.gz.sha256;&lt;br /&gt;
sync;&lt;br /&gt;
reboot;}}&lt;br /&gt;
&lt;br /&gt;
5. Test-it !&lt;br /&gt;
{{Cmd|uname -a}}&lt;br /&gt;
&lt;br /&gt;
=== Update remaining packages from Web repository ===&lt;br /&gt;
If you are using [[How_to_enable_APK_caching|APK caching]] you should follow the instructions to [[#Update_remaining_packages_from_Web_repository|Update remaining packages from Web repository]], above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Yuu</name></author>
	</entry>
</feed>