More work on --source
This commit is contained in:
@@ -624,8 +624,11 @@ fromSource() {
|
|||||||
|
|
||||||
pushd "$GITWORKTREEDIR" &>/dev/null || return 1
|
pushd "$GITWORKTREEDIR" &>/dev/null || return 1
|
||||||
|
|
||||||
# If we don't distclean, make sure to remove existing .config
|
# make clean # compiled output
|
||||||
make distclean
|
# make targetclean # compiled output, toolchain
|
||||||
|
# make dirclean # compiled output, toolchain, build tools
|
||||||
|
make distclean # compiled output, toolchain, build tools, .config, feeds, .ccache
|
||||||
|
|
||||||
|
|
||||||
# Grab the release seed config
|
# Grab the release seed config
|
||||||
if ! curl -so "$SEED_FILE" "$SEED_URL"; then
|
if ! curl -so "$SEED_FILE" "$SEED_URL"; then
|
||||||
@@ -633,6 +636,9 @@ fromSource() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set compilation output dir
|
||||||
|
config_opts+=("CONFIG_BINARY_FOLDER=\"$THIS_BINDIR\"")
|
||||||
|
|
||||||
# Add custom packages
|
# Add custom packages
|
||||||
for pkg in ${P_ARR[packages]}; do
|
for pkg in ${P_ARR[packages]}; do
|
||||||
if [[ $pkg == -* ]]; then
|
if [[ $pkg == -* ]]; then
|
||||||
@@ -649,14 +655,27 @@ fromSource() {
|
|||||||
config_opts+=("$kopt")
|
config_opts+=("$kopt")
|
||||||
done
|
done
|
||||||
|
|
||||||
# Only compile this target
|
# Only compile selected fs
|
||||||
|
sed -i '/CONFIG_TARGET_ROOTFS_/d' "$SEED_FILE"
|
||||||
|
if [[ $FILESYSTEM == "squashfs" ]]; then
|
||||||
|
config_opts+=("CONFIG_TARGET_ROOTFS_SQUASHFS=y")
|
||||||
|
elif [[ $FILESYSTEM == "ext4" ]]; then
|
||||||
|
config_opts+=("CONFIG_TARGET_ROOTFS_EXT4FS=y")
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Only compile selected target
|
||||||
sed -i '/CONFIG_TARGET_DEVICE_/d' "$SEED_FILE"
|
sed -i '/CONFIG_TARGET_DEVICE_/d' "$SEED_FILE"
|
||||||
|
# config_opts+=("CONFIG_TARGET_PER_DEVICE_ROOTFS=n")
|
||||||
config_opts+=("CONFIG_TARGET_MULTI_PROFILE=n")
|
config_opts+=("CONFIG_TARGET_MULTI_PROFILE=n")
|
||||||
config_opts+=("CONFIG_TARGET_ALL_PROFILES=n")
|
# config_opts+=("CONFIG_TARGET_ALL_PROFILES=n")
|
||||||
|
config_opts+=("CONFIG_TARGET_PROFILE=DEVICE_${P_ARR[profile]}")
|
||||||
|
config_opts+=("CONFIG_TARGET_${P_ARR[target]//\//_}_DEVICE_${P_ARR[profile]}=y")
|
||||||
|
# config_opts+=("CONFIG_TARGET_DEVICE_${P_ARR[target]//\//_}_DEVICE_${P_ARR[profile]}=y")
|
||||||
config_opts+=("CONFIG_SDK=n")
|
config_opts+=("CONFIG_SDK=n")
|
||||||
config_opts+=("CONFIG_SDK_LLVM_BPF=n")
|
config_opts+=("CONFIG_SDK_LLVM_BPF=n")
|
||||||
config_opts+=("CONFIG_TARGET_DEVICE_${P_ARR[target]//\//_}_DEVICE_${P_ARR[profile]}=y")
|
config_opts+=("CONFIG_IB=n")
|
||||||
config_opts+=("CONFIG_BINARY_FOLDER=\"$THIS_BINDIR\"")
|
config_opts+=("CONFIG_MAKE_TOOLCHAIN=n")
|
||||||
|
|
||||||
|
|
||||||
# Write options to config seed file
|
# Write options to config seed file
|
||||||
for opt in "${config_opts[@]}"; do
|
for opt in "${config_opts[@]}"; do
|
||||||
@@ -664,10 +683,9 @@ fromSource() {
|
|||||||
echo "$opt" >> "$SEED_FILE"
|
echo "$opt" >> "$SEED_FILE"
|
||||||
done
|
done
|
||||||
|
|
||||||
# normalize .config and remove dupes
|
|
||||||
# Update package feed
|
# Update package feed
|
||||||
# ./scripts/feeds install will create defaults (make defconfig)
|
# ./scripts/feeds install will run make defconfig for us
|
||||||
# for an exiting .config so make sure it doesn't exist first
|
# to normalize and expand .config
|
||||||
./scripts/feeds update -a &&
|
./scripts/feeds update -a &&
|
||||||
./scripts/feeds install -a
|
./scripts/feeds install -a
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user