mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 15:11:19 +02:00
build_sysext: fix hard-coded arch, add -noappend
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This commit is contained in:
parent
190fd2c38e
commit
657a276cc2
13
build_sysext
13
build_sysext
@ -14,15 +14,15 @@ SCRIPT_ROOT=$(dirname "$(readlink -f "$0")")
|
|||||||
assert_inside_chroot
|
assert_inside_chroot
|
||||||
assert_root_user
|
assert_root_user
|
||||||
|
|
||||||
default_squashfs_base="$(readlink -f "${SCRIPT_ROOT}/../build/images/amd64-usr/latest/${FLATCAR_PRODUCTION_IMAGE_SYSEXT_BASE}")"
|
default_squashfs_template="$(readlink -f "${SCRIPT_ROOT}/../build/images")/<BOARD>/latest/${FLATCAR_PRODUCTION_IMAGE_SYSEXT_BASE}"
|
||||||
|
|
||||||
# All these are used to set up the 'BUILD_DIR' variable
|
# All these are used to set up the 'BUILD_DIR' variable
|
||||||
DEFINE_string board "${DEFAULT_BOARD}" \
|
DEFINE_string board "${DEFAULT_BOARD}" \
|
||||||
"The board to build a sysext for."
|
"The board to build a sysext for."
|
||||||
DEFINE_string metapkgs '' \
|
DEFINE_string metapkgs '' \
|
||||||
"Comma-separated list of meta-packages to build from source and install into sysext image."
|
"Comma-separated list of meta-packages to build from source and install into sysext image."
|
||||||
DEFINE_string squashfs_base "${default_squashfs_base}" \
|
DEFINE_string squashfs_base '' \
|
||||||
"The path to the squashfs base image. Defaults to the most current image built."
|
"The path to the squashfs base image. Defaults to the most current image built in '${default_squashfs_template}'."
|
||||||
DEFINE_string manglefs_script '' \
|
DEFINE_string manglefs_script '' \
|
||||||
"A path to executable that will customize the rootfs of the sysext image."
|
"A path to executable that will customize the rootfs of the sysext image."
|
||||||
DEFINE_boolean ignore_version_mismatch "${FLAGS_FALSE}" \
|
DEFINE_boolean ignore_version_mismatch "${FLAGS_FALSE}" \
|
||||||
@ -87,8 +87,11 @@ if [[ -z "${SYSEXTNAME}" ]]; then
|
|||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
if [[ -z "$FLAGS_squashfs_base" ]] ; then
|
||||||
|
FLAGS_squashfs_base="$(readlink -f "${SCRIPT_ROOT}/../build/images/${FLAGS_board}/latest/${FLATCAR_PRODUCTION_IMAGE_SYSEXT_BASE}")"
|
||||||
|
fi
|
||||||
if [[ ! -f "${FLAGS_squashfs_base}" ]] ; then
|
if [[ ! -f "${FLAGS_squashfs_base}" ]] ; then
|
||||||
die "Squashfs base '${FLAGS_squashfs_base}' not found."
|
die "Squashfs base '${FLAGS_squashfs_base}' not found."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "${BUILD_LIBRARY_DIR}/toolchain_util.sh" || exit 1
|
source "${BUILD_LIBRARY_DIR}/toolchain_util.sh" || exit 1
|
||||||
@ -197,7 +200,7 @@ all_fields=(
|
|||||||
"ARCHITECTURE=${ARCH}"
|
"ARCHITECTURE=${ARCH}"
|
||||||
)
|
)
|
||||||
printf '%s\n' "${all_fields[@]}" >"${BUILD_DIR}/install-root/usr/lib/extension-release.d/extension-release.${SYSEXTNAME}"
|
printf '%s\n' "${all_fields[@]}" >"${BUILD_DIR}/install-root/usr/lib/extension-release.d/extension-release.${SYSEXTNAME}"
|
||||||
mksquashfs "${BUILD_DIR}/install-root" "${BUILD_DIR}/${SYSEXTNAME}.raw"
|
mksquashfs "${BUILD_DIR}/install-root" "${BUILD_DIR}/${SYSEXTNAME}.raw" -noappend
|
||||||
rm -rf "${BUILD_DIR}"/{fs-root,install-root,workdir}
|
rm -rf "${BUILD_DIR}"/{fs-root,install-root,workdir}
|
||||||
|
|
||||||
# Generate reports
|
# Generate reports
|
||||||
|
Loading…
x
Reference in New Issue
Block a user