summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/marvell'Sascha Hauer2013-06-024-0/+2229
|\ | | | | | | | | Conflicts: arch/arm/Makefile
| * scripts/kwbimage: add support for NAND ECC and page size header fieldsThomas Petazzoni2013-05-171-2/+40
| | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts/kwbimage: make image_boot_mode_id() return -1 on failureThomas Petazzoni2013-05-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts/kwbimage: simplify the v1 image creationThomas Petazzoni2013-05-171-81/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts/kwbimage: make the v0 image creation more flexibleThomas Petazzoni2013-05-171-28/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts/kwbimage: add a few sanity checksThomas Petazzoni2013-05-171-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts/kwbimage: add a new function image_count_options()Thomas Petazzoni2013-05-171-0/+14
| | | | | | | | | | | | | | | | | | | | 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>
| * scripts: kwboot: add support for Marvell DoveSebastian Hesselbarth2013-05-141-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts: kwbimage: add references to Marvell Dove SoCSebastian Hesselbarth2013-05-141-4/+5
| | | | | | | | | | | | | | | | | | 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>
| * scripts: add kwboot toolThomas Petazzoni2013-05-113-1/+719
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts: new kwbimage manipulation tool for Marvell SoC boot imagesThomas Petazzoni2013-05-113-0/+1450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/imx-oftree'Sascha Hauer2013-06-022-83/+144
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/boards/freescale-mx51-pdk/board.c
| * | kbuild: always run gcc -E on *.dts, remove cmd_dtc_cppSascha Hauer2013-05-201-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | scripts: fixdep: update from v3.10-rc1Sascha Hauer2013-05-201-71/+135
| |/ | | | | | | | | | | | | | | | | | | | | | | 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>
* | scripts: Add imx-usb-loader toolSascha Hauer2013-05-317-0/+2298
| | | | | | | | | | | | | | | | 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>
* | pbl: Fix typo in make causing pbl files to be rebuiltSascha Hauer2013-05-251-1/+1
|/ | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2013-05-061-1/+1
|\
| * scripts: allow lines longer than 80 cols with printf() in checkpatchThomas Petazzoni2013-05-061-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | dtc: remove autogenerated modules.orderSascha Hauer2013-04-111-0/+0
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/zynq'Sascha Hauer2013-04-043-0/+88
|\ | | | | | | | | Conflicts: arch/arm/Makefile
| * ARM: zynq: add zynq fsbl checksum scriptSteffen Trumtrar2013-03-273-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/oftree'Sascha Hauer2013-04-0439-0/+14496
|\ \
| * | dtc: add .gitignore for generated filesLucas Stach2013-04-031-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Makefile.lib: Add dtc supportSascha Hauer2013-03-121-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | scripts: Add dtcSascha Hauer2013-03-1237-0/+14451
| |/ | | | | | | | | | | | | 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>
* / Make: update setlocalversion from the kernelSascha Hauer2013-03-091-43/+149
|/ | | | | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2013-03-042-4/+20
|\
| * bareboxenv: Return proper exit code on failure.Christian Kapeller2013-02-261-4/+12
| | | | | | | | | | | | | | | | 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>
| * Makefile.lib: introduce lwl-y for lowlevel codeJean-Christophe PLAGNIOL-VILLARD2013-02-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | OMAP4 USB BOOT: remove double line endingsVicente Bergas2013-02-251-3/+2
| | | | | | | | | | | | | | | | 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>
* | fix compiler warnings: use puts() instead of printf()Fabio Porcedda2013-02-211-1/+1
|/ | | | | | | | | | | | | | | | 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>
* Merge branch 'for-next/omap'Sascha Hauer2013-02-042-28/+44
|\
| * Merge branch 'pu/omap' into for-next/omapSascha Hauer2013-01-291-0/+11
| |\
| * | OMAP4_USB: more stable communicationsVicente Bergas2013-01-172-28/+44
| | | | | | | | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | scripts: remove now unnecessary includeSascha Hauer2013-01-201-1/+0
| |/ |/| | | | | | | | | | | include/environment.h is no longer necessary to build scripts/bareboxenv, so remove its inclusion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Makefile: move cmd_check_file_size to Makefile.libJean-Christophe PLAGNIOL-VILLARD2013-01-201-0/+11
|/ | | | | | | 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>
* let kbuild build foo/bar.o correctly张忠山2012-12-081-4/+4
| | | | | | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2012-12-071-0/+265
|\
| * Makefile: move ctags and cscope support to a shell scriptAntony Pavlov2012-12-031-0/+265
| | | | | | | | | | | | | | 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>
* | loadenv: allow more fine grained environment loadingSascha Hauer2012-11-291-1/+1
|/ | | | | | | | | | | 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>
* bareboxenv.c: simple grammatical fixRobert P. J. Day2012-11-191-2/+2
| | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* omap4: add support for booting cpu from usbVicente2012-11-165-0/+878
| | | | | Signed-off-by: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM omap spi image: print error to stderrSascha Hauer2012-10-261-1/+1
| | | | | | | 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>
* ARM omap spi image: relax size constrainsSascha Hauer2012-10-261-5/+3
| | | | | | | | 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>
* pbl: Add missing FORCESascha Hauer2012-10-261-2/+2
| | | | | | Otherwise the pbl files do not get rebuilt when the CFLAGS change. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/defaultenv-deps'Sascha Hauer2012-10-032-10/+22
|\
| * environment generation: Fix dependenciesSascha Hauer2012-09-281-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * scripts/bareboxenv: Only print information if -v is givenSascha Hauer2012-09-281-4/+11
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-0313-50/+1
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-1713-50/+1
| | | | | | | | | | | | | | | | | | | | | 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>