9
0
Fork 0
Commit Graph

236 Commits

Author SHA1 Message Date
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
Sascha Hauer ec102f635b Merge branch 'for-next/mvebu' 2013-09-05 10:38:46 +02:00
Sascha Hauer e147a7e2bb Merge branch 'for-next/misc' 2013-09-05 10:38:31 +02:00
Darren Garnier e6b4e599b7 small tweeks to build system for compatibility on MacOS X
Signed-off-by: Darren Garnier <dgarnier@reinrag.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-03 20:22:26 +02:00
Sascha Hauer dbd47524f4 ARM: mvebu: introduce multi image support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-16 08:45:37 +02:00
Sascha Hauer d3924e4fe5 imx-image: Align image size
Several boot modes on i.MX can't cope with partial pages or
non word aligned image lengths, so align the size to 4k.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-15 14:53:17 +02:00
Sascha Hauer 9ebb0554cd Merge branch 'for-next/misc' 2013-08-05 12:49:58 +02:00
Sascha Hauer b1aae799f9 Merge branch 'for-next/lz4' 2013-08-05 12:49:46 +02:00
Sascha Hauer 88c0f38e19 scripts: run imxcfg files through cpp
To allow defines and includes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:17:06 +02:00
Sascha Hauer cf7c8f37d6 scripts: imx-image: allow semicolon as command delimiter
When we want to pass the imxcfg files through cpp we also want to
allow defines which define multiple commands. For this to work we
have to use an additional command delimiter as we can't pass '\n'
though cpp. Use ';' for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 16:17:01 +02:00
张忠山 c6d4b14ad9 create directory for dir/file.o
kbuild: create directory for dir/file.o

When add a obj with dir to obj-y, like this

    obj-y += dir/file.o

The $(obj)/dir not created, this patch fix this.

When try to add a file(which in a subdir) to my board's obj-y, the build
progress crashed.

For example, I use at91rm9200ek board, and in kernel dir run:

  mkdir objtree
  make O=objtree at91rm9200_defconfig
  mkdir arch/arm/mach-at91/dir
  touch arch/arm/mach-at91/dir/file.c

and edit arch/arm/mach-at91/dir/file.c to add some code.
then edit arch/arm/mach-at91/Makefile, change the following line:

  obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o

to:

  obj-$(CONFIG_MACH_AT91RM9200EK) += board-rm9200ek.o dir/file.o

Now build it:

  make O=objtree

Then the error appears:
  ...
  CC      arch/arm/mach-at91/board-rm9200dk.o
  CC      arch/arm/mach-at91/board-rm9200ek.o
  CC      arch/arm/mach-at91/dir/file.o
  linux-2.6/arch/arm/mach-at91/dir/file.c:5:
    fatal error: opening dependency file
    arch/arm/mach-at91/dir/.file.o.d: No such file or directory

Check the objtree:
  LANG=en ls objtree/arch/arm/mach-at91/dir
  ls: cannot access objtree/arch/arm/mach-at91/dir: No such file or directory

It's apparently that the target dir not created for file.o

Check kbuild source code. It seems that kbuild create dirs for that in
$(obj-dirs).  But if the dir need not to create a built-in.o, It should
never in  $(obj-dirs).

So I make this patch to make sure It in  $(obj-dirs)

Signed-off-by: 张忠山 <zzs213@126.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-22 08:38:01 +02:00
Kyungsik Lee cdc837f4d9 lib: Add support for LZ4-compressed kernel
This patch adds support for extracting LZ4-compressed kernel images,
as well as LZ4-compressed ramdisk images in the kernel boot process.

