9
0
Fork 0
Commit Graph

228 Commits

Author SHA1 Message Date
Sascha Hauer d27b97820c Merge branch 'for-next/dts' 2014-05-05 11:05:50 +02:00
Sascha Hauer 4905948695 genenv: fix tempdir creation when target is a relative path
when $target is a path relative to $objtree the script fails.
This is because we cd to $basedir and then copy to $tempdir which
then is no longer valid. Fix this by converting $tempdir to an
absolute path first.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Christoph Fritz <chf.fritz@googlemail.com>
2014-04-29 07:57:24 +02:00
Sascha Hauer 5d0362c5d3 dts: Use dt-bindings from kernel
barebox used to have its own include/dt-bindings with files copied
from the corresponding kernel files. Use upstream dt-bindings directly
instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-28 14:18:25 +02:00
Silvio Fricke 0af79fbb67 make: fix searchpath of generated autoconf.h
If barebox is builded out-of-tree we don't find the autogenerated
autoconf.h because we search in the srctree.

With this patch we don't get this error message:

cc1: fatal error: /[...]/barebox/include/generated/autoconf.h: No such file or directory

Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 12:14:21 +02:00
Lucas Stach 4d5ad7c9c6 imx-image: don't leak file handle
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 09:05:52 +02:00
Lucas Stach 9c63e92baa treewide: fix signedness mixups in printf format specifiers
This most likely doesn't fix any real bugs, but it's the
right thing to do and reduces the noise level with static
checkers.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 09:05:51 +02:00
Vicente Bergas 06ac5fbe6c OMAP4_USBboot: Change output text formatting
The basic console used for USBboot has two different formattings,
one for text coming from the host and another for text coming from
the target.
This change makes both formattings readable regardless of the
console background color.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-03-24 07:48:38 +01:00
Sascha Hauer a8a08f88cc Merge branch 'for-next/misc'
Conflicts:
	common/environment.c
2014-03-07 09:25:09 +01:00
Sascha Hauer 2331b1d8e8 Merge branch 'for-next/marvell'
Conflicts:
	arch/arm/dts/Makefile
2014-03-07 09:25:02 +01:00
Sascha Hauer 9c2aa61703 Merge branch 'for-next/imx-image'
Conflicts:
	arch/arm/dts/Makefile
2014-03-07 09:24:46 +01:00
Sascha Hauer 24ae621e17 defaultenv: Add boot option for DFU
DFU is for device firmware upgrade, but for development purposes it's
sometmes useful to just start a kernel vie DFU. This adds a boot option
for doing this and also the corresponding counterpart on the host. With
this it's possible to boot a system with:

scripts/dfuboot.sh -k linuximage -d dtb -c "root=ubi0:root ubi.mtd=ubi rootfstype=ubifs ignore_loglevel"

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 08:14:14 +01:00
Sascha Hauer 068f213bb3 make: Add bbenv-y target to generate default environment files
This adds a target to generate environment files from directories.
These are compiled into the barebox binary.

use it as:

bbenv-$(CONFIG_SOMETHING) += my-environment

The directory containing the files to compile into the binary
should be named my-environment.

This can be accessed in C code later as:

extern unsigned char __bbenv_my_environment_start[];
extern unsigned char __bbenv_my_environment_end[];

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-21 17:06:01 +01:00
Sascha Hauer 9f6a42ac54 make: Add wildcard rules for compressed files
To simplify generating compressed files.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-18 10:42:13 +01:00
Sascha Hauer 658af1caf3 defaultenv: simplify env dependencies
Finding out whether to rebuild the environment is a difficult task
since we have to track all files in a directory. Instead of trying
this, just rebuild the environment during every build and only if
it differs to the last one overwrite the target. This way make
only sees a change when the environment is changed.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-18 10:42:07 +01:00
Alexander Shiyan f62f3affa8 scripts/kwboot: Remove redundant assignment
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-17 08:06:11 +01:00
Sascha Hauer de20596e17 ARM: i.MX: Add include directories to imximage target
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-13 11:34:29 +01:00
Alexander Shiyan 2bc655f5f5 scripts/kwbimage: Fix resource leak in image_create_payload()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-04 08:21:07 +01:00
Alexander Shiyan 84f715cb8c scripts/kwbimage: Fix resource leak in image_create()
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-04 08:21:06 +01:00
Sascha Hauer 601bf0fcc6 Merge branch 'for-next/misc' 2014-02-03 09:55:54 +01:00
Sascha Hauer c224cd3161 Merge branch 'for-next/imx'
Conflicts:
	arch/arm/boards/dmo-mx6-realq7/lowlevel.c
2014-02-03 09:55:13 +01:00
Alexander Shiyan 8462cd6c32 Make generated variables static
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-03 08:58:22 +01:00
Sascha Hauer e3ed260db7 scripts: fix_size: check magic
Instead of passing the offset to the fix_size tool check the image to
fixup for a valid header so that only recognized files are fixed up.
This makes the usage of this tool safer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-31 18:51:49 +01:00
Alexander Shiyan 9ef62b72ef scripts: imx-usb-loader: Fix memory leak
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 21:38:10 +01:00
Michael Grzeschik c54cb78978 scripts: kwbimage: fix imagebuild on 32bit host system
We have to use strtoul to run the tool working on 32bit systems.
Otherwise it will generate signed numbers for strings representing
values with the 32nd bit set.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-27 09:13:12 +01:00
Alexander Aring 64e87ad730 scripts: add kernel-install-target to gitignore
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-09 09:30:31 +01:00
Sascha Hauer fd096d9216 Merge branch 'for-next/x86' 2013-12-06 08:23:27 +01:00
Sascha Hauer 6d7fae1e97 Merge branch 'for-next/omap-devicetree-prepare' 2013-12-06 08:23:27 +01:00
Sascha Hauer e9ea6eeaab Merge branch 'for-next/misc'
Conflicts:
	scripts/Makefile
2013-12-06 08:23:24 +01:00
Sascha Hauer 0cb6f2c19e Merge branch 'for-next/imx' 2013-12-06 08:22:48 +01:00
Michael Grzeschik 1e7f2bd25c scripts: bareboxcrc32 as host and target userspacetool
This patch adds the crc32 command to be build
as host and optionally as target tool.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-04 17:17:06 +01:00
Sascha Hauer b4184e34bf scripts: imx-image: Add i.MX25 support
The i.MX25 works like the i.MX51, just add the SoC magic and the USB product
id.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 13:55:41 +01:00
Sascha Hauer 2155ed411e Make: introduce obj-pbl-y
For compiling object files both in the regular binary and the pbl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-25 08:43:44 +01:00
Alexander Aring fbc6f5b36a scripts: fix kernel-install-target config
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-20 07:21:06 +01:00
Sebastian Hesselbarth 6b5874f706 scripts: kwbimage: fix mis-sized payload
Image payload size should always be a multiple of 4 bytes. This fixes
mis-sized image payload by allocating payload buffer as multiple of 4
but load true filesize into the payload buffer.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:53:17 +01:00
Sebastian Hesselbarth 4f3570c470 scripts: kwboot: fix missing soh initialization
Xmodem blocks should start with SOH but kwboot never sets the first
block byte. This fixes kwboot's Xmodem block initialization and sets
first block byte to SOH.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-18 10:53:11 +01:00
Alexander Shiyan ddc2269a5d Makefile: Align "DTB" string to others
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 08:58:01 +01:00
Alexander Shiyan 2bd891b0ae scripts: Add fix_size & kernel-install to .gitignore
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 08:58:01 +01:00
Thomas Petazzoni df756884a3 scripts/setupmbr: fix documentation
The documentation says setupmbr should be used with the image named
'barebox', but it should instead be done with the 'barebox.bin'
image. Attempting to use setupmbr on the ELF barebox image simply
fails:

$ ./scripts/setupmbr/setupmbr -s 32 -m ./barebox -d disk.img
No MBR signature found
barebox image seems not valid: Bad MBR signature

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 08:53:43 +01:00
Alexander Shiyan a84fbbe655 imx-usb-loader: Fix signed/unsigned arguments for printf
"%i" in format string requires a signed integer.
"%d" in format string requires a signed integer.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-11 08:52:05 +01:00
Sascha Hauer c3a0d67f77 kernel-install: Add missing error messages
In some cases kernel-install can fail without printing anything. Add
error messages for these cases.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-05 08:38:05 +01:00
Sascha Hauer 61cf2b51bc add kernel-install tool for bootloader Spec
This adds a tool for installing kernels according to the bootloader
spec. systemd already has a similar tool, but it is limited to installing
kernels on the currently running system. The barebox kernel-install
tool instead can also be used to install kernels on removable media on a
development host for cross development. It is compiled in two variants,
as 'kernel-install' for the host and as 'kernel-install-target' using
$CROSS_COMPILE.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-14 15:28:06 +02:00
Sascha Hauer 904298deb0 Merge branch 'for-next/socfpga'
Conflicts:
	scripts/Makefile
2013-10-07 08:02:24 +02:00
Sascha Hauer a293dc2753 Merge branch 'for-next/omap' 2013-10-07 08:00:39 +02:00
Sascha Hauer ce8f489122 scripts/bareboxenv: Make locally used functions static
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-30 07:45:31 +02:00
Sascha Hauer 0b342aca51 scripts/omap_signGP: add getopt
Instead of using positional arguments add proper getopt support.
This also adds a help text.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 16:24:37 +02:00
Sascha Hauer ac6d924301 scripts: Move omap4_usbboot to its own directory
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 14:12:01 +02:00
Sascha Hauer b5f99965b6 scripts/Makefile: implement targetprogs-y
using obj-y for targetprogs only works until only a single program
is compiled. Adding the second one will end up in the linker trying
to link both together.

Add targetprogs-y to fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 14:11:22 +02:00
Sascha Hauer 371c36da48 scripts/Makefile: cleanup
Sort so that we have the object files on top, sorted by hostprogs-y and
then subdir-y.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-27 11:14:52 +02:00
Sascha Hauer 947d79651e scripts: Add Altera SoCFPGA mkimage support
The Altera SoCFPGAs expect a simple header for their first stage
loaders. This adds a tool to generate images for the SoCFPGAs. The
header is either embedded into the image or optionally prepended
to the image. In this case code is added to jump over the image
header.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-23 08:40:32 +02:00
Jean-Christophe PLAGNIOL-VILLARD 48eb76b554 add fix size tools
this will allow to write the size of barebox at an offset of the binary

this is needed for ARM when using relocated binary

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-18 09:17:13 +02:00