Compare commits

...

1 Commits

Author SHA1 Message Date
arne.jonsson
d02b21be90 iopsys: add custom support to genconfig 2023-05-16 10:35:57 +02:00

View File

@@ -81,17 +81,16 @@ function genconfig {
# Takes a board name and returns the target name in global var $target
set_target() {
local profile=$1
[ -n "$profile" ] || return
if [ -n "$TARGET" -a -d "./target/linux/feeds/$TARGET" ]; then
local targetpath="./target/linux/feeds/$TARGET"
local targetpath=$2
if [ -n "$TARGET" -a -d $targetpath ]; then
local profiles=
local pfound=0
if [ -e "$targetpath/genconfig" ]; then
profiles=$(cd $targetpath; ./genconfig)
for p in $profiles; do
if [ $p == $profile ]; then
pfound=1
@@ -107,7 +106,6 @@ function genconfig {
return
fi
[ -e $brcmbca_feed/genconfig ] &&
brcmbca=$(cd $brcmbca_feed; ./genconfig)
[ -e $airoha_feed/genconfig ] &&
@@ -124,7 +122,8 @@ function genconfig {
if [ "$profile" == "LIST" ]; then
for list in brcmbca airoha x86 armvirt mediatek ipq95xx; do
echo "$list based boards:"
for b in ${!list}; do
a=$(echo "${!list}" | sort)
for b in $a; do
echo -e "\t$b"
done
done
@@ -322,12 +321,16 @@ function genconfig {
shift
local CUSTOMERS=$@
# Validate seleced board and customers
set_target $BOARDTYPE
# Validate selected board and customers
check_dir="./target/linux/feeds/${TARGET}_custom"
set_target $BOARDTYPE $check_dir
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMERS" ]; then
check_dir="./target/linux/feeds/$TARGET"
set_target $BOARDTYPE $check_dir
if [ $target == "bogus" ]; then
echo "Hardware profile does not exist"
exit 1
elif [ -n "$CUSTOMERS" ]; then
for CUSTOMER in $CUSTOMERS; do
if [ ! -d "$CUSTCONF/$CUSTOMER/" ]; then
echo "Customer profile for '$CUSTOMER' does not exist"
@@ -341,6 +344,7 @@ function genconfig {
fi
fi
done
fi
fi
# Generate base config
@@ -437,7 +441,7 @@ function genconfig {
# Needed to disable kmods for iopsys-brcm targets
touch package/kernel/linux/Makefile
# we need to signal to bradcom SDK that we have changed the board id
# we need to signal to broadcom SDK that we have changed the board id
# currently boardparms.c and boardparms_voice.c is the only place that is depending on boardid name
# so just touch that file.
[ -d ./build_dir ] && find build_dir/ -name "boardparms*c" -print0 2>/dev/null | xargs -0 touch 2>/dev/null