This depends on the patch below
decompressor: Add LZ4 decompressor module

Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-16 08:24:30 +02:00
Sascha Hauer a884920c51 ARM: generate imx dcd.S files as *.dcd.S
The compiled in dcd images generate an intermediate assembly file. Instead
of generating them as *.S generate them as *.dcd.S to better identify them
as generated files. These are then added to .gitignore.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-07-10 14:29:06 +02:00
Sascha Hauer 939c2173a3 Merge branch 'for-next/multi-image' 2013-07-01 10:14:40 +02:00
Sascha Hauer 35faccbb1c Merge branch 'for-next/kconfig-update' 2013-07-01 09:37:28 +02:00
Sascha Hauer 82915c3a6a imx-image: fix path to imx-image binary
$(obj) doesn't necessarily contain the toplevel object path. Use
$(objtree) for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-26 23:43:19 +02:00
Sascha Hauer 61373caa29 imx-usb-loader: Add i.MX6 Solo/DualLite support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-25 16:01:39 +02:00
Sascha Hauer 34870a5ec7 kconfig: sync to linux v3.10-rc6
This brings us some new features like directly jumping to search results.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-21 08:51:19 +02:00
Sascha Hauer 89fd7e44db Merge branch 'for-next/marvell'
Conflicts:
	arch/arm/Makefile
2013-06-02 16:28:04 +02:00
Sascha Hauer 064fdcec9f Merge branch 'for-next/imx-oftree'
Conflicts:
	arch/arm/boards/freescale-mx51-pdk/board.c
2013-06-02 12:36:38 +02:00
Sascha Hauer 134a788ac5 scripts: Add imx-usb-loader tool
This adds host tools for i.MX to generate the i.MX internal
flash header format and a tool to upload these images to an
i.MX SoC via USB.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:31:41 +02:00
Sascha Hauer fa49b39bb4 pbl: Fix typo in make causing pbl files to be rebuilt
We had pbl_cc__o_c instead of pbl_cc_o_c. This caused all pbl object
files to be rebuilt everytime due to missing .cmd file.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-25 15:11:08 +02:00
Sascha Hauer c08215ada6 kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp
Based on the same Linux commit from Stephen Warren:

commit b40b25fff8205dd18124d8fc87b2c9c57f269b5f
Author: Stephen Warren <swarren@nvidia.com>
Date:   Wed Mar 6 10:58:37 2013 -0700

    kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp

    Replace cmd_dtc with cmd_dtc_cpp, and delete the latter.

    Previously, a special file extension (.dtsp) was required to trigger
    the C pre-processor to run on device tree files. This was ugly. Now that
    previous changes have enhanced cmd_dtc_cpp to collect dependency
    information from both gcc -E and dtc, we can transparently run the pre-
    processor on all device tree files, irrespective of whether they
    use /include/ or #include syntax to include *.dtsi.

    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    Acked-by: Rob Herring <rob.herring@calxeda.com>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-20 15:53:06 +02:00
Sascha Hauer c478aa16b1 scripts: fixdep: update from v3.10-rc1
This brings us the following which we need for dtb file generation.

  commit 2ab8a99661f4ce052bbad064237c441371df8751
  Author: Stephen Warren <swarren@nvidia.com>
  Date:   Wed Mar 6 10:27:45 2013 -0700

      kbuild: fixdep: support concatenated dep files

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-20 15:53:06 +02:00
Thomas Petazzoni 3b40d183eb scripts/kwbimage: add support for NAND ECC and page size header fields
The v0 header, used on Kirkwood, has some fields to indicate the type
of the NAND ECC, and the page size of the NAND. This commit adds
support for such fields, which are needed to support the Kirkwood
Guruplug platform.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:40:09 +02:00
Thomas Petazzoni e041f86013 scripts/kwbimage: make image_boot_mode_id() return -1 on failure
The function image_boot_mode_id() converts the name of a boot media
into the corresponding Marvell specific code. However, 0 that we
currently used to indicate that the boot media name wasn't found,
could potentially be a valid value. So instead we use -1 to indicate a
failure.

