void-mklive icon indicating copy to clipboard operation
void-mklive copied to clipboard

add asahi to image builder

Open dkwo opened this issue 3 years ago • 31 comments

Based on https://github.com/void-linux/void-packages/pull/39796 and tested.

xi -S qemu-user-static lz4 xz
doas ./mkrootfs.sh aarch64
doas ./mkplatformfs.sh -r ../void-packages/hostdir/binpkgs/asahi/ asahi void-aarch64-ROOTFS-20220916.tar.xz
doas ./mkimage.sh void-asahi-PLATFORMFS-20220916.tar.xz
doas xz -d void-asahi-20220916.img.xz
doas dd if=void-asahi-20220916.img of=/dev/sda bs=4M status=progress
xbps-rindex -a *.xbps
xbps-install --repository=$PWD pkgname

Boots from an external drive via UEFI, after using Asahi Linux install script with "UEFI environment only". See README.voidlinux in asahi-base of that PR for details.

dkwo avatar Sep 16 '22 21:09 dkwo

I wish I had access to an M1 to test this.

Vaelatern avatar Sep 17 '22 00:09 Vaelatern

After doing

doas xz -d void-asahi-20220916.img.xz
doas dd if=void-asahi-20220916.img of=/dev/sda bs=4M status=progress

it can boot the void kernel :)

dkwo avatar Sep 27 '22 19:09 dkwo

While support packages are still in PR, is there a simple way to install them by modifying # XBPS_ARCH=$ARCH xbps-install -S -r /mnt -R "$REPO" base-system to something like # XBPS_ARCH=$ARCH xbps-install -S -r /mnt -R "$REPO" base-system -R ??? asahi-base The booted USB stick has those packages installed, so I'm hoping this is possible. @Duncaen

dkwo avatar Oct 05 '22 20:10 dkwo

yes, use the -r flag of mkplatformfs to point it at hostdir/binpkgs/[branch]

classabbyamp avatar Oct 05 '22 20:10 classabbyamp

@classabbyamp I've done that (see my fist comment), now I'm trying to install them from the booted image into the chroot. Did I miss something?

dkwo avatar Oct 05 '22 20:10 dkwo

oh, for that you'll need to sign the packages and serve them with an http server probably

classabbyamp avatar Oct 05 '22 20:10 classabbyamp

This now works in conjunction with https://github.com/void-linux/void-packages/pull/39796

dkwo avatar Oct 07 '22 18:10 dkwo

Simple solution for the local repo, as suggested by @Duncaen on reddit in the past:

xbps-rindex -a *.xbps
xbps-install --repository=$PWD pkgname

dkwo avatar Oct 07 '22 19:10 dkwo

@dkwo Hi! Thank you for your work. How can I DM you?

ZerdoX-x avatar Oct 16 '22 22:10 ZerdoX-x

@ZerdoX-x I don't use irc much. All I did is documented in this PR, and the two linked ones. You can ask or report here if you encounter any issues.

dkwo avatar Oct 17 '22 14:10 dkwo

@ZerdoX-x I don't use irc much. All I did is documented in this PR, and the two linked ones. You can ask or report here if you encounter any issues.

I just wanted to know if it is possible to install void linux on M1. I installed the default Asahi linux and cannot handle it due to systemd, literally bullshit. But I don't have much technical experience manually installing a custom distro on Asahi without clear instructions from anyone who already did this.

ZerdoX-x avatar Oct 17 '22 14:10 ZerdoX-x

It is possible, but at the moment you'd have to build things yourself, since the relevant PRs have not yet been merged into Void's repo. For this, you may need to gain some familiarity with how Void works, as well as read Asahi documentation. Otherwise, you can wait until things are more mature.

dkwo avatar Oct 17 '22 14:10 dkwo

@dkwo Yep.. I understand. This is why I've wanted someone's help or even pay someone for clear instructions and providing support for me

ZerdoX-x avatar Oct 18 '22 18:10 ZerdoX-x

idk how asahi install process works but i have something for live isos on arm in the works (it isn't ready for testing, please don't go looking for it to try yet)

classabbyamp avatar May 23 '24 14:05 classabbyamp

Got it. The first step is done from mac os, the rest is written in my first post here. I.e. the thing you'd flash on the usb /dev/sda is already a live image, just produced locally.

dkwo avatar May 23 '24 14:05 dkwo

i mean live iso in the x86 style, with an overlayfs root and such

classabbyamp avatar May 23 '24 14:05 classabbyamp

@dkwo @classabbyamp I've built a rudimentary installer based on the official Asahi installer here: https://gitlab.com/slimjimsoftware/vai - this should allow you install Void from a macOS terminal with curl -L https://tinyurl.com/void-asahi | sh - If anyone wants to try it then feedback would be appreciated.

slimjimsoftware avatar May 28 '24 23:05 slimjimsoftware

Great! In the past @ZerdoX-x was asking for a simple way to install, maybe this can help.

dkwo avatar May 29 '24 13:05 dkwo

Great! In the past @ZerdoX-x was asking for a simple way to install, maybe this can help.

Yep, thank you. I've subscribed to this PR long time ago and waiting for updates :)

BTW I've moved to gentoo and compile all stuff locally. ~~Don't think void can be a daily runner for M1 due to lack of binary packages for aarch64. Same for arch and all binary based PM~~

ZerdoX-x avatar Jun 06 '24 17:06 ZerdoX-x

Don't think void can be a daily runner for M1 due to lack of binary packages for aarch64

what do you mean? void builds binary packages for aarch64...

classabbyamp avatar Jun 06 '24 17:06 classabbyamp

void builds binary packages for aarch64...

oof. my bad! then i can consider this a good alternative for me. i'll keep an eye on void then ;) sorry for the confusion!

ZerdoX-x avatar Jun 06 '24 17:06 ZerdoX-x