Skip to content

Commit

Permalink
kbuild/kbuild.sh: judge dts Makefile by src arch
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Jan 2, 2025
1 parent dc5d510 commit a4b76fc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions kbuild/kbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,28 @@ setup_llvm_ias()
fi
}

src_arch()
{
local ARCH=$1

case $ARCH in
i386|x86_64)
echo x86;;
sparc32|sparc64)
echo sparc;;
parisc|parisc64)
echo parisc;;
sh64)
echo sh;;
tilepro|tilegx)
echo tile;;
powerpc64)
echo powerpc;;
*)
echo $ARCH;;
esac
}

get_config_value()
{
local config=$1
Expand Down
2 changes: 1 addition & 1 deletion kbuild/make.cross
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ setup_crosstool || {
opt_arch="ARCH=$ARCH"
}

[[ -f arch/$ARCH/boot/dts/Makefile ]] && make_dts="CONFIG_OF_ALL_DTBS=y CONFIG_DTC=y"
[[ -f arch/$(src_arch $ARCH)/boot/dts/Makefile ]] && make_dts="CONFIG_OF_ALL_DTBS=y CONFIG_DTC=y"

[[ -f .make-env ]] && source ./.make-env

Expand Down

0 comments on commit a4b76fc

Please sign in to comment.