From 51038d24f30868ffb14beb6d3cd76a6534495b07 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 13 Sep 2023 17:21:01 +0200 Subject: [PATCH] WIP --- .github/workflows/ci.yml | 2 +- README.adoc | 25 ++++++++++++++++++++++++- example/repositories | 1 + 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63bc3c9..f5c2e03 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,7 +65,7 @@ jobs: --image-format qcow2 \ --image-size 2G \ --repositories-file example/repositories \ - --packages "$(cat example/packages)" \ + --packages "$(cat example/packages) linux-virt@edge" \ --fs-skel-dir example/rootfs \ --fs-skel-chown root:root \ --script-chroot \ diff --git a/README.adoc b/README.adoc index 5f7436d..51893ae 100644 --- a/README.adoc +++ b/README.adoc @@ -17,7 +17,7 @@ TIP: Don’t need VM, just wanna chroot into Alpine Linux? Or do you want to create a custom rootfs? Then https://github.com/alpinelinux/alpine-make-rootfs[alpine-make-rootfs] is for you! -IMPORTANT: aarch64 currently only works with the kernel (linux-virt or linux-lts) from Alpine edge! See https://gitlab.alpinelinux.org/alpine/aports/-/issues/15263[alpine/aports#15263] for more information. +IMPORTANT: aarch64 currently only works with the kernel (linux-virt or linux-lts) from Alpine edge! See <> for more information and a workaround. == Requirements @@ -51,6 +51,29 @@ Or, if you are on Alpine Linux, you can simply install the https://pkgs.alpineli == Howtos +[[aarch64-v3.18]] +=== Create Alpine v3.18 (latest-stable) image for aarch64 + +The Linux kernel (_linux-virt_, _linux-lts_ or _linux-edge_ package) in Alpine v3.18 and earlier doesn’t have https://cateee.net/lkddb/web-lkddb/EFI_ZBOOT.html[EFI_ZBOOT] enabled, so EFI stub cannot load a compressed vmlinuz. +We backported it to v3.18, but then we had to revert it due to a problem with Grub (see https://gitlab.alpinelinux.org/alpine/aports/-/issues/15263[alpine/aports#15263]). + +If you want to build an image with a stable branch of Alpine Linux, you can, but you must install the kernel from the edge branch. +This is relatively safe because the kernel package doesn’t have any dynamic dependencies and the version in v3.18 and edge will be in sync at least until v3.19 is released. + +. Create a `repositories` file with a pinned main repository from edge, e.g.: ++ +[source] +---- +@edge https://dl-cdn.alpinelinux.org/alpine/edge/main +https://dl-cdn.alpinelinux.org/alpine/v3.18/main +https://dl-cdn.alpinelinux.org/alpine/v3.18/community +---- + +. Run {script-name} with the options `--repositories-file ./repositories` and `--packages linux-virt@edge` (or `linux-lts@edge` if you use `--kernel-flavor lts`). + +This will first install _linux-virt_ from v3.18, but in the later step it will reinstall it from the edge branch. + + === Create images for aarch64 on x86_64 host All you need to do is install the https://www.qemu.org/docs/master/user/main.html[QEMU User space emulator] for aarch64 and register it in https://docs.kernel.org/admin-guide/binfmt-misc.html[binfmt_misc] as the interpreter for aarch64 binaries. diff --git a/example/repositories b/example/repositories index 8c3ca09..4f5350b 100644 --- a/example/repositories +++ b/example/repositories @@ -1,2 +1,3 @@ +@edge http://dl-cdn.alpinelinux.org/alpine/edge/main http://dl-cdn.alpinelinux.org/alpine/latest-stable/main http://dl-cdn.alpinelinux.org/alpine/latest-stable/community