Commit Graph

857 Commits

Author SHA1 Message Date
Tom Rini
297faccca2 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2015-10-13 08:37:38 -04:00
Vagrant Cascadian
0219e4bfb4 Fix variation in timestamps caused by timezone differences.
When building with SOURCE_DATE_EPOCH set, avoid use of mktime in
default_image.c, which converts the timestamp into localtime. This
causes variation based on timezone when building u-boot.img and
u-boot-sunxi-with-spl.bin targets.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Tested-by: Paul Kocialkowski <contact@paulk.fr>
Acked-by: Paul Kocialkowski <contact@paulk.fr>
2015-10-11 17:12:12 -04:00
Tom Rini
354973076a tools/mkimage.c: Clarify help text for -D slightly
Try and make it clear that -D will replace all arguments passed to dtc
and is not appending them.

Signed-off-by: Tom Rini <trini@konsulko.com>
2015-10-11 17:12:11 -04:00
Troy Kisky
61903b759a imximage: fix commands other than write_data
When CHECK_BITS_SET was added, they forgot to add
a new command table, and instead overwrote the
previous table.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
2015-10-07 13:43:15 +02:00
Troy Kisky
835c30e368 imximage: header.length of 4 is valid
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2015-10-07 13:24:35 +02:00
Tom Rini
2959f936c5 Merge git://git.denx.de/u-boot-marvell 2015-09-30 20:20:59 -04:00
Stefan Roese
e29f1db3dd tools: kwboot: Add support for UART boot mode patching for Armada XP/38x
Currently, kwboot only allows dynamic UART boot mode patching for SoCs
with header version 0 (Orion, Kirkwood). This patch now enables this "-p"
feature also for SoCs with header version 1 (Armada XP / 38x etc). With
this its possible now to use the UART boot mode without on images that
are generated for other boot devices, like SPI. So no need to change
BOOT_FROM to "uart" for UART xmodem booting any more.

Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: Kevin Smith <kevin.smith@elecsyscorp.com>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
2015-10-01 02:02:06 +02:00
Bernhard Nortmann
a188438175 sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant
This patch follows up on a discussion of ways to improve support
for the sunxi FEL ("USB boot") mechanism, especially with regard
to boot scripts, see:
https://groups.google.com/d/msg/linux-sunxi/wBEGUoLNRro/rHGq6nSYCQAJ

The idea is to convert the (currently unused) "pad" bytes in the
SPL header into an area where data can be passed to U-Boot. To
do this safely, we have to make sure that we're actually using
our "sunxi" flavor of the SPL, and not the Allwinner boot0.

