Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49a09fde05 | ||
|
|
f3962422c8 | ||
|
|
ee36e3c711 | ||
|
|
cca3b21d35 | ||
|
|
75c33e073e |
@@ -896,11 +896,6 @@ needs_full_build() {
|
|||||||
[ -f "${FULL_BUILD_MARKER}" ] || return 0
|
[ -f "${FULL_BUILD_MARKER}" ] || return 0
|
||||||
[ -f "${BUILD_WORK_DIR}/binary/live/filesystem.squashfs" ] || return 0
|
[ -f "${BUILD_WORK_DIR}/binary/live/filesystem.squashfs" ] || return 0
|
||||||
[ -f "${BUILD_WORK_DIR}/live-image-amd64.hybrid.iso" ] || return 0
|
[ -f "${BUILD_WORK_DIR}/live-image-amd64.hybrid.iso" ] || return 0
|
||||||
_extra_sq=$(find "${BUILD_WORK_DIR}/binary/live" -maxdepth 1 -type f -name '*.squashfs' ! -name 'filesystem.squashfs' 2>/dev/null | head -1)
|
|
||||||
if [ -n "$_extra_sq" ]; then
|
|
||||||
echo "=== full build required: multi-squashfs live image present ==="
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
_heavy=$(find \
|
_heavy=$(find \
|
||||||
"${BUILDER_DIR}/VERSIONS" \
|
"${BUILDER_DIR}/VERSIONS" \
|
||||||
@@ -933,7 +928,7 @@ fast_path_repack_squashfs() {
|
|||||||
echo "=== fast-path: repacking squashfs ==="
|
echo "=== fast-path: repacking squashfs ==="
|
||||||
_sq_new="${_sq}.new"
|
_sq_new="${_sq}.new"
|
||||||
rm -f "$_sq_new"
|
rm -f "$_sq_new"
|
||||||
mksquashfs "$_tmp" "$_sq_new" -comp zstd -b 1048576 -noappend -no-progress
|
mksquashfs "$_tmp" "$_sq_new" -comp zstd -b 1048576 -noappend -no-progress -no-xattrs
|
||||||
mv "$_sq_new" "$_sq"
|
mv "$_sq_new" "$_sq"
|
||||||
rm -rf "$_tmp"
|
rm -rf "$_tmp"
|
||||||
echo "=== fast-path: squashfs repacked ($(du -sh "$_sq" | cut -f1)) ==="
|
echo "=== fast-path: squashfs repacked ($(du -sh "$_sq" | cut -f1)) ==="
|
||||||
@@ -986,7 +981,6 @@ split_live_squashfs_layers() {
|
|||||||
tmp_root="$(mktemp -d)"
|
tmp_root="$(mktemp -d)"
|
||||||
tmp_usr="$(mktemp -d)"
|
tmp_usr="$(mktemp -d)"
|
||||||
tmp_fw="$(mktemp -d)"
|
tmp_fw="$(mktemp -d)"
|
||||||
trap 'rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw"' RETURN
|
|
||||||
|
|
||||||
echo "=== splitting live squashfs into smaller layers ==="
|
echo "=== splitting live squashfs into smaller layers ==="
|
||||||
unsquashfs -d "$tmp_root/root" "$base_sq" >/dev/null
|
unsquashfs -d "$tmp_root/root" "$base_sq" >/dev/null
|
||||||
@@ -998,22 +992,21 @@ split_live_squashfs_layers() {
|
|||||||
move_tree_to_layer "$tmp_root/root" "boot/firmware" "$tmp_fw/root"
|
move_tree_to_layer "$tmp_root/root" "boot/firmware" "$tmp_fw/root"
|
||||||
|
|
||||||
rm -f "$usr_sq" "$fw_sq"
|
rm -f "$usr_sq" "$fw_sq"
|
||||||
mksquashfs "$tmp_root/root" "${base_sq}.new" -comp zstd -b 1048576 -noappend -no-progress >/dev/null
|
mksquashfs "$tmp_root/root" "${base_sq}.new" -comp zstd -b 1048576 -noappend -no-progress -no-xattrs >/dev/null
|
||||||
mv "${base_sq}.new" "$base_sq"
|
mv "${base_sq}.new" "$base_sq"
|
||||||
|
|
||||||
if dir_has_entries "$tmp_usr/root"; then
|
if dir_has_entries "$tmp_usr/root"; then
|
||||||
mksquashfs "$tmp_usr/root" "${usr_sq}.new" -comp zstd -b 1048576 -noappend -no-progress >/dev/null
|
mksquashfs "$tmp_usr/root" "${usr_sq}.new" -comp zstd -b 1048576 -noappend -no-progress -no-xattrs >/dev/null
|
||||||
mv "${usr_sq}.new" "$usr_sq"
|
mv "${usr_sq}.new" "$usr_sq"
|
||||||
fi
|
fi
|
||||||
if dir_has_entries "$tmp_fw/root"; then
|
if dir_has_entries "$tmp_fw/root"; then
|
||||||
mksquashfs "$tmp_fw/root" "${fw_sq}.new" -comp zstd -b 1048576 -noappend -no-progress >/dev/null
|
mksquashfs "$tmp_fw/root" "${fw_sq}.new" -comp zstd -b 1048576 -noappend -no-progress -no-xattrs >/dev/null
|
||||||
mv "${fw_sq}.new" "$fw_sq"
|
mv "${fw_sq}.new" "$fw_sq"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=== live squashfs layers ==="
|
echo "=== live squashfs layers ==="
|
||||||
find "$live_dir" -maxdepth 1 -type f -name '*.squashfs' -exec du -sh {} \; | sort
|
find "$live_dir" -maxdepth 1 -type f -name '*.squashfs' -exec du -sh {} \; | sort
|
||||||
rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw"
|
rm -rf "$tmp_root" "$tmp_usr" "$tmp_fw"
|
||||||
trap - RETURN
|
|
||||||
}
|
}
|
||||||
|
|
||||||
recover_iso_memtest() {
|
recover_iso_memtest() {
|
||||||
@@ -1686,8 +1679,8 @@ cd "${LB_DIR}"
|
|||||||
run_step_sh "live-build clean" "80-lb-clean" "lb clean --all 2>&1 | tail -3"
|
run_step_sh "live-build clean" "80-lb-clean" "lb clean --all 2>&1 | tail -3"
|
||||||
run_step_sh "live-build config" "81-lb-config" "lb config 2>&1 | tail -5"
|
run_step_sh "live-build config" "81-lb-config" "lb config 2>&1 | tail -5"
|
||||||
dump_memtest_debug "pre-build" "${LB_DIR}"
|
dump_memtest_debug "pre-build" "${LB_DIR}"
|
||||||
|
export MKSQUASHFS_OPTIONS="-no-xattrs"
|
||||||
run_step_sh "live-build build" "90-lb-build" "lb build 2>&1"
|
run_step_sh "live-build build" "90-lb-build" "lb build 2>&1"
|
||||||
split_live_squashfs_layers "${LB_DIR}"
|
|
||||||
echo "=== enforcing canonical bootloader assets ==="
|
echo "=== enforcing canonical bootloader assets ==="
|
||||||
enforce_live_build_bootloader_assets "${LB_DIR}"
|
enforce_live_build_bootloader_assets "${LB_DIR}"
|
||||||
reset_live_build_stage "${LB_DIR}" "binary_checksums"
|
reset_live_build_stage "${LB_DIR}" "binary_checksums"
|
||||||
|
|||||||
Reference in New Issue
Block a user