summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-19 20:26:48 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-19 20:26:59 +0300
commit7a542d4685631c369bcc65a632a15799543fc292 (patch)
tree9ff048521c1918aa10050a30e1eb2a6a9b9f1634
parentbcd880c8e4085c943a055bcb2e2dc78feda33bea (diff)
Convert all shell variables to lowercase
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--images/CrOS.sh2
-rw-r--r--images/FIT.sh10
-rw-r--r--images/srec.sh2
-rw-r--r--images/uImage.sh2
-rwxr-xr-xkbuild.sh47
-rw-r--r--platforms/gen3.sh10
-rw-r--r--platforms/imx7.sh8
-rw-r--r--platforms/omap3.sh4
-rw-r--r--platforms/omap4+.sh6
-rw-r--r--platforms/scarlet.sh10
-rw-r--r--platforms/soraka.sh6
-rw-r--r--platforms/x86.sh4
-rw-r--r--platforms/zynqmp.sh10
13 files changed, 64 insertions, 57 deletions
diff --git a/images/CrOS.sh b/images/CrOS.sh
index eb9ff05..b79e9a4 100644
--- a/images/CrOS.sh
+++ b/images/CrOS.sh
@@ -30,7 +30,7 @@ make_CrOS_image() {
if [[ -f $opt_cmdline_file ]] ; then
config=$opt_cmdline_file
else
- echo "$CMDLINE" > $boot_dir/cmdline
+ echo "$cmdline" > $boot_dir/cmdline
config=$boot_dir/cmdline
fi
diff --git a/images/FIT.sh b/images/FIT.sh
index 0ed5482..f56ccba 100644
--- a/images/FIT.sh
+++ b/images/FIT.sh
@@ -17,8 +17,8 @@ make_FIT_image() {
arch = "$arch";
os = "linux";
compression = "none";
- load = <$LOADADDR>;
- entry = <$LOADADDR>;
+ load = <$loadaddr>;
+ entry = <$loadaddr>;
hash-1 {
algo = "crc32";
};
@@ -30,7 +30,7 @@ EOF
local dtb
- for dtb in $DTBS ; do
+ for dtb in $dtbs ; do
local src=${dtb/:*/}
local dst=${dtb/*:/}
dst=${dst/*\//}
@@ -52,14 +52,14 @@ EOF
EOF
done
- local config=$(echo $DTBS | sed 's/.*[:/]//')
+ local config=$(echo $dtbs | sed 's/.*[:/]//')
cat <<EOF >> $kernel_its
};
configurations {
default = "conf-$config";
EOF
- for dtb in $DTBS ; do
+ for dtb in $dtbs ; do
local dst=${dtb/*:/}
dst=${dst/*\//}
diff --git a/images/srec.sh b/images/srec.sh
index 6f89b92..a9e9b0c 100644
--- a/images/srec.sh
+++ b/images/srec.sh
@@ -7,7 +7,7 @@ make_srec_image() {
objcopy -I binary -O srec --srec-forceS3 --srec-len 516 \
$image.xz $image.xz.srec
- for dtb in $DTBS ; do
+ for dtb in $dtbs ; do
local src=${dtb/:*/}
objcopy -I binary -O srec --srec-forceS3 --srec-len 516 \
diff --git a/images/uImage.sh b/images/uImage.sh
index 40e7cf3..716900e 100644
--- a/images/uImage.sh
+++ b/images/uImage.sh
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0+
make_uImage_image() {
- mkimage -A $arch -O linux -T kernel -C none -a $LOADADDR -e $LOADADDR \
+ mkimage -A $arch -O linux -T kernel -C none -a $loadaddr -e $loadaddr \
-n "Linux-${version}" -d $output_dir/arch/$arch/boot/$kernel_image \
$output_dir/arch/$arch/boot/uImage
}
diff --git a/kbuild.sh b/kbuild.sh
index d91e67b..98a59bc 100755
--- a/kbuild.sh
+++ b/kbuild.sh
@@ -5,13 +5,12 @@ set -e
kbuild_root=$(dirname $(readlink -f "$0"))
-#OPTIONS='CONFIG_DEBUG_SECTION_MISMATCH=y'
-#OPTIONS='C=1'
-OPTIONS="KALLSYMS_EXTRA_PASS=0"
-KCFLAGS="-Werror -Wno-error=cpp"
+#kbuild_options='CONFIG_DEBUG_SECTION_MISMATCH=y'
+#kbuild_options='C=1'
+kbuild_options="KALLSYMS_EXTRA_PASS=0"
-NFS_ROOT=$HOME/src/netboot
-TFTP_ROOT=$HOME/tftpboot
+nfs_root=$HOME/src/netboot
+tftp_root=$HOME/tftpboot
#
# Options parsing
@@ -76,6 +75,8 @@ done
# Platform
#
+kcflags="-Werror -Wno-error=cpp"
+
if [[ -z "$platform" ]] ; then
for f in $kbuild_root/platforms/*.sh ; do
pattern=$(cat $f | grep "dir_pattern=" | head -1)
@@ -112,8 +113,8 @@ 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}
+target_dir=${target_dir:-$nfs_root/$arch_dir}
+output_dir=$PWD/output/$arch_dir
#
# Parallelize make with twice as many jobs as CPUs
@@ -122,7 +123,7 @@ output_dir=${output_dir:-$PWD/output/$arch_dir}
num_cpus=$(cat /proc/cpuinfo | grep '^processor\b' | wc -l)
pmake="make -j$((num_cpus*2))"
-OPTIONS="KALLSYMS_EXTRA_PASS=0 KCFLAGS='$KCFLAGS'"
+kbuild_options="$kbuild_options KCFLAGS='$kcflags'"
echo "Compiling for platform $platform with $num_cpus CPUs"
@@ -152,18 +153,18 @@ fi
# Compile the kernel, modules and DTBs
#
-dtbs=
-for dtb in $DTBS ; do
+kernel_dtbs=
+for dtb in $dtbs ; do
dtb=${dtb/:*/}
- dtbs="$dtbs $dtb"
+ kernel_dtbs="$kernel_dtbs $dtb"
done
-eval $pmake ARCH=$arch O=$output_dir CROSS_COMPILE=$cross_compile $OPTIONS \
- $image_kernel $dtbs
+eval $pmake ARCH=$arch O=$output_dir CROSS_COMPILE=$cross_compile $kbuild_options \
+ $image_kernel $kernel_dtbs
grep 'CONFIG_MODULES=y' $output_dir/.config > /dev/null && modules=modules
if [[ x$modules == xmodules ]] ; then
- eval $pmake ARCH=$arch O=$output_dir CROSS_COMPILE=$cross_compile $OPTIONS \
+ eval $pmake ARCH=$arch O=$output_dir CROSS_COMPILE=$cross_compile $kbuild_options \
$modules
fi
@@ -188,7 +189,7 @@ copy_dtbs() {
local dtb
local target_dir=$1
- for dtb in $DTBS ; do
+ for dtb in $dtbs ; do
local src=${dtb/:*/}
local dst=${dtb/*:/}
dst=${dst/*\//}
@@ -197,21 +198,27 @@ copy_dtbs() {
done
}
-mkdir -p $BOOT_DIR
-cp $image_file $BOOT_DIR/
+mkdir -p $boot_dir
+cp $image_file $boot_dir/
if [[ $image != FIT && $image != CrOS ]] ; then
- copy_dtbs $BOOT_DIR/
+ copy_dtbs $boot_dir/
fi
if [[ x$modules = xmodules ]] ; then
$pmake ARCH=$arch O=$output_dir CROSS_COMPILE=$cross_compile INSTALL_MOD_PATH=$target_dir modules_install
- echo "Kernel modules installed to $target_dir/lib/modules/$version"
fi
if [[ $do_package_deb = 1 ]] ; then
$pmake ARCH=$arch O=$output_dir CROSS_COMPILE=$cross_compile bindeb-pkg
fi
+#
+# Print status and terminate
+#
+
echo "Kernel image available in $image_file"
+if [[ x$modules = xmodules ]] ; then
+ echo "Kernel modules installed to $target_dir/lib/modules/$version"
+fi
echo "Build $version completed at $(date)"
diff --git a/platforms/gen3.sh b/platforms/gen3.sh
index 7b7ae6d..f7ace45 100644
--- a/platforms/gen3.sh
+++ b/platforms/gen3.sh
@@ -1,9 +1,9 @@
platform=gen3
dir_pattern=renesas
arch=arm64
-BOOT_DIR=$TFTP_ROOT/gen3
-DTBS="renesas/r8a7795-es1-h3ulcb.dtb renesas/r8a7795-es1-salvator-x.dtb renesas/r8a7795-h3ulcb.dtb renesas/r8a7795-h3ulcb-kf.dtb renesas/r8a7795-salvator-x.dtb renesas/r8a7795-salvator-xs.dtb renesas/r8a7796-m3ulcb.dtb renesas/r8a7796-salvator-x.dtb renesas/r8a77995-draak.dtb"
-DTBS=$(cd arch/arm64/boot/dts ; ls renesas/*.dts | sed 's/\.dts/.dtb/')
-#DTBS="renesas/r8a77965-salvator-xs.dtb"
+boot_dir=$tftp_root/gen3
+dtbs="renesas/r8a7795-es1-h3ulcb.dtb renesas/r8a7795-es1-salvator-x.dtb renesas/r8a7795-h3ulcb.dtb renesas/r8a7795-h3ulcb-kf.dtb renesas/r8a7795-salvator-x.dtb renesas/r8a7795-salvator-xs.dtb renesas/r8a7796-m3ulcb.dtb renesas/r8a7796-salvator-x.dtb renesas/r8a77995-draak.dtb"
+dtbs=$(cd arch/arm64/boot/dts ; ls renesas/*.dts | sed 's/\.dts/.dtb/')
+#dtbs="renesas/r8a77965-salvator-xs.dtb"
image=FIT
-LOADADDR=0x48080000
+loadaddr=0x48080000
diff --git a/platforms/imx7.sh b/platforms/imx7.sh
index 736e5ae..5f27052 100644
--- a/platforms/imx7.sh
+++ b/platforms/imx7.sh
@@ -1,8 +1,8 @@
platform=imx7
dir_pattern=plusoptix
arch=arm
-#BOOT_DIR=$TFTP_ROOT/imx7
-BOOT_DIR=$NFS_ROOT/arm32/boot
-DTBS="imx7d-sx-pl-emar.dtb imx7d-sx-pl-test.dtb"
+#boot_dir=$tftp_root/imx7
+boot_dir=$nfs_root/arm32/boot
+dtbs="imx7d-sx-pl-emar.dtb imx7d-sx-pl-test.dtb"
image=zImage
-LOADADDR=0x80008000
+loadaddr=0x80008000
diff --git a/platforms/omap3.sh b/platforms/omap3.sh
index b6d7e2d..af5261a 100644
--- a/platforms/omap3.sh
+++ b/platforms/omap3.sh
@@ -1,6 +1,6 @@
platform=omap3
dir_pattern=media
arch=arm
-BOOT_DIR=$TFTP_ROOT/omap3
-DTBS="omap3-beagle-xm.dtb omap3-overo-storm-tobi.dtb"
+boot_dir=$tftp_root/omap3
+dtbs="omap3-beagle-xm.dtb omap3-overo-storm-tobi.dtb"
image=zImage
diff --git a/platforms/omap4+.sh b/platforms/omap4+.sh
index 646518b..3616c02 100644
--- a/platforms/omap4+.sh
+++ b/platforms/omap4+.sh
@@ -1,7 +1,7 @@
platform=omap4+
dir_pattern=omap
arch=arm
-BOOT_DIR=$TFTP_ROOT/omap4
-DTBS="omap4-panda.dtb omap4-panda-es.dtb am57xx-evm-reva3.dtb:am57xx-beagle-x15.dtb"
+boot_dir=$tftp_root/omap4
+dtbs="omap4-panda.dtb omap4-panda-es.dtb am57xx-evm-reva3.dtb:am57xx-beagle-x15.dtb"
image=FIT
-LOADADDR=0x80008000
+loadaddr=0x80008000
diff --git a/platforms/scarlet.sh b/platforms/scarlet.sh
index 4702900..908d200 100644
--- a/platforms/scarlet.sh
+++ b/platforms/scarlet.sh
@@ -1,8 +1,8 @@
platform=scarlet
arch=arm64
-BOOT_DIR=$NFS_ROOT/arm64/boot
-CMDLINE="console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=tty1 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd ignore_loglevel"
-CMDLINE="console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=tty1 ip=dhcp root=/dev/nfs rootwait rw noinitrd ignore_loglevel"
-DTBS="rockchip/rk3399-gru-scarlet-inx.dtb"
+boot_dir=$nfs_root/arm64/boot
+cmdline="console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=tty1 init=/sbin/init root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd ignore_loglevel"
+cmdline="console=ttyS2,115200n8 earlyprintk=ttyS2,115200n8 console=tty1 ip=dhcp root=/dev/nfs rootwait rw noinitrd ignore_loglevel"
+dtbs="rockchip/rk3399-gru-scarlet-inx.dtb"
image=CrOS
-LOADADDR=0
+loadaddr=0
diff --git a/platforms/soraka.sh b/platforms/soraka.sh
index d278b34..3166e99 100644
--- a/platforms/soraka.sh
+++ b/platforms/soraka.sh
@@ -1,7 +1,7 @@
platform=soraka
dir_pattern=libcamera
arch=x86
-BOOT_DIR=$TFTP_ROOT/x86
-CMDLINE="console=ttyS0,115200n8 earlyprintk=ttyS0,115200n8 console=tty1 ip=dhcp root=/dev/nfs rootwait rw noinitrd ignore_loglevel"
+boot_dir=$tftp_root/x86
+cmdline="console=ttyS0,115200n8 earlyprintk=ttyS0,115200n8 console=tty1 ip=dhcp root=/dev/nfs rootwait rw noinitrd ignore_loglevel"
image=CrOS
-KCFLAGS="$KCFLAGS -Wno-error=frame-larger-than="
+kcflags="$kcflags -Wno-error=frame-larger-than="
diff --git a/platforms/x86.sh b/platforms/x86.sh
index 5c61998..f635611 100644
--- a/platforms/x86.sh
+++ b/platforms/x86.sh
@@ -1,5 +1,5 @@
platform=x86
arch=x86
-BOOT_DIR=$TFTP_ROOT/x86
+boot_dir=$tftp_root/x86
image=bzImage
-KCFLAGS="$KCFLAGS -Wno-error=frame-larger-than="
+kcflags="$kcflags -Wno-error=frame-larger-than="
diff --git a/platforms/zynqmp.sh b/platforms/zynqmp.sh
index 3f9b302..73bab8d 100644
--- a/platforms/zynqmp.sh
+++ b/platforms/zynqmp.sh
@@ -1,9 +1,9 @@
platform=zynqmp
dir_pattern=xilinx
arch=arm64
-BOOT_DIR=$TFTP_ROOT/xilinx
-DTBS="xilinx/zynqmp-zcu106-revA.dtb"
+boot_dir=$tftp_root/xilinx
+dtbs="xilinx/zynqmp-zcu106-revA.dtb"
image=Image
-LOADADDR=0x10000000
-KCFLAGS="$KCFLAGS -Wno-error=packed-not-aligned -Wno-error=sizeof-pointer-memaccess -Wno-error=stringop-truncation -Wno-error=stringop-overflow"
-target_dir=$NFS_ROOT/zynqmp
+loadaddr=0x10000000
+kcflags="$kcflags -Wno-error=packed-not-aligned -Wno-error=sizeof-pointer-memaccess -Wno-error=stringop-truncation -Wno-error=stringop-overflow"
+target_dir=$nfs_root/zynqmp