The modified mksunxiboot introduces a special signature to the
SPL header in place of the "pub_head_size" field. This can be
used to reliably distinguish between compatible versions of sunxi
SPL and anything else (older variants or Allwinner's boot0).

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-09-29 11:50:07 +02:00
Bernhard Nortmann
e954eb8028 sunxi: move SPL-related definitions to platform-specific include
The sunxi platform currently doesn't seem to make any use of the
asm/arch-sunxi/spl.h file. This patch moves some declarations from
tools/mksunxiboot.c into it.

This enables us to reuse those definitions when extending the
sunxi board code (boards/sunxi/boards.c).

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-09-29 11:50:07 +02:00
Bin Meng
4440ececed tools: moveconfig: Update the URL for nds32 toolchain
Give a full URL for a working nds32 toolchain for U-Boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-09-28 11:03:55 -04:00
Josh Wu
3e4dad5032 tools: gen_eth_addr: add getpid() to time(0) to avoid duplicated seed
As 'time(0) | getpid()' will have a lot of duplicated value. It is not a
expected behavior. We expect different value for the seed when when run
it in many times.

So this patch will left shift the getpid() and add to time(0). That
avoid duplicated value.

Test command is like:
  % RUN=0; while [ $RUN -lt 10000 ]; do
  tools/gen_eth_addr; RUN=$(($RUN+1)); done | sort | uniq | wc -l
  10000

This patch is incorporated with suggestions made by Wolfgang Denk and Andreas
Bießmann. Thanks them a lot.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Wolfgang Denk <wd@denx.de>
Tested-by: Wolfgang Denk <wd@denx.de>
2015-09-28 10:48:25 -04:00
Michael Heimpold
b5e7586a73 mxs: mxsboot: fix endianess for sd boot images
Running mxsboot on a big-endian system produces a sd image which
cannot be started by the i.MX28 ROM. It complains on the debug
uart as following:
0x8020a009
          0x80502008
0x8020a009
          0x80502008
...

Enforcing all fields within the BCB to little-endian make
the image bootable again.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Acked-by: Stefano Babic <sbabic@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2015-09-13 10:19:40 +02:00
Tom Rini
b1fc3c56d2 Merge branch 'master' of http://git.denx.de/u-boot-sunxi 2015-09-11 13:05:05 -04:00
Siarhei Siamashka
bfb05d0187 sunxi: Ensure that 'mksunxiboot' tool produces deterministic output
Currently some uninitialized padding bytes are written to the output
file, as can be confirmed with valgrind:

$ valgrind tools/mksunxiboot spl/u-boot-spl.bin spl/sunxi-spl.bin

==5581== Syscall param write(buf) points to uninitialised byte(s)
==5581==    at 0x4F0F940: __write_nocancel (in /lib64/libc-2.20.so)
==5581==    by 0x400839: main (in /tmp/u-boot/tools/mksunxiboot)
==5581==  Address 0xffeff5d3c is on thread 1's stack
==5581==  in frame #1, created by main (???)

This patch fixes the problem by clearing the whole structure instead
of just a portion of it.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-09-10 20:20:45 +02:00
Simon Glass
8270e3c12e buildman: Improve the config comparison feature
At present buildman can compare configurations between commits but the
feature is less useful than it could be. There is no summary by architecture
and changes are not reported on a per-board basis.

Correct these deficiencies so that it is possible to see exactly what is
changing for any number of boards.

Note that 'buildman -b <branch> -C' is recommended for any build where you
will be comparing configuration. Without -C the correct configuration will
not be reported since changes will often not be picked up.

Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2015-09-09 07:48:03 -06:00
Masahiro Yamada
8d3595a42b Revert "patman: use -D option for git format-patch"
This reverts commit 19b4a33698.

Since that commit, patman generates useless patches for file removal;
"git format -D" prints only the header but not the diff when deleting
files, and "git am" always refuses such patches.

The following is the quotation from "man git-format-patch":

  -D, --irreversible-delete
    Omit the preimage for deletes, i.e. print only the header but
    not the diff between the preimage and /dev/null. The resulting
    patch is not meant to be applied with patch nor git apply; this
    is solely for people who want to just concentrate on reviewing
    the text after the change. In addition, the output obviously
    lack enough information to apply such a patch in reverse, even
    manually, hence the name of the option.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-09-09 07:48:03 -06:00
Bin Meng
e6378e1da2 x86: ifdtool: Support checking region overlap before U-Boot
We have the capability to check regions written after U-Boot that
do not overlap. Since regions can also be written before U-Boot,
add such check for these too.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Andy Pont <andy.pont@sdcsystems.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2015-09-09 07:48:03 -06:00
Tom Rini
c9feb427ab Merge git://git.denx.de/u-boot-rockchip 2015-09-03 14:57:09 -04:00
Sjoerd Simons
dd39bcaffb rockchip: Drop first 32kb of zeros from the rkSD image type
Instead of creating a rockchip SPL SD card image with 32KB of zeros
which can be written to the start of an SD card, create the images with
only the useful data that should be written to an offset of 32KB on the
SD card.

The first 32 kilobytes aren't needed for bootup and only serve as
convenient way of accidentally obliterating your partition table.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
2015-09-02 21:28:25 -06:00
Simon Glass
10b84fe1b5 rockchip: Add support for the SPI image
The Rockchip boot ROM requires a particular file format for booting from SPI.
It consists of a 512-byte header encoded with RC4, some padding and then up
to 32KB of executable code in 2KB blocks, separated by 2KB empty blocks.

Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
converted to this format. This allows booting from SPI flash on supported
machines.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-09-02 21:28:23 -06:00
Simon Glass
f9a3c278b9 rockchip: Add support for the SD image
The Rockchip boot ROM requires a particular file format. It consists of
64KB of zeroes, a 512-byte header encoded with RC4, and then some executable
code.

Add support to mkimage so that an SPL image (u-boot-spl-dtb.bin) can be
converted to this format.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-09-02 21:28:23 -06:00
Simon Glass
a131c1f442 rockchip: Add the rkimage format to mkimage
Rockchip SoCs require certain formats for code that they execute, The
simplest format is a 4-byte header at the start of a binary file. Add
support for this so that we can create images that the boot ROM understands.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-09-02 21:28:23 -06:00
Simon Glass
1b99e5bbb6 mkimage: Allow the original file size to be recorded
Allow the image handler to store the original input file size so that it
can reference it later.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2015-09-02 21:28:23 -06:00
Simon Glass
424b86ae59 mkimage: Allow padding to any length
At present there is an arbitrary limit of 4KB for padding. Rockchip needs
more than that, so remove this restriction.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2015-09-02 21:28:23 -06:00
Jörg Krause
cef9f020c1 tools: mxsboot: calculate ECC block level dynamically
For pages of 2048 bytes the current setting of the ECC Error Correction Level
is only true for an oob size of 64 bytes and wrong for all others.

Instead of hard-coding every possible combination of page size and oob size use
the dynamic calculation of the ECC strength introduced in commit
6121560d77.

Cc: Marek Vasut <marex@denx.de>
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Acked-by: Marek Vasut <marex@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2015-09-02 15:26:11 +02:00
Baruch Siach
b893c9898c tools/imximage: set DCD pointer to NULL when its length is 0
When dcd_len is 0 the Write Data command that the set_dcd_rst_v2() routine
generates is empty. This causes HAB to complain that the command is invalid.

--------- HAB Event 1 -----------------
event data:
	0xdb 0x00 0x0c 0x41 0x33 0x06 0xc0 0x00
	0xcc 0x00 0x04 0x04

To fix this set the DCD pointer in the IVT to NULL in this case. The DCD header
itself is still needed for detect_imximage_version() to determine the image
version.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Stefano Babic <sbabic@denx.de>
2015-09-02 15:25:27 +02:00
Simon Glass
d9917b0b6c buildman: Correct 'Series-cover-cc' detection logic
This requires 'Series-cover_cc' at present which is incorrect. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-08-31 07:57:26 -06:00
Tom Rini
a679cc0118 tools/atmelimage.c: Fix warning when debug is enabled
Otherwise we get:
tools/atmelimage.c:134:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat=]
debug("atmelimage: interrupt vector #%d is 0x%08X\n", pos+1,
^

Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2015-08-28 14:01:11 -04:00
Ulf Magnusson
90c36d8ab9 kconfiglib: update to the latest version
Corresponds to ba71a0e (Fix _parse_block() 'parent' documentation re.
ifs.) from upstream, just adding the SPDX tag.

Has performance improvements, code cleanup, Python 3 support, and various
small fixes, including the following:

  - Unset user values when loading a zero-byte .config. (5e54e2c)
  - Ignore indented .config assignments. (f8a7510)
  - Do not require $srctree to be set for non-kernel projects. (d56e9c1)
  - Report correct locations in the presence of continuation lines.
    (0cebc87)
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2015-08-28 12:33:13 -04:00
Masahiro Yamada
19b4a33698 patman: use -D option for git format-patch
This allows Patman to generate smaller patches for file removal.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
2015-08-26 07:54:13 -07:00
Simon Glass
f86f0c1897 x86: ifdtool: Drop microcode from the device tree when collating
When ifdtool collates the microcode into one place it effectively creates
a copy of the 'data' properties in the device tree microcode nodes. This
is wasteful since we now have two copies of the microcode in the ROM.

To avoid this, remove the microcode data from the device tree and shrink it
down. This means that there is only one copy and the overall ROM space used
by the microcode does not increase.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-26 07:54:10 -07:00
Simon Glass
b098032387 x86: ifdtool: Support collating microcode into one place
The Intel Firmware Support Package (FSP) requires that microcode be provided
very early before the device tree can be scanned. We already support adding
a pointer to the microcode data in a place where early init code can access.

However this just points into the device tree and can only point to a single
lot of microcode. For boards which may have different CPU types we must
support multiple microcodes and pass all of them to the FSP in one place.

Enhance ifdtool to scan all the microcode, place it together in the ROM and
update the microcode pointer to point there. This allows us to pass multiple
microcode blocks to the FSP using its existing API.

Enable the flag in the Makefile so that this feature is used by default for
all boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-26 07:54:10 -07:00
Simon Glass
88cf322e44 x86: ifdtool: Split microcode linking into its own function
The code to set up the microcode pointer in the ROM shares almost nothing
with the write_uboot() function.

Move it into its own function so it will be easier to extend.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-26 07:54:10 -07:00
Simon Glass
3c7aab23a4 x86: ifdtool: Check that U-Boot does not overlap other regions
Since U-Boot and its device tree can grow we should check that it does not
overlap the regions above it. Track the ROM offset that U-Boot reaches and
check that other regions (written after U-Boot) do not interfere.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-08-26 07:54:10 -07:00
Stefan Agner
4fbe41c4af logos: add Toradex logo
Use the boot loader splash screen from WinCE which matches our
wallpapers position wise. Although the logo is an 8-bit indexed BMP as
well colours looked odd at first in U-Boot. After converting to full
RGB palette and converting back to an indexed BMP using imagemagick
the Logo showed up properly.

$ convert tools/logos/toradex-rgb.bmp -type Palette -colors 256 \
-compress none -verbose BMP3:tools/logos/toradex.bmp

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-08-13 07:19:37 -04:00
Bin Meng
0112432798 gitignore: Add defconfig and fdtgrep
Ignore defconfig and tools/fdtgrep.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-08-05 08:42:39 -06:00
Tom Rini
7a1af7a79b Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2015-08-02 07:40:37 -04:00
Simon Glass
9649e152cb patman: Don't run patman when it is imported as a module
Commit 488d19c (patman: add distutils based installer) has the side effect
of making patman run twice with each invocation. Fix this by checking for
'main program' invocation in patman.py. This is good practice in any case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
2015-07-31 07:31:12 -06:00
Chris Packham
488d19cbca patman: add distutils based installer
To make it easier to use patman on other projects add a distutils style
installer. Now patman can be installed with

  cd u-boot/tools/patman && python setup.py install

There are also the usual distutils options for creating source/binary
distributions of patman.

Tested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-07-28 10:36:25 -06:00
Bin Meng
9f244b27cf buildman: Correct '--fetch-arch' command documentation
The doc wrongly put sandbox in the '--fetch-arch' command. Remove it.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-07-28 10:36:22 -06:00
Paul Kocialkowski
f3f431a712 Reproducible U-Boot build support, using SOURCE_DATE_EPOCH
In order to achieve reproducible builds in U-Boot, timestamps that are defined
at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH environment
variable allows setting a fixed value for those timestamps.

Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets can be
built reproducibly. This is the case for e.g. sunxi devices.

However, some other devices might need some more tweaks, especially regarding
the image generation tools.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-07-27 15:03:14 -04:00
Masahiro Yamada
9c57487752 tools: remove mpc86x_clk tool
This is commented out in the Makefile for more than 10 years.
I assume it is proof that this tool is unused.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Pantelis Antoniou <panto@intracom.gr>
2015-07-27 15:03:13 -04:00
Adrian Alonso
0b7f7c339c imx: imximage: add new CHECK/CLR BIT command
* Extend imximage DCD version 2 to support DCD commands
  CMD_WRITE_CLR_BIT 4 [address] [mask bit] means:
    while ((*address & ~mask) != 0);
  CMD_CHECK_BITS_SET 4 [address] [mask bit] means:
    while ((*address & mask) != mask);
  CMD_CHECK_BITS_CLR 4 [address] [mask bit] means:
    *address = *address & ~mask;
* Add set_dcd_param_v2 helper function to set DCD
  command parameters

Signed-off-by: Adrian Alonso <aalonso@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
2015-07-26 12:07:14 +02:00
Stefan Roese
7ddf8cfb0d kwbimage: Rename CONFIG_SYS_SPI_U_BOOT_OFFS to CONFIG_SYS_U_BOOT_OFFS
To use this offset for other boot device (like SDIO/MMC), lets rename
it to a more generic name. This will be used be the SDIO/MMC SPL boot
support for the A38x.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
2015-07-24 09:46:21 +02:00
Stefan Roese
1bbe63c3f2 kwbimage: Add support for SDIO/MMC boot device selection
This patch adds support to select the "sdio" as boot device in the
kwbimage.cfg file. This line selects this SDIO device:

BOOT_FROM  sdio

Tested on Marvell DB-88F6820-GP board.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Luka Perkov <luka.perkov@sartura.hr>
Cc: Dirk Eibach <eibach@gdsys.de>
2015-07-24 09:45:56 +02:00
Simon Glass
92a655c326 mkimage: Set up a file size parameter and keep it updated
Some functions called by mkimage would like to know the output file size.
Initially this is the same as the input file size, but it may be affected by
adding headers, etc.

Add this information to the image parameters.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-07-21 17:39:29 -06:00
Simon Glass
1043d0a029 fdt: Add fdtgrep tool
This tool allows us to extract subsets of a device tree file. It is used by
the SPL vuild, which needs to cut down the device tree size for use in
limited memory.

This tool was originally written for libfdt but it has not been accepted
upstream, so for now, include it in U-Boot. Several utilfdt library
functions been included inline here.

If fdtgrep is eventually accepted in libfdt then we can bring that version
of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by
the user).

If it is not accepted then another approach would be to write a special
tool for chopping down device tree files for SPL. While it would use the
same libfdt support, it would be less code than fdtgrep.c because it would
not have general-purpose functions.

Another approach (which was used with v1 of this series) is to sprinkler all
the device tree files with #ifdef. I don't like that idea.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:20 -06:00
Simon Glass
5b9d44df23 mkimage: Display a better list of available image types
Offer to display the available image types in help. Also, rather than
hacking the genimg_get_type_id() function to display a list of types,
do this in the tool. Also, sort the list.

The list of image types is quite long, and hard to discover. Print it out
when we show help information.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21 17:39:20 -06:00
Stefano Babic
f448c5d320 Merge branch 'master' of git://git.denx.de/u-boot 2015-07-17 11:22:56 +02:00
Bin Meng
50e8a6bba0 tools: ifdtool: Write correct offset on 32-bit machine
On 32-bit machine strtol() returns LONG_MAX which is 0x7fffffff,
which is wrong for u-boot.rom components like u-boot-x86-16bit.bin.
Change to use strtoll() so that it works on both 32-bit and 64-bit
machines.

Reported-by: Fei Wang <wangfei.jimei@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2015-07-14 18:03:19 -06:00