diff options
Diffstat (limited to 'builder/modules.d')
5 files changed, 31 insertions, 15 deletions
diff --git a/builder/modules.d/dnbd3-rootfs/helper/build.inc b/builder/modules.d/dnbd3-rootfs/helper/build.inc index bb992de1..2410c633 100644 --- a/builder/modules.d/dnbd3-rootfs/helper/build.inc +++ b/builder/modules.d/dnbd3-rootfs/helper/build.inc @@ -19,8 +19,8 @@ build_initialize_components() { logging.info "Could not find dnbd3, building it..." if ! CMAKE_FLAGS="-DKERNEL_DIR=${kernel_headers}" \ build_compile_dnbd3 "${_deps_base_dir}/dnbd3/"; then - logging.error "Failed to build dnbd3." - return 1 + logging.error "Failed to build dnbd3." + return 1 fi fi # take care of the qcow handler @@ -181,10 +181,15 @@ build_compile_dnbd3() { # NOTE: The generic way would be: "./build.sh" but this tries to build # more than we really need and takes more time. mkdir --parents build - pushd build + cd build # Inject CMAKE_FLAGS as a way to control how cmake is called, # e.g. to pass the kernel version - cmake ${CMAKE_FLAGS} ../ + cmake ${CMAKE_FLAGS} \ + -DBUILD_FUSE_CLIENT=OFF \ + -DBUILD_KERNEL_MODULE=ON \ + -DBUILD_SERVER=OFF \ + -DBUILD_STRESSTEST=OFF \ + ../ make -j dnbd3 dnbd3-client local ret=$? popd diff --git a/builder/modules.d/dnbd3-rootfs/module-setup.sh b/builder/modules.d/dnbd3-rootfs/module-setup.sh index 63bb0b29..c2fea3b2 100755 --- a/builder/modules.d/dnbd3-rootfs/module-setup.sh +++ b/builder/modules.d/dnbd3-rootfs/module-setup.sh @@ -68,7 +68,10 @@ clean() { } # region dracut plugin api check() { - build_initialize_components + if ! build_initialize_components; then + echo "Failed to initialize components." + return 1 + fi # NOTE: xmount must be compiled before qemu_xmount local xmount_is_built=true if [[ ! -f "$moddir/binaries/xmount/trunk/build/src/xmount" ]] || @@ -118,10 +121,15 @@ installkernel() { inst "${moddir}/binaries/dnbd3/build/dnbd3.ko" "${block_kmod_dir}/dnbd3.ko" # kqcow2 kernel - mkdir -p "${initdir}/${block_kmod_dir}/loop" - for kmod in "${moddir}/binaries/kernel-qcow2-linux/drivers/block/loop/"*.ko ; do - inst "$kmod" "${block_kmod_dir}/loop/$(basename $kmod)" - done + local kqcow_loop_kmod_dir="${moddir}/binaries/kernel-qcow2-linux/drivers/block/loop" + if [ -e "${kqcow_loop_kmod_dir}/loop.ko" ] && \ + [ -e "${kqcow_loop_kmod_dir}/loop_file_fmt_raw.ko" ] && \ + [ -e "${kqcow_loop_kmod_dir}/loop_file_fmt_qcow.ko" ]; then + mkdir -p "${initdir}/${block_kmod_dir}/loop" + for kmod in "${kqcow_loop_kmod_dir}/"*.ko ; do + inst "$kmod" "${block_kmod_dir}/loop/$(basename $kmod)" + done + fi } install() { # region binaries diff --git a/builder/modules.d/slx-dmsetup/module-setup.sh b/builder/modules.d/slx-dmsetup/module-setup.sh index 58c6e5cf..68e9b7b4 100755 --- a/builder/modules.d/slx-dmsetup/module-setup.sh +++ b/builder/modules.d/slx-dmsetup/module-setup.sh @@ -17,5 +17,8 @@ install() { } installkernel() { # install those modules in case the used kernel does not have them builtin - instmods dm-thin-pool dm-snapshot dm-crypt crc32c xfs ext4 + instmods \ + dm-thin-pool dm-snapshot \ + dm-crypt crc32c xts \ + xfs ext4 } diff --git a/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device b/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device index c0f6a274..1756865e 100755 --- a/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device +++ b/builder/modules.d/slx-dmsetup/scripts/dmsetup-slx-device @@ -273,7 +273,7 @@ save_partition_info "${scratch_device##*/}" "*" "1" "$scratch_device_size" # encrypt the scratch device, if configured if [ "$crypt" -ne 0 ] && encrypt_device \ "$scratch_device" "${scratch_device##*/}-crypt" "$scratch_device_size"; then - scratch_device="${scratch_device##*/}-crypt" + scratch_device="${scratch_device}-crypt" fi writable_device_allocated="$scratch_device_size" @@ -319,7 +319,7 @@ create_pool() { # create remaining thin volumes modprobe dm-thin-pool || echo "$0: dm-thin-pool load failed, maybe builtin?" # create temporary metadata device - data_block_size=256 + data_block_size=255 # calculate number of sectors needed and check boundaries: metadata_dev_size="$(( 48 * $writable_device_size / $data_block_size / 512 ))" # Min 2MB -> 4096 sectors, max 16GB -> 33554432 sectors diff --git a/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3 b/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3 index 4535ccd3..53ad8de9 100755 --- a/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3 +++ b/builder/modules.d/slx-network/scripts/setup-bootif-network.stage3 @@ -31,9 +31,9 @@ wait_for_iface() { set -x ip link set dev "$SLX_PXE_NETIF" up -if ! wait_for_iface "$SLX_PXE_NETIF" 100; then - warn "'$SLX_PXE_NETIF' still not up after 10sec ... trying anyway." - # TODO handle case where we waited for 10sec and it is still not up +if ! wait_for_iface "$SLX_PXE_NETIF" 300; then + warn "'$SLX_PXE_NETIF' still not up after 30sec ... trying anyway." + # TODO handle case where we waited for 30sec and it is still not up fi # now determine whether we are in bridged/vlan/plain mode |