Skip to content

Commit

Permalink
cwt21
Browse files Browse the repository at this point in the history
  • Loading branch information
cwt committed Mar 21, 2024
1 parent 3b9b989 commit 77df3b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
13 changes: 10 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ GITHUB=https://github.com
DATA=/data

# Build parameters
BUILD=cwt20
BUILD=cwt21
KERNEL=5.15.2
SF_VERSION=v5.10.3
SF_VERSION=v5.11.3
SF_TAG=JH7110_VF2_515_${SF_VERSION}
SF_RELEASE_URL=${GITHUB}/starfive-tech/VisionFive2/releases/download
ROOTFS=https://riscv.mirror.pkgbuild.com/images/archriscv-2023-12-13.tar.zst
Expand Down Expand Up @@ -125,14 +125,18 @@ done
sudo umount ${TARGET}

# Remount all subvolumes
VOLUMES="@:${TARGET} @home:${TARGET}/home @pkg:${TARGET}/var/cache/pacman/pkg\
VOLUMES="@:${TARGET} @home:${TARGET}/home\
@log:${TARGET}/var/log @snapshots:${TARGET}/.snapshots"
for volume in ${VOLUMES}; do
IFS=: read -r subvol mnt <<< ${volume}
sudo mkdir -p ${mnt}
sudo mount -o discard=async,compress=lzo,subvol=${subvol} ${LOOP}p4 ${mnt}
done

# Mount packages cache as tmpfs
sudo mkdir -p ${TARGET}/var/cache/pacman/pkg
sudo mount -t tmpfs tmpfs ${TARGET}/var/cache/pacman/pkg

# Mount /boot and install StarFive u-boot config
sudo mkdir -p ${TARGET}/boot
sudo mount -o discard ${LOOP}p3 ${TARGET}/boot
Expand All @@ -147,6 +151,9 @@ sudo tar -C ${TARGET} --zstd -xf ${DATA}/rootfs.tar.zst
sudo mkdir -p ${TARGET}/root/pkgs
sudo cp ${DATA}/pkgs/* ${TARGET}/root/pkgs

# Disable microcode hook
sudo install -o root -g root -D -m 644 configs/no-microcode-hook.conf ${TARGET}/etc/mkinitcpio.conf.d/no-microcode-hook.conf

# Update and install packages via arch-chroot
sudo arch-chroot ${TARGET} pacman -Syu --noconfirm
sudo arch-chroot ${TARGET} pacman -S ${PACKAGES} --needed --noconfirm --ask=4
Expand Down
1 change: 1 addition & 0 deletions configs/no-microcode-hook.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HOOKS=(base udev autodetect modconf kms keyboard keymap consolefont block filesystems fsck)

0 comments on commit 77df3b7

Please sign in to comment.