summaryrefslogtreecommitdiff
path: root/kbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'kbuild.sh')
-rwxr-xr-xkbuild.sh32
1 files changed, 12 insertions, 20 deletions
diff --git a/kbuild.sh b/kbuild.sh
index 9bd2274..50f8d21 100755
--- a/kbuild.sh
+++ b/kbuild.sh
@@ -73,7 +73,7 @@ while [[ $# != 0 ]] ; do
done
#
-# Platform handling
+# Platform
#
if [[ -z "$platform" ]] ; then
@@ -89,7 +89,7 @@ if [[ -z "$platform" ]] ; then
fi
if [[ ! -r "$kbuild_root/platforms/$platform.sh" ]] ; then
- echo "Unknown platform '$platform'. Available platforms are"
+ echo "Unknown platform '$platform'. Supported platforms are"
for f in $kbuild_root/platforms/*.sh ; do
echo "- $(basename -s .sh $f)"
done
@@ -99,26 +99,18 @@ fi
source "${kbuild_root}/platforms/$platform.sh" || exit 1
#
-# Architecture handling
+# Architecture
#
-case $arch in
- arm)
- arch_dir=arm32
- cross_compile=arm-buildroot-linux-uclibcgnueabihf-
- image_kernel=zImage
- ;;
- arm64)
- arch_dir=arm64
- cross_compile=aarch64-buildroot-linux-gnu-
- image_kernel=Image
- ;;
- x86)
- arch_dir=x86
- cross_compile=
- image_kernel=bzImage
- ;;
-esac
+if [[ ! -r "$kbuild_root/arch/$arch.sh" ]] ; then
+ echo "Unknown architecture '$arch'. Supported architectures are"
+ for f in $kbuild_root/arch/*.sh ; do
+ echo "- $(basename -s .sh $f)"
+ done
+ exit 1
+fi
+
+source "${kbuild_root}/arch/$arch.sh" || exit 1
target_dir=${target_dir:-$NFS_ROOT/$arch_dir}
output_dir=${output_dir:-$PWD/output/$arch_dir}