Pass BIN_DIR to make and not .config
This commit is contained in:
@@ -590,9 +590,6 @@ from_source() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set compilation output dir
|
|
||||||
config_opts+=("CONFIG_BINARY_FOLDER=\"$BIN_DIR\"")
|
|
||||||
|
|
||||||
# Add custom packages
|
# Add custom packages
|
||||||
for pkg in $PACKAGES; do
|
for pkg in $PACKAGES; do
|
||||||
if [[ $pkg == -* ]]; then
|
if [[ $pkg == -* ]]; then
|
||||||
@@ -602,31 +599,45 @@ from_source() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Add config options from profile
|
# Disable unecessary buildbot config options
|
||||||
for config in ${P_ARR[config]}; do
|
config_opts+=(
|
||||||
config_opts+=("$config")
|
"CONFIG_BUILDBOT=n"
|
||||||
done
|
"CONFIG_ALL_KMODS=n"
|
||||||
|
"CONFIG_ALL_NONSHARED=n"
|
||||||
|
"CONFIG_DEVEL=n"
|
||||||
|
"CONFIG_COLLECT_KERNEL_DEBUG=n"
|
||||||
|
"CONFIG_SDK=n"
|
||||||
|
"CONFIG_SDK_LLVM_BPF=n"
|
||||||
|
"CONFIG_IB=n"
|
||||||
|
"CONFIG_MAKE_TOOLCHAIN=n"
|
||||||
|
)
|
||||||
|
|
||||||
# Only compile selected fs
|
# Only compile selected fs
|
||||||
execute sed -i '/CONFIG_TARGET_ROOTFS_/d' "$seed_file"
|
execute sed -i '/CONFIG_TARGET_ROOTFS_/d' "$seed_file"
|
||||||
config_opts+=("CONFIG_TARGET_PER_DEVICE_ROOTFS=n")
|
config_opts+=("CONFIG_TARGET_PER_DEVICE_ROOTFS=n")
|
||||||
if [[ $FILESYSTEM == "squashfs" ]]; then
|
case "$FILESYSTEM" in
|
||||||
config_opts+=("CONFIG_TARGET_ROOTFS_EXT4FS=n")
|
squashfs) config_opts+=(
|
||||||
config_opts+=("CONFIG_TARGET_ROOTFS_SQUASHFS=y")
|
"CONFIG_TARGET_ROOTFS_EXT4FS=n"
|
||||||
elif [[ $FILESYSTEM == "ext4" ]]; then
|
"CONFIG_TARGET_ROOTFS_SQUASHFS=y"
|
||||||
config_opts+=("CONFIG_TARGET_ROOTFS_SQUASHFS=n")
|
) ;;
|
||||||
config_opts+=("CONFIG_TARGET_ROOTFS_EXT4FS=y")
|
ext4) config_opts+=(
|
||||||
fi
|
"CONFIG_TARGET_ROOTFS_SQUASHFS=n"
|
||||||
|
"CONFIG_TARGET_ROOTFS_EXT4FS=y"
|
||||||
|
) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Only compile selected target image
|
# Only compile selected target image
|
||||||
execute sed -i '/CONFIG_TARGET_DEVICE_/d' "$seed_file"
|
execute sed -i '/CONFIG_TARGET_DEVICE_/d' "$seed_file"
|
||||||
config_opts+=("CONFIG_TARGET_MULTI_PROFILE=n")
|
config_opts+=(
|
||||||
config_opts+=("CONFIG_TARGET_PROFILE=DEVICE_$DEVICE")
|
"CONFIG_TARGET_MULTI_PROFILE=n"
|
||||||
config_opts+=("CONFIG_TARGET_${TARGET//\//_}_DEVICE_$DEVICE=y")
|
"CONFIG_TARGET_PROFILE=DEVICE_$DEVICE"
|
||||||
config_opts+=("CONFIG_SDK=n")
|
"CONFIG_TARGET_${TARGET//\//_}_DEVICE_$DEVICE=y"
|
||||||
config_opts+=("CONFIG_SDK_LLVM_BPF=n")
|
)
|
||||||
config_opts+=("CONFIG_IB=n")
|
|
||||||
config_opts+=("CONFIG_MAKE_TOOLCHAIN=n")
|
# Add profile config options
|
||||||
|
for config in ${P_ARR[config]}; do
|
||||||
|
config_opts+=("$config")
|
||||||
|
done
|
||||||
|
|
||||||
# Write options to config seed file
|
# Write options to config seed file
|
||||||
for config in "${config_opts[@]}"; do
|
for config in "${config_opts[@]}"; do
|
||||||
@@ -641,7 +652,7 @@ from_source() {
|
|||||||
((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)-2))")
|
((DEBUG)) && make_opts+=("-j1") || make_opts+=("-j$(($(nproc)-2))")
|
||||||
|
|
||||||
# Make image
|
# Make image
|
||||||
if ! execute ionice -c 3 chrt --idle 0 nice -n19 make "${make_opts[@]}" download world; then
|
if ! execute ionice -c 3 chrt --idle 0 nice -n19 make "${make_opts[@]}" BIN_DIR="$BIN_DIR" download world; then
|
||||||
echo "Error: make failed"
|
echo "Error: make failed"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
5
profiles
5
profiles
@@ -10,11 +10,6 @@ default_packages=(nano htop diffutils tar iperf3 zsh rsync curl tcpdump
|
|||||||
|
|
||||||
# Default (but optional) kernel configs
|
# Default (but optional) kernel configs
|
||||||
default_configs=(
|
default_configs=(
|
||||||
"CONFIG_BUILDBOT=n"
|
|
||||||
"CONFIG_ALL_KMODS=n"
|
|
||||||
"CONFIG_ALL_NONSHARED=n"
|
|
||||||
"CONFIG_DEVEL=n"
|
|
||||||
"CONFIG_COLLECT_KERNEL_DEBUG=n"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Current devices
|
# Current devices
|
||||||
|
|||||||
Reference in New Issue
Block a user