This is also done in preparation to the introduction of
image_nand_ecc_mode_id(), which will convert a NAND ECC mode name into
the corresponding identifier. And in this case 0 is a valid identifier
of a NAND ECC mode, so we cannot use it to indicate a failure. Since
we want image_boot_mode_id() and image_nand_ecc_mode_id() to have a
consistent behavior, we change the former in this commit. The latter
is introduced in the next commit.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:40:05 +02:00
Thomas Petazzoni 25547d663c scripts/kwbimage: simplify the v1 image creation
We now assume that at most one binary header can be added, so we no
longer need to loop for all configuration options to find the binary
blobs. We simply find the binary blob configuration option in
'binarye' and use that when we need to generate the corresponding
header.

Also, just like we did for the v0 image creation, use
image_find_option() to find the value of the different options needed
to create the main header.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:40:01 +02:00
Thomas Petazzoni e91abe2ec4 scripts/kwbimage: make the v0 image creation more flexible
Until now, the v0 image creation function was expecting the
configuration parameters to be ordered with first the configuration
parameters affecting the main header, then the DATA configuration
parameters that affect the extended header, then the payload.

However, with the recently added ability to override the destination
address or execution address, the configuration options corresponding
to those values may now appear at the end of the configuration
options. This commit allows to handle that by making the image
creation more flexible:

 - The configuration options for the main header are just searched
   amongst all options, the first match is used.

 - When building the extension header with the DATA options, all DATA
   options from the configuration file are used, in the order in which
   they appear in the kwbimage.cfg file.

This will for example allow a kwbimage.cfg for a v0 image to not
specify any destination or execution address, and simply override it
from the command line.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:39:56 +02:00
Thomas Petazzoni d60819c626 scripts/kwbimage: add a few sanity checks
This commit uses the newly introduced image_count_options() function
to:

 - See if there is any DATA option that require the creation of an
   extended header for v0 header.

 - Verify that no more than one payload has been provided when
   creating a v0 header.

 - Verify that no more than one binary payload has been provided when
   creating a v1 header. Technically speaking, it is possible to
   support several payloads, but in real life, only one gets used, so
   we will only support that to make the code simpler for now. It can
   always be extended later on if needed.

 - Verify that no more than one payload has been provided when
   creating a v1 header.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:39:51 +02:00
Thomas Petazzoni 87f6faa450 scripts/kwbimage: add a new function image_count_options()
This function returns the number of configuration elements that match
a given type. Will be used to do some sanity checking of the number of
options.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-17 07:39:39 +02:00
Sebastian Hesselbarth 87f486c7f1 scripts: kwboot: add support for Marvell Dove
Marvell Dove SoC also has an UART bootmode to upload payload after
powerup. In contrast to Kirkwood and Armada 370/XP, Dove does not
respond to a special sequence sent on UART0 but requires to be
booted into UART bootmode by bootstraps. This is usually done by
pressing a push button that will set bootstraps accordingly.

This patch adds a new option, documentation and corresponding prompts
to support the above requirements. Also a left-over option ('-p')
is removed.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-14 07:10:13 +02:00
Sebastian Hesselbarth 2f4fcf1569 scripts: kwbimage: add references to Marvell Dove SoC
This adds some references to Marvell Dove as it is also supported by
kwbimage.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-14 07:09:30 +02:00
Thomas Petazzoni 0535713bbf scripts: add kwboot tool
This tool is used with Marvell EBU SoC to trigger the UART boot mode
provided by the SoC BootROM, and push the bootloader image to the
target using the Xmodem protocol.

It has been taken from the U-Boot source code, with minor
modifications to make it work with Armada 370/XP platforms.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-11 17:23:36 +02:00
Thomas Petazzoni a2a728c416 scripts: new kwbimage manipulation tool for Marvell SoC boot images
The Marvell EBU SoCs (Kirkwood, Armada 370, Armada XP) have a BootROM
that understand a specific image format, composed of a main header,
several extension headers and a paylod. This image can be booted from
NAND, SPI, SATA, UART, NOR, etc.

This patch adds a tool that allows to extract the components and
configuration of existing images, and to create new images.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-11 17:22:55 +02:00
Sascha Hauer c8af035b41 Merge branch 'for-next/misc' 2013-05-06 09:30:28 +02:00
Thomas Petazzoni 9e809ef431 scripts: allow lines longer than 80 cols with printf() in checkpatch
The checkpatch.pl script is also used to validate user-space code in
the scripts/ directory, so it should allow printf() lines to be longer
than 80 columns.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-06 09:20:29 +02:00
Sascha Hauer 8474cc900f dtc: remove autogenerated modules.order
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 16:35:24 +02:00
Sascha Hauer 0a637bcc3c Merge branch 'for-next/zynq'
Conflicts:
	arch/arm/Makefile
2013-04-04 23:23:19 +02:00
Sascha Hauer c4da77611c Merge branch 'for-next/oftree' 2013-04-04 14:20:32 +02:00
Lucas Stach 90ab1ee199 dtc: add .gitignore for generated files
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 14:18:42 +02:00
Steffen Trumtrar 26121ef51d ARM: zynq: add zynq fsbl checksum script
The bootrom only reads an image if the correct checksum is present in the
header. The calculation is pretty simple:
sum over all words from 0x20 to 0x44
Two of this words are the image length. That is why the checksum can not be
calculated until barebox_image_size is known.
The easiest solution is a program that has to be run after make.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-27 09:23:49 +01:00
Sascha Hauer e6ec5937e3 Makefile.lib: Add dtc support
Add rules to generate dtb files from dts/dtsi files,
optionally run the source files through the preprocessor.
Also add a rule to generate object files to include in
the barbox binary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-12 18:43:31 +01:00
Sascha Hauer e748e6c601 scripts: Add dtc
This adds the devicetree compiler to barebox. This is taken
without changes from Linux v3.8

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-12 18:43:25 +01:00
Sascha Hauer d5c0d3ee9c Make: update setlocalversion from the kernel
This syncs the localversion generation with the kernel.

At least one effect is that a barebox built from a tar archive no
longer marks itself as dirty. Also it moves some stuff from a scary
Makefile to a not-so-scary shell script.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-09 20:14:15 +01:00
Sascha Hauer 13408877f4 Merge branch 'for-next/misc' 2013-03-04 09:21:37 +01:00
Christian Kapeller dd3b4f782f bareboxenv: Return proper exit code on failure.
In case environment loading/saving failed, the calling program
should be informed about that by returning a non zero exit code.

Signed-off-by: Christian Kapeller <christian.kapeller@cmotion.eu>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 15:01:54 +01:00
Vicente Bergas 8c82b1b202 OMAP4 USB BOOT: remove double line endings
From previous patch that replaced printf with puts:
 puts adds it's own line ending, so do not append it manually

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-25 09:18:03 +01:00
Jean-Christophe PLAGNIOL-VILLARD 488374c564 Makefile.lib: introduce lwl-y for lowlevel code
The lowlevel code is expected to be present only ONCE

in PBL is enabled otherwise in barebox

This fix the module support with PBL and allow to reduce the size of barebox
by drop the lowlevell init in barebox as the compiler does not discard it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:41:35 +01:00
Fabio Porcedda 638f91bd16 fix compiler warnings: use puts() instead of printf()
Use puts() because printf() isn't necessary,
to fix the following compiler warnings:

/barebox/common/menu.c: In function ‘menu_show’:
/barebox/common/menu.c:277:4: warning: format not a string literal and no format arguments [-Wformat-security]

/barebox/scripts/omap4_usbboot.c: In function ‘read_asic_id’:
/barebox/scripts/omap4_usbboot.c:101:3: warning: format not a string literal and no format arguments [-Wformat-security]

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-21 14:25:57 +01:00
Sascha Hauer cfb14ce242 Merge branch 'for-next/omap' 2013-02-04 15:49:07 +01:00
Sascha Hauer 4db0a48aec Merge branch 'pu/omap' into for-next/omap 2013-01-29 23:19:50 +01:00
Sascha Hauer 4e6c5d5ff0 scripts: remove now unnecessary include
include/environment.h is no longer necessary to build scripts/bareboxenv,
so remove its inclusion.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 16:33:02 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3de3b677ee Makefile: move cmd_check_file_size to Makefile.lib
so we can use to check pbl

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 12:51:28 +01:00
Vicente Bergas b13920c0d1 OMAP4_USB: more stable communications
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-17 18:46:40 +01:00
张忠山 6d7dcfbccf let kbuild build foo/bar.o correctly
When obj-y has foo/bar.o, kbuild can't generate
foo/bar.o according foo/bar.c. Fix this

this patch based on linux kernel
commit 521cb40b0c44418a4fd36dc633f575813d59a43d

Signed-off-by: 张忠山 <zzs213@126.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-08 12:18:53 +01:00
Sascha Hauer 86ee7f112f Merge branch 'for-next/misc' 2012-12-07 16:43:15 +01:00
Antony Pavlov df4a75c784 Makefile: move ctags and cscope support to a shell script
The scripts/tags.sh file copied from linux-3.6.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 11:01:44 +01:00
Sascha Hauer 1533521bff loadenv: allow more fine grained environment loading
This implements two new options for the loadenv command:

-s: removes (scrubs) old directory contents to be able to
    create a fresh environment from for example /dev/defaultenv
-n: no overwrite. Do not overwrite existing files. This allows
    to keep parts of the old environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-29 20:23:04 +01:00
Robert P. J. Day 7c72c5df63 bareboxenv.c: simple grammatical fix
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:16:21 +01:00
Vicente 6b4dc4d4f1 omap4: add support for booting cpu from usb
Signed-off-by: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-16 15:32:31 +01:00
Sascha Hauer 0fd1611291 ARM omap spi image: print error to stderr
Since the utility outputs the image on stdout we have to print the
error messages to stderr in order to see them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:16 +02:00
Sascha Hauer 3bd35b8993 ARM omap spi image: relax size constrains
The omap spi utility requires the image size to be a multiple of four
bytes. This seems unnecessary, we can just pad with a few bytes to
get the required alignment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:57:11 +02:00
Sascha Hauer a1e5e57759 pbl: Add missing FORCE
Otherwise the pbl files do not get rebuilt when the CFLAGS change.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-26 08:54:33 +02:00
Sascha Hauer 90d92b359d Merge branch 'for-next/defaultenv-deps' 2012-10-03 21:18:10 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Sascha Hauer bee8dddbfc Merge branch 'for-next/omap'
Conflicts:
	Makefile
2012-10-03 21:11:48 +02:00
Sascha Hauer 4517b5980f Merge branch 'for-next/misc' 2012-10-03 21:10:57 +02:00
vicencb@gmail.com 80e91f08e7 add gitignore file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-02 19:05:18 +02:00
Jan Luebbe 93ca711e64 scripts: add tool to create image for SPI boot on AM35xx
Booting from SPI on an AM35xx (and possibly other TI SOCs) requires
a special format:

- 32 bit image size in big-endian
- 32 bit load address in big-endian
- binary image converted from little- to big-endian

The mk-am35xx-spi-image tool converts barebox.bin to
this format.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-02 08:22:30 +02:00
Sascha Hauer be6e93dbdf kconfig: remove autogenerated file
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:22:01 +02:00
Sascha Hauer c8c49c14ae environment generation: Fix dependencies
The dependencies for generating the environment do not work properly:

- If files are removed from the defaultenv, a subsequent make will not
  update the default environment.
- If CONFIG_DEFAULT_ENVIRONMENT_PATH changes, the default environment
  also will not be regenerated.

This patch fixes this by introducing a cmd_env which has the content of
$(ENV_FILES) in the command so that the if_changed mechanism recognizes
a change when $(ENV_FILE) changes. This also results in a nice "  ENV "
string in the build process.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:21:44 +02:00
Sascha Hauer c861e4cab6 scripts/bareboxenv: Only print information if -v is given
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-28 16:21:30 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Sascha Hauer b1ae1bd243 Make: Fix if_changed when command contains backslashes
The call if_changed mechanism does not work when the command
contains backslashes. This basically is an issue with lzo
and bzip2 compressed kernels. The compressed binaries do not
contain the uncompressed image size, so these use size_append
to append the size. This results in backslashes in the executed
command. With this if_changed always detects a change in the
command and rebuilds the compressed image even if nothing
has changed.

Fix this by escaping backslashes in make-cmd

This was worked out together with Jan Lübbe. The same patch
has recently been accepted to the kernel.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
2012-09-16 22:10:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD 453c220be3 genenv: Allow to also specify files for the environment instead of only directories
we may specify file in the defconfig

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-11 13:43:10 +02:00
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 2012-09-05 12:59:29 +02:00
Jean-Christophe PLAGNIOL-VILLARD f7edad7cbf recursive_action: add ACTION_FOLLOWLINKS support
this is need to support symlink in envfs

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Sascha Hauer 8e724b3d3e Makefile.lib: add disasm and ln commands
disasm: For generating an disasssembly of an ELF file
ln: For creating a softlink

Use the disasm command for generating barebox.S

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-12 14:34:28 +02:00
Jean-Christophe PLAGNIOL-VILLARD 663dd028cb kbuild: allow to have custom cppflags for pbl
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Jean-Christophe PLAGNIOL-VILLARD d4c42fb33d kbuild: add pre-bootloader (pbl) target
This will allow to link compiled object to the built-in-pbl.o across the source
tree that will be finally link to the pbl.

Now we compile the source %.c in pbl-%.o and provide -D__PBL__
so we can known in the source when it's compile for barebox or the pbl.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 17:17:05 +08:00
Sascha Hauer 789fad984a Makefile.clean: include Makefiles again
This makes it possible to add architecure specific clean
targets again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 17:17:03 +08:00
Sascha Hauer fd0543ca25 Merge branch 'for-next/mkublheader' 2012-08-01 17:49:27 +02:00
Sascha Hauer e986897cd0 Merge branch 'for-next/compressed-prepare' 2012-08-01 17:49:27 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7ff489627a kbuild: Init all relevant variables used in kbuild files
import from linux 3.5-rc5

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 10:04:03 +02:00
Teresa Gámez 4c6122a2f6 scripts/checkpatch.pl: reset rpt_cleaners warnings
When running checkpatch against multiple patches and one
of them has a whitespace issue, all following patches will
contain the same note, even if they are ok.

This patch is taken from the linux kernel:

scripts/checkpatch.pl: reset rpt_cleaners warnings
b0781216e7bff68aca2fbcd275b4db7531d1e22f
Written by Mike Frysinger <vapier@gentoo.org>

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 08:34:59 +02:00
Jan Luebbe d2d4b99241 scripts/mkublheader: add program to produce an UBL image header
This image header is used for booting from SPI using the TI User
Boot Loader (UBL).

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-04 09:13:23 +02:00
Dirk Hörner 4024d9ca11 scripts/genenv: always pass template to mktemp
Passing a template to mktemp is mandatory on OS X.

Signed-off-by: Dirk Hörner <dirker@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Dirk Hörner 49356933f5 scripts/compiler.h: fixup endianess defines on OS X
Signed-off-by: Dirk Hörner <dirker@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Dirk Hörner a906e5e196 hostcc tools: include "compiler.h", fix included headers
When barebox headers get included from HOSTCC tools they should not
include other architecture specific headers as barebox might get
cross-compiled. Instead, the tool itself should include "compiler.h".

Signed-off-by: Dirk Hörner <dirker@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Sam Ravnborg f324a85e8b kbuild: Use Elfnn_Half as replacement for Elfnn_Section
The Elfnn_Section is not available on all platforms,
noteworthy are cygwin.
Use the safe replacement _Half.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-05 21:40:15 +02:00
Alexey Galakhov d1e782ed95 S5P boot header and image generator
Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-21 21:58:26 +02:00
Antony Pavlov f9b932fed9 fix typo funtion -> function
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 22:00:54 +02:00
Juergen Beisert 7e7db4c2b6 netX: add more common permissions
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-23 07:52:46 +02:00