Skip to content

Commit

Permalink
supports multiple branches
Browse files Browse the repository at this point in the history
Signed-off-by: John Sanpe <[email protected]>
  • Loading branch information
sanpeqf committed Oct 10, 2023
1 parent 1a11312 commit 7114165
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,22 @@ function prepare_rootfs()
mkdir -p $rootfs
mount -o loop $rootimg $rootfs
bsdtar -xpf $rootpack -C $rootfs
sync
}

function config_rootfs()
{
chrootdo="arch-chroot $rootfs qemu-aarch64-static /bin/bash -c"
cp -p /usr/bin/qemu-aarch64-static $rootfs/bin/qemu-aarch64-static

$chrootdo "pacman-key --init"
$chrootdo "pacman-key --populate archlinuxarm"

$chrootdo "pacman --noconfirm -Syyu"
$chrootdo "pacman --noconfirm -S archlinux-keyring"
$chrootdo "pacman --noconfirm -S networkmanager"
$chrootdo "pacman --noconfirm -R linux linux-firmware"

rm $rootfs/bin/qemu-aarch64-static
}

function pack_rootfs()
Expand All @@ -91,8 +106,9 @@ mkdir -p build
prepare_rootfs
build_lk2nd
build_linux

make_boot
make_image

config_rootfs
pack_rootfs
generate_checksum

0 comments on commit 7114165

Please sign in to comment.