From 3f146116ccbff725996f32d839a28f6079bcb7c5 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Mon, 3 Jul 2017 13:18:27 +0200 Subject: tools/scripts_yocto: fix mksdcard for newer archive format The patch [9813](https://gerrit.automotivelinux.org/gerrit/#/c/9813/) enforces the same IMAGE_FSTYPES for all boards on AGL. As a consequence, the script mksdcard needs some adjustments to handle the newest tarball format. Bug-AGL: SPEC-492 Change-Id: Ifc63f5cd689d033ae702e79343819bf2620c229c Signed-off-by: Stephane Desneux --- INSTALL/tools/scripts_yocto/mksdcard | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/INSTALL/tools/scripts_yocto/mksdcard b/INSTALL/tools/scripts_yocto/mksdcard index 306ec87..c895f3d 100755 --- a/INSTALL/tools/scripts_yocto/mksdcard +++ b/INSTALL/tools/scripts_yocto/mksdcard @@ -19,22 +19,29 @@ set -e usage() { - echo "Usage: $0 [size in GB]" >&2 + echo "Usage: $0 [output_file_or_dir [size_in_GB]]" >&2 echo " is usually located in \$builddir/tmp/deploy/images" >&2 exit 1 } IMGTAR=$1 -[[ ! -f $IMGTAR ]] && { echo "Invalid image archive" >&2; usage; } +[[ ! -f $IMGTAR ]] && { echo "Image file not found." >&2; usage; } -OUTPUT=$2 +if [[ $IMGTAR =~ ^.*\.(rootfs.tar\..*)$ ]]; then + ext=${BASH_REMATCH[1]} + IMGBASE=$(basename $IMGTAR .$ext) +else + echo "Invalid image archive (not a tarball?)" >&2; usage; +fi + +OUTPUT=${2:-.} if [[ -z $OUTPUT ]]; then echo "Invalid output file/dir." >&2 usage elif [[ -d $OUTPUT ]]; then # output is a dir, use input file for name - OUTPUT=$OUTPUT/$(basename $IMGTAR .rootfs.tar.bz2).raw + OUTPUT=$OUTPUT/$IMGBASE.raw fi @@ -76,7 +83,7 @@ make_image() { sudo mkdir $tmpd sudo mount $loop $tmpd echo "Extracting image tarball..." - sudo tar pjxf $imgtar -C $tmpd --xattrs-include='*' + sudo tar pxf $imgtar -C $tmpd --xattrs-include='*' echo "Detected machine $machine" case $machine in porter) -- cgit From 46a646b3f0410da733b6479e4d430e4ebf9bafe3 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Sat, 12 Aug 2017 11:18:36 +0200 Subject: bump version to 4.0 (Dab) Signed-off-by: Stephane Desneux --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d1ebe0b..5186d07 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.99.1 +4.0 -- cgit From ebbd34942183b0bdb247a04389634a039960fd9b Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Mon, 11 Sep 2017 18:24:25 +0200 Subject: set bash as default shell in container By default, debian 8 uses dash as a diversion for /bin/sh. This may break some script and in particular in AGL SDK. This patch adds a change in the diversion between dash and bash Bug-AGL: SPEC-743 Change-Id: Ibadce48b054263ce1596086c8a983985db45d2bd Signed-off-by: Stephane Desneux --- INSTALL/common.d/10_base | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/INSTALL/common.d/10_base b/INSTALL/common.d/10_base index e429e65..5cff36b 100644 --- a/INSTALL/common.d/10_base +++ b/INSTALL/common.d/10_base @@ -1,5 +1,16 @@ #!/bin/bash +# set bash as default shell for /bin/sh +diverter=$(dpkg-divert --listpackage /bin/sh) +[[ "$diverter" == "dash" ]] && { + # inspired by dash postinstall + dpkg-divert --package dash --remove /bin/sh + dpkg-divert --package bash --divert /bin/sh.distrib --add /bin/sh + [[ -e /bin/sh ]] && cp -dp /bin/sh /bin/sh.distrib + ln -sf bash /bin/sh.tmp + mv -f /bin/sh.tmp /bin/sh +} + # add backports and testing repositories echo "deb http://http.debian.net/debian jessie-backports main contrib" >>/etc/apt/sources.list -- cgit From 217bd04b7490a593d6fc2c3cb0c65457a2bf9fac Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Mon, 11 Sep 2017 18:30:15 +0200 Subject: bump version to 4.0.1 Change-Id: I11240c922d61175a36faf6b9606b18f2b26254b1 Signed-off-by: Stephane Desneux --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 5186d07..1454f6e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0 +4.0.1 -- cgit