Changeset 68a5f751 in rtems


Ignore:
Timestamp:
02/25/19 22:30:11 (5 years ago)
Author:
Pierre-Louis Garnier <garnie_a@…>
Branches:
5, master
Children:
e99847bf
Parents:
ecf62845
git-author:
Pierre-Louis Garnier <garnie_a@…> (02/25/19 22:30:11)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/27/19 06:45:12)
Message:

arm/beagle: Fix sdcard.sh tool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsps/arm/beagle/simscripts/sdcard.sh

    recf62845 r68a5f751  
    1010rm -rf $TMPDIR
    1111mkdir -p $TMPDIR
     12trap 'rm -rf $TMPDIR' EXIT
    1213
    13 if [ $# -ne 2 ]
    14 then    echo "Usage: $0 <RTEMS prefix> <RTEMS executable>"
     14if [ $# -ne 3 ]
     15then    echo "Usage: $0 <RTEMS prefix> <RTEMS executable> <Device Tree Blob>"
    1516        exit 1
    1617fi
     
    4041esac
    4142
     43dtb="$3"
     44
    4245app=rtems-app.img
    4346
     
    6063# Prepare the executable.
    6164base=`basename $executable`
    62 $PREFIX/bin/arm-rtems4.12-objcopy $executable -O binary $TMPDIR/$base.bin
     65$PREFIX/bin/arm-rtems5-objcopy $executable -O binary $TMPDIR/$base.bin
    6366gzip -9 $TMPDIR/$base.bin
    6467$PREFIX/bin/mkimage -A arm -O rtems -T kernel -a 0x80000000 -e 0x80000000 -n RTEMS -d $TMPDIR/$base.bin.gz $TMPDIR/$app
    6568echo "setenv bootdelay 5
    6669uenvcmd=run boot
    67 boot=fatload mmc 0 0x80800000 $app ; bootm 0x80800000" >$TMPDIR/$UENV
     70boot=fatload mmc 0 0x80800000 $app ; fatload mmc 0 0x88000000 $(basename "$dtb") ; bootm 0x80800000 - 0x88000000" >$TMPDIR/$UENV
    6871
    6972# Copy the uboot and app image onto the FAT image
     
    7275$PREFIX/bin/mcopy -bsp -i $FATIMG $TMPDIR/$app ::$app
    7376$PREFIX/bin/mcopy -bsp -i $FATIMG $TMPDIR/$UENV ::$UENV
     77# Copy DTB
     78$PREFIX/bin/mcopy -bsp -i $FATIMG "$dtb" ::"$(basename "$dtb")"
    7479
    7580# Just a single FAT partition (type C) that uses all of the image
     
    7984dd if=$FATIMG of=$IMG seek=$OFFSET
    8085
    81 # cleanup
    82 rm -rf $TMPDIR
    83 
    8486echo "Result is in $IMG."
Note: See TracChangeset for help on using the changeset viewer.