add a way to prevent a layer (and descendants) from being made into a sqashfs

for the live server build, i want to make a layer to install the kernel
into but do not want the layer itself to be published.

the implementation is a bit clunky but it works.
bdmurray/intel-iot-models
Michael Hudson-Doyle 4 years ago
parent e4ca30e351
commit fb8af1fd80

@ -1023,6 +1023,9 @@ echo "IMAGEFORMAT=\"$IMAGEFORMAT\"" >> config/chroot
if [ -n "$PASSES" ]; then if [ -n "$PASSES" ]; then
echo "PASSES=\"$PASSES\"" >> config/common echo "PASSES=\"$PASSES\"" >> config/common
fi fi
if [ -n "$NO_SQUASHFS_PASSES" ]; then
echo "NO_SQUASHFS_PASSES=\"$NO_SQUASHFS_PASSES\"" >> config/common
fi
if [ -n "$LIVE_PASSES" ]; then if [ -n "$LIVE_PASSES" ]; then
echo "LIVE_PASSES=\"$LIVE_PASSES\"" >> config/common echo "LIVE_PASSES=\"$LIVE_PASSES\"" >> config/common
fi fi

@ -92,6 +92,22 @@ build_layered_squashfs () {
rm -f chroot/boot/initrd.img-* chroot/boot/vmlinu{x,z}-* rm -f chroot/boot/initrd.img-* chroot/boot/vmlinu{x,z}-*
fi fi
make_squashfs=yes
ppass="${pass}"
while :; do
for nsp in ${NO_SQUASHFS_PASSES}; do
if [ "${ppass}" = "${nsp}" ]; then
make_squashfs=no
break 2
fi
done
ppass="$(get_parent_pass "${ppass}")"
if [ -z "${ppass}" ]; then
break
fi
done
if [ $make_squashfs = yes ]; then
# Full manifest until that PASS # Full manifest until that PASS
squashfs_f_manifest="${base}.manifest" squashfs_f_manifest="${base}.manifest"
create_manifest "chroot" "${squashfs_f_manifest}.full" create_manifest "chroot" "${squashfs_f_manifest}.full"
@ -121,7 +137,8 @@ build_layered_squashfs () {
cp "${squashfs_f_manifest}.full" "${prefix}.manifest" cp "${squashfs_f_manifest}.full" "${prefix}.manifest"
fi fi
create_squashfs "overlay.${pass}" ${squashfs_f} create_squashfs "overlay.${pass}/" ${squashfs_f}
fi
if [ -n "$lowerdirs" ]; then if [ -n "$lowerdirs" ]; then
umount chroot umount chroot

Loading…
Cancel
Save