source: rtems/testsuites/fstests/fsdosfsname01/create_image.sh @ ea092ccc

Last change on this file since ea092ccc was ea092ccc, checked in by Sebastian Huber <sebastian.huber@…>, on Jun 7, 2018 at 4:13:38 AM

tools: Remove rtems-bin2c

This tool is now included in the RTEMS tools repository.

Close #3380.

  • Property mode set to 100755
File size: 1.1 KB
Line 
1#!/bin/sh
2
3#  Copyright (c) 2013 embedded brains GmbH.
4#
5#  The license and distribution terms for this file may be
6#  found in the file LICENSE in this distribution or at
7#  http://www.rtems.org/license/LICENSE.
8
9
10IMAGE=image
11IMAGE_BIN=$IMAGE.bin
12FILES_H=files.h
13MNT=create_image_mnt
14
15if [ -e "$1" ]
16  then
17    rm -r -f $MNT
18    sudo umount "$1"
19    mkdir $MNT
20    sudo mount -t msdos "$1" $MNT
21    sleep 2
22    sudo mv "$MNT/$FILES_H" ./$FILES_H
23    sudo touch ./$FILES_H
24    sudo umount $MNT
25    rmdir $MNT
26
27    sudo dd if="$1" of="$IMAGE_BIN"
28
29    rtems-bin2c -C -c "$IMAGE_BIN" "$IMAGE"
30    mv "$IMAGE".c "$IMAGE".h
31    rm -f "$IMAGE_BIN"
32  else
33    echo ""
34    echo "$0 <DEV_NAME>"
35    echo "Will move file \"files.h\" from the device DEV_NAME to the current directory"
36    echo "and will then create an image of device DEV_NAME and convert the"
37    echo "image to file image.h in the current directory."
38    echo ""
39    echo "This script is intended to be used with USB memory sticks written by"
40    echo "application create_fat_test_image/Create_Files under MS Windows"
41    echo ""
42fi
Note: See TracBrowser for help on using the repository browser.