iop: genconfig(_min)?: Use target-subtarget-device for iopsys_brcm63xx_arm

Adapt genconfig to generate the correct config after the change to the
target-subtarget-device in target iopsys_brcm63xx_arm in feeds/targets.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
This commit is contained in:
Andreas Gnau 2022-08-19 08:27:48 +02:00
parent 5e69f3d66d
commit d96d43b1a4
2 changed files with 28 additions and 18 deletions

View file

@ -319,20 +319,25 @@ function genconfig {
fi
# Special handling for targets which use TARGET_DEVICES
if [ "$target" = "iopsys_ramips" ]; then
subtarget="mt7621"
case "$target" in
iopsys_ramips | iopsys_econet | iopsys_brcm63xx_arm)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local mk_file="$(grep -Fx --files-with-matches "define Device/${BOARDTYPE}" "$target_config_path/../image/"*.mk)"
if [ -z "$mk_file" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1
fi
local subtarget="$(basename "${mk_file%.mk}")"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
elif [ "$target" = "iopsys_econet" ]; then
subtarget="en7562"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
else
;;
*)
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
fi
;;
esac
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE

View file

@ -310,20 +310,25 @@ function genconfig_min {
fi
# Special handling for targets which use TARGET_DEVICES
if [ "$target" = "iopsys_ramips" ]; then
subtarget="mt7621"
case "$target" in
iopsys_ramips | iopsys_econet | iopsys_brcm63xx_arm)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local mk_file="$(grep -Fx --files-with-matches "define Device/${BOARDTYPE}" "$target_config_path/../image/"*.mk)"
if [ -z "$mk_file" ]; then
echo "Error determining subtarget for $target / ${BOARDTYPE}"
return 1
fi
local subtarget="$(basename "${mk_file%.mk}")"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
elif [ "$target" = "iopsys_econet" ]; then
subtarget="en7562"
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${subtarget}=y" >> .config
echo "CONFIG_TARGET_DEVICE_${target}_${subtarget}_DEVICE_${BOARDTYPE}=y" >> .config
else
;;
*)
echo "CONFIG_TARGET_${target}=y" >> .config
echo "CONFIG_TARGET_${target}_${BOARDTYPE}=y" >> .config
fi
;;
esac
echo "$CUSTOMERS $BOARDTYPE" > $CURRENT_CONFIG_FILE