aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2017-02-02 19:22:12 +0100
committerStephane Desneux <stephane.desneux@iot.bzh>2017-02-10 16:15:00 +0100
commitc0b9c6958eca27a24a3b0ec8d5c1c137162d7e35 (patch)
tree907d656ec11f3c1e583da435b5e242034ec311d5 /INSTALL
parentbac91f4a6a5ca80491f0c6021f2d07466d7295b9 (diff)
scripts/mksdcard: updated for m3/h3
Change-Id: Id0b787fb2a91b34e0213f9dbc8f94871fd49491f Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
Diffstat (limited to 'INSTALL')
-rwxr-xr-xINSTALL/tools/scripts/mksdcard16
1 files changed, 14 insertions, 2 deletions
diff --git a/INSTALL/tools/scripts/mksdcard b/INSTALL/tools/scripts/mksdcard
index 126105b..9a4cb64 100755
--- a/INSTALL/tools/scripts/mksdcard
+++ b/INSTALL/tools/scripts/mksdcard
@@ -56,6 +56,7 @@ initdisk() {
make_image() {
local imgtar=$1
local ydir=$(dirname $imgtar)
+ local machine=$(cd $ydir && basename $(pwd -P))
local image=$2
local size=$3
local tmpd=/tmp/dir$$
@@ -75,8 +76,19 @@ make_image() {
sudo mkdir $tmpd
sudo mount $loop $tmpd
echo "Extracting image tarball..."
- sudo tar pjxf $imgtar -C $tmpd --xattrs-include='*'
- sudo cp $ydir/uImage+dtb $tmpd/boot
+ sudo tar-1.28 pjxf $imgtar -C $tmpd --xattrs-include='*'
+ echo "Detected machine $machine"
+ case $machine in
+ porter)
+ sudo cp -v $ydir/uImage+dtb $tmpd/boot
+ ;;
+ m3ulcb|h3ulcb)
+ sudo cp -v $ydir/Image-*-$machine.dtb $tmpd/boot
+ ;;
+ *)
+ echo "Unknown machine '$machine': don't know how to handle kernel ..." >&2
+ ;;
+ esac
sudo umount $loop
sudo losetup -d $loop
sudo rmdir $tmpd