Skip to content

Commit 34578f5

Browse files
authored
refactor(builder): clean unused codes (#58)
- no need to install kernel, we use kernel form alpine upstream - run_cmd_in_rootfs func not been used for now
1 parent f9f07ff commit 34578f5

File tree

3 files changed

+2
-124
lines changed

3 files changed

+2
-124
lines changed

subfunc/install_kernel.sh

-112
This file was deleted.

target_builder/macos_amd64

+1-6
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ proot_args+=("-w" "/root")
4949
rootfs_part_uuid="4f1bfa20-73e8-4885-ab4b-1f9e67332f79"
5050
efi_part_uuid="F41A-23A6"
5151

52-
run_cmd_in_rootfs() {
53-
echo "Run cmd $*"
54-
sudo -E proot "${proot_args[@]}" \
55-
-0 /bin/su -c "$*"
56-
}
5752

5853
mount_image() {
5954
kpartx -av "$bootable_img"
@@ -137,7 +132,7 @@ pack_rootfs() {
137132
echo "pack rootfs"
138133
losetup -a
139134
cd "$output"
140-
zstd --stdout --force "$bootable_img" >"$bootable_img_zst"
135+
zstd -10 --stdout --force "$bootable_img" >"$bootable_img_zst"
141136
sha256sum "$bootable_img_zst" | tee "$bootable_img_zst.sha256sum"
142137
cd "$workspace"
143138
}

target_builder/macos_arm64

+1-6
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ proot_args+=("-w" "/root")
4949
rootfs_part_uuid="d1e46927-eb5d-4fbf-986a-7e5581f37a16"
5050
efi_part_uuid="6729-82AB"
5151

52-
run_cmd_in_rootfs() {
53-
echo "Run cmd $*"
54-
sudo -E proot "${proot_args[@]}" \
55-
-0 /bin/su -c "$*"
56-
}
5752

5853
mount_image() {
5954
kpartx -av "$bootable_img"
@@ -137,7 +132,7 @@ pack_rootfs() {
137132
echo "pack rootfs"
138133
losetup -a
139134
cd "$output"
140-
zstd --stdout --force "$bootable_img" >"$bootable_img_zst"
135+
zstd -10 --stdout --force "$bootable_img" >"$bootable_img_zst"
141136
sha256sum "$bootable_img_zst" | tee "$bootable_img_zst.sha256sum"
142137
cd "$workspace"
143138
}

0 commit comments

Comments
 (0)