3 # SPDX-License-Identifier: MIT
15 export DEBOOTSTRAP
=debootstrap
23 sudo eatmydata
${DEBOOTSTRAP} --cache-dir=`pwd`/cache
--arch=arm64
--include initramfs-tools
,pciutils
,wpasupplicant
,tcpdump
,vim
,tmux
,vlan
,ntpdate
,parted
,curl
,wget
,grub-efi-arm64
,mtr-tiny
,dbus
,ca-certificates
,sudo
,openssh-client
,mtools
,gdisk
,cryptsetup testing testing http
://deb.debian.org
/debian
27 sudo mkdir
-p boot
/efi
/m1n1
29 sudo bash
-c 'echo debian > etc/hostname'
31 sudo bash
-c 'echo > etc/motd'
33 sudo
cp ..
/..
/files
/sources.list etc
/apt
/sources.list
34 sudo
cp ..
/..
/files
/glanzmann.list etc
/apt
/sources.list.d
/
35 sudo
cp ..
/..
/files
/thomas-glanzmann.gpg etc
/apt
/trusted.gpg.d
/
36 sudo
cp ..
/..
/files
/hosts etc
/hosts
37 sudo
cp ..
/..
/files
/resolv.conf etc
/resolv.conf
38 sudo
cp ..
/..
/files
/quickstart.txt root
/
39 sudo
cp ..
/..
/files
/interfaces etc
/network
/interfaces
40 sudo
cp ..
/..
/files
/wpa.conf etc
/wpa_supplicant
/wpa_supplicant.conf
41 sudo
cp ..
/..
/files
/rc.
local etc
/rc.
local
43 sudo bash
-c 'chroot . apt update'
44 sudo bash
-c 'chroot . apt install -y firmware-linux'
46 sudo
-- perl
-p -i -e 's/root:x:/root::/' etc
/passwd
48 sudo
-- ln -s lib
/systemd
/systemd init
50 sudo chroot . apt update
51 sudo chroot . apt
install -y m1n1 linux-image-asahi
53 sudo bash
-c 'chroot . apt-get clean'
61 mkdir
-p live-stick
/efi
/boot live-stick
/efi
/debian
/
62 sudo
cp ..
/files
/wifi.pl testing
/etc
/rc.
local
63 sudo bash
-c 'cd testing; find . | cpio --quiet -H newc -o | pigz -9 > ../live-stick/initrd.gz'
64 cp testing
/usr
/lib
/grub
/arm64-efi
/monolithic
/grubaa64.efi live-stick
/efi
/boot
/bootaa64.efi
65 cp testing
/boot
/vmlinuz
* live-stick
/vmlinuz
66 cp ..
/files
/grub.cfg live-stick
/efi
/debian
/grub.cfg
67 (cd live-stick
; tar cf ..
/asahi-debian-live.
tar .
)
75 mkdir
-p EFI
/boot EFI
/debian
76 cp testing
/usr
/lib
/grub
/arm64-efi
/monolithic
/grubaa64.efi EFI
/boot
/bootaa64.efi
78 export INITRD
=`ls -1 testing/boot/ | grep initrd`
79 export VMLINUZ
=`ls -1 testing/boot/ | grep vmlinuz`
80 export UUID
=`blkid -s UUID -o value media`
81 cat > EFI
/debian
/grub.cfg
<<EOF
82 search.fs_uuid ${UUID} root
83 linux (\$root)/boot/${VMLINUZ} root=UUID=${UUID} rw
84 initrd (\$root)/boot/${INITRD}
91 build_asahi_installer_image
()
97 cp testing
/boot
/esp
/m1n
1/boot.bin aii
/esp
/m1n
1/boot.bin
100 zip -r9 ..
/debian-base.
zip esp media
106 sudo
cp efi.tgz asahi-debian-live.
tar debian-base.
zip /u
/
112 sudo apt-get
install -y build-essential bash git locales gcc-aarch64-linux-gnu libc6-dev device-tree-compiler imagemagick ccache eatmydata debootstrap pigz libncurses-dev qemu-user-static binfmt-support rsync git flex bison
bc kmod
cpio libncurses5-dev libelf-dev
:native libssl-dev dwarves
119 build_asahi_installer_image