Simple script to build archlinux image for my chromebook.
You need to run this script on a aarch64
device. Otherwise you need to change arch-chroot
commands in the script.
Several build dependencies are needed.
- cgpt
- growpart
- btrfs
- tar
- bsdtar
- sed
- wget
- sync
- rmdir
- sgdisk
- losetup
- partprobe
- fdisk
- mkfs (ext4, btrfs)
- rsync
- fallocate
- mkswap
- truncate
Run run.sh
to create rootfs. Then run build_image.sh
to build the image. Finally run flash_disk
to flash the image.
The building directory is in compile/local
.
After boot, you should first run mkinitcpio -g /boot/initrd.img-6.9.7-stb-cbq
to create the initramfs.
The network should be ready. Use nmtui
to connect to wifi.
You could run some scripts in /scripts
.