summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Foss <robert.foss@collabora.com>2017-07-31 19:23:18 +0200
committerRobert Foss <robert.foss@collabora.com>2017-08-04 10:19:17 +0200
commit54e41145669c50e4296fa4e7767203152882116a (patch)
treee7782b8601d1b15a377647a23bf9d16b927beeaf
parentaddd7a30787d76644fbdf57e14403b9e4cb7eabb (diff)
downloadrdu2-54e41145669c50e4296fa4e7767203152882116a.tar.gz
rdu2-54e41145669c50e4296fa4e7767203152882116a.tar.xz
script: Collapse all RDU2 targets under the device name rdu2
-rwxr-xr-xbuild_android.sh27
l---------config_imx6q-sabrelite2
l---------config_imx6q-sabresd2
l---------config_imx6q-zii-rdu21
l---------config_imx6qp-sabresd2
-rw-r--r--config_rdu2 (renamed from config_imx6qp-zii-rdu2)0
6 files changed, 28 insertions, 6 deletions
diff --git a/build_android.sh b/build_android.sh
index e3ff645..e67efa3 100755
--- a/build_android.sh
+++ b/build_android.sh
@@ -11,7 +11,7 @@ LINUX_BOOT=$LINUX/arch/arm/boot
CPU_CORES=$(nproc --ignore=1)
-IMX6_DEVBOARDS=$(find $LINUX_BOOT -name "imx6q*.dts" | sort | sed 's=.*/==' | sed 's/\.dts//' | tr '\r\n' ' ')
+IMX6_DEVBOARDS=$(find $LINUX_BOOT -name "imx6q*.dts" | sort | sed 's=.*/==' | sed 's/\.dts//' | tr '\r\n' ' ' | sed 's/.*/\0\nrdu2/')
UBOOT_DEVBOARDS="imx6q-sabrelite imx6q-sabresd imx6qp-sabresd"
DEVBOARD=""
@@ -82,8 +82,24 @@ mmc_is_valid()
return 0
}
+devboard_is_rdu2()
+{
+ case "$1" in
+ *rdu2*)
+ return 0
+ ;;
+ *RDU2*)
+ return 0
+ ;;
+ esac
+
+ return 1
+}
+
devboard_is_valid()
{
+ devboard_is_rdu2 "$1" && return 0
+
for board in $IMX6_DEVBOARDS; do
if [[ $board = $1 ]]; then
return 0
@@ -114,6 +130,7 @@ parse_args()
d)
devboard_is_valid $OPTARG || print_help "Invalid ($OPTARG) devboard supplied!" "$(print_devboards)"
DEVBOARD=$OPTARG
+ devboard_is_rdu2 $DEVBOARD && DEVBOARD=rdu2
;;
*)
echo "*)"
@@ -165,7 +182,13 @@ flash_kernel_mmc()
sudo umount $DEV_PARTITION &>/dev/null
sudo mount $DEV_PARTITION $TMPDIR
sudo cp $LINUX_BOOT/zImage $TMPDIR/android_zImage
- sudo cp $LINUX_BOOT/dts/$DEVBOARD.dtb $TMPDIR/
+
+ if devboard_is_rdu2 $DEVBOARD; then
+ sudo cp $LINUX_BOOT/dts/imx6q-zii-rdu2.dtb $TMPDIR/
+ sudo cp $LINUX_BOOT/dts/imx6qp-zii-rdu2.dtb $TMPDIR/
+ else
+ sudo cp $LINUX_BOOT/dts/$DEVBOARD.dtb $TMPDIR/
+ fi
sync
sudo umount $TMPDIR
rmdir $TMPDIR
diff --git a/config_imx6q-sabrelite b/config_imx6q-sabrelite
index cb52322..0f1e1c8 120000
--- a/config_imx6q-sabrelite
+++ b/config_imx6q-sabrelite
@@ -1 +1 @@
-config_imx6qp-zii-rdu2 \ No newline at end of file
+config_rdu2 \ No newline at end of file
diff --git a/config_imx6q-sabresd b/config_imx6q-sabresd
index cb52322..0f1e1c8 120000
--- a/config_imx6q-sabresd
+++ b/config_imx6q-sabresd
@@ -1 +1 @@
-config_imx6qp-zii-rdu2 \ No newline at end of file
+config_rdu2 \ No newline at end of file
diff --git a/config_imx6q-zii-rdu2 b/config_imx6q-zii-rdu2
deleted file mode 120000
index cb52322..0000000
--- a/config_imx6q-zii-rdu2
+++ /dev/null
@@ -1 +0,0 @@
-config_imx6qp-zii-rdu2 \ No newline at end of file
diff --git a/config_imx6qp-sabresd b/config_imx6qp-sabresd
index cb52322..0f1e1c8 120000
--- a/config_imx6qp-sabresd
+++ b/config_imx6qp-sabresd
@@ -1 +1 @@
-config_imx6qp-zii-rdu2 \ No newline at end of file
+config_rdu2 \ No newline at end of file
diff --git a/config_imx6qp-zii-rdu2 b/config_rdu2
index 7103cbc..7103cbc 100644
--- a/config_imx6qp-zii-rdu2
+++ b/config_rdu2