9
0
Fork 0
Commit Graph

161 Commits

Author SHA1 Message Date
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