diff options
author | Daniel Thompson <daniel.thompson@linaro.org> | 2017-07-30 08:09:38 +0100 |
---|---|---|
committer | Daniel Thompson <daniel.thompson@linaro.org> | 2017-07-31 17:26:29 +0100 |
commit | 828e1efab7ac90cf805e0b795ea929d522ea6532 (patch) | |
tree | fe9a23bebae7cf311098ff35dcecd5027ea7dba5 | |
parent | df50dc692ed3f2b0a8654a59afd21c86f36eeb68 (diff) |
tools: RDA support
-rw-r--r--[-rwxr-xr-x] | tools/checkpatch.pl | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | tools/checkstack.pl | 0 | ||||
-rw-r--r-- | tools/gcc-version.sh | 32 | ||||
-rwxr-xr-x | tools/img2srec | bin | 0 -> 10432 bytes | |||
-rw-r--r--[-rwxr-xr-x] | tools/jtagconsole | 0 | ||||
-rwxr-xr-x | tools/mkenvimage | bin | 0 -> 14592 bytes | |||
-rw-r--r-- | tools/mkenvimage.c | 2 | ||||
-rwxr-xr-x | tools/mkimage | bin | 0 -> 74576 bytes | |||
-rw-r--r-- | tools/mkimage.c | 2 | ||||
-rw-r--r-- | tools/mkrdaimage.sh | 113 | ||||
-rw-r--r--[-rwxr-xr-x] | tools/netconsole | 0 |
11 files changed, 147 insertions, 2 deletions
diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl index 2048a449b5..2048a449b5 100755..100644 --- a/tools/checkpatch.pl +++ b/tools/checkpatch.pl diff --git a/tools/checkstack.pl b/tools/checkstack.pl index c1cdc0a92a..c1cdc0a92a 100755..100644 --- a/tools/checkstack.pl +++ b/tools/checkstack.pl diff --git a/tools/gcc-version.sh b/tools/gcc-version.sh new file mode 100644 index 0000000000..debecb5561 --- /dev/null +++ b/tools/gcc-version.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# +# gcc-version [-p] gcc-command +# +# Prints the gcc version of `gcc-command' in a canonical 4-digit form +# such as `0295' for gcc-2.95, `0303' for gcc-3.3, etc. +# +# With the -p option, prints the patchlevel as well, for example `029503' for +# gcc-2.95.3, `030301' for gcc-3.3.1, etc. +# + +if [ "$1" = "-p" ] ; then + with_patchlevel=1; + shift; +fi + +compiler="$*" + +if [ ${#compiler} -eq 0 ]; then + echo "Error: No compiler specified." + printf "Usage:\n\t$0 <gcc-command>\n" + exit 1 +fi + +MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1) +MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1) +if [ "x$with_patchlevel" != "x" ] ; then + PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1) + printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL +else + printf "%02d%02d\\n" $MAJOR $MINOR +fi diff --git a/tools/img2srec b/tools/img2srec Binary files differnew file mode 100755 index 0000000000..7dd8e0c972 --- /dev/null +++ b/tools/img2srec diff --git a/tools/jtagconsole b/tools/jtagconsole index d404fac5e8..d404fac5e8 100755..100644 --- a/tools/jtagconsole +++ b/tools/jtagconsole diff --git a/tools/mkenvimage b/tools/mkenvimage Binary files differnew file mode 100755 index 0000000000..b2233a13a1 --- /dev/null +++ b/tools/mkenvimage diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index bfc4eb636b..1a53e20f87 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -41,7 +41,7 @@ #include "compiler.h" #include <u-boot/crc.h> -#include <version.h> +#include "generated/version_autogenerated.h" #define CRC_SIZE sizeof(uint32_t) diff --git a/tools/mkimage b/tools/mkimage Binary files differnew file mode 100755 index 0000000000..9dd3476908 --- /dev/null +++ b/tools/mkimage diff --git a/tools/mkimage.c b/tools/mkimage.c index eeb1b10668..597147d141 100644 --- a/tools/mkimage.c +++ b/tools/mkimage.c @@ -23,7 +23,7 @@ #include "mkimage.h" #include <image.h> -#include <version.h> +#include "generated/version_autogenerated.h" static void copy_file(int, const char *, int); static void usage(void); diff --git a/tools/mkrdaimage.sh b/tools/mkrdaimage.sh new file mode 100644 index 0000000000..c9573242b6 --- /dev/null +++ b/tools/mkrdaimage.sh @@ -0,0 +1,113 @@ +#!/bin/bash + +#bootloader layout + +#normal bootloader(for pagesize_is_power_of_2) +################################# +# # +# 48K (spl.img + padding 0) # +# # +# # +################################# +# # +# # +# 24K resevered for part table # +# (fill 0) # +# # +################################# +# # +# # +# u-boot # +# # +# # +################################# + +#pagesize not aligned bootloader(pagesize is 12288, not power_of_2) +#e.g. 12k pagesize +################################# +# # +# spl(1st 2k) # +# # +# # +################################# +# # +# 10K (padding with 0xff) # +# # +# # +################################# +# # +# spl(2nd 2k) # +# # +# # +################################# +# # +# 10K (padding with 0xff) # +# # +# # +################################# +# # +# .... # +# # +# # +################################# +# # +# spl(24th 2k) # +# # +# # +################################# +# # +# 10K (padding with 0xff) # +# # +# # +################################# +# # +# # +# 24K resevered for part table # +# (fill 0) # +# # +################################# +# # +# # +# u-boot # +# # +# # +################################# +pagesize=$1 +spl_image=$2 +uboot_image=$3 +spl_append_to=$4 +output_image=$5 +#expand the spl to whole 48k +dd if=/dev/zero ibs=1k count=48 of=spl-padding.img obs=1k conv=sync >& /dev/null +dd if=$spl_image of=spl-padding.img bs=2k conv=notrunc >& /dev/null + +temp_image=tmp_image +if [ $pagesize -eq 12288 ] +then : + #segments is the max_sizeof_spl(48K) / 2k(romcode's real pagesize) + segments=24 + i=0 + iblock=0 + oblock=0 + tr "\000" "\377" < /dev/zero | dd ibs=12k count=26 of=$temp_image conv=sync + while [ $i -lt $segments ] + do + #echo "read " "spl-padding.img" " pos " $iblock + #echo "write to " $temp_image " pos " $oblock + dd if=spl-padding.img of=$temp_image ibs=1k skip=$iblock obs=1k\ + seek=$oblock count=2 conv=notrunc >& /dev/null + i=$[$i + 1] + iblock=$[$iblock + 2] + oblock=$[$oblock + 12] + done + #echo "write to " $temp_image " pos " $oblock + dd if=/dev/zero of=$temp_image ibs=1k obs=1k seek=$oblock count=24 \ + conv=notrunc >& /dev/null +else #this is normal case + dd if=/dev/zero ibs=1k count=$spl_append_to of=$temp_image obs=1k \ + conv=sync >& /dev/null + dd if=spl-padding.img of=$temp_image bs=2k conv=notrunc >& /dev/null +fi +cat $temp_image $uboot_image > $output_image +rm -rf $temp_image spl-padding.img + diff --git a/tools/netconsole b/tools/netconsole index c8109bb095..c8109bb095 100755..100644 --- a/tools/netconsole +++ b/tools/netconsole |