summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* kernel-install: Add missing error messagesSascha Hauer2013-11-051-2/+10
| | | | | | | 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>
* add kernel-install tool for bootloader SpecSascha Hauer2013-10-142-0/+1401
| | | | | | | | | | | | 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>
* Merge branch 'for-next/socfpga'Sascha Hauer2013-10-073-0/+289
|\ | | | | | | | | Conflicts: scripts/Makefile
| * scripts: Add Altera SoCFPGA mkimage supportSascha Hauer2013-09-233-0/+289
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/omap'Sascha Hauer2013-10-071-16/+43
|\ \
| * | scripts/omap_signGP: add getoptSascha Hauer2013-09-271-16/+43
| |/ | | | | | | | | | | | | Instead of using positional arguments add proper getopt support. This also adds a help text. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts/bareboxenv: Make locally used functions staticSascha Hauer2013-09-301-6/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: Move omap4_usbboot to its own directorySascha Hauer2013-09-277-5/+7
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts/Makefile: implement targetprogs-ySascha Hauer2013-09-271-5/+8
| | | | | | | | | | | | | | | | | | | | 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>
* | scripts/Makefile: cleanupSascha Hauer2013-09-271-10/+10
| | | | | | | | | | | | | | 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>
* | add fix size toolsJean-Christophe PLAGNIOL-VILLARD2013-09-182-0/+82
|/ | | | | | | | | 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>
* Merge branch 'for-next/mvebu'Sascha Hauer2013-09-051-0/+3
|\
| * ARM: mvebu: introduce multi image supportSascha Hauer2013-08-161-0/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-09-051-1/+1
|\ \
| * | small tweeks to build system for compatibility on MacOS XDarren Garnier2013-09-031-1/+1
| |/ | | | | | | | | Signed-off-by: Darren Garnier <dgarnier@reinrag.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / imx-image: Align image sizeSascha Hauer2013-08-151-3/+13
|/ | | | | | | 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>
* Merge branch 'for-next/misc'Sascha Hauer2013-08-051-1/+1
|\
| * create directory for dir/file.o张忠山2013-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/lz4'Sascha Hauer2013-08-051-0/+5
|\ \
| * | lib: Add support for LZ4-compressed kernelKyungsik Lee2013-07-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | scripts: run imxcfg files through cppSascha Hauer2013-07-221-2/+10
| | | | | | | | | | | | | | | | | | To allow defines and includes. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | scripts: imx-image: allow semicolon as command delimiterSascha Hauer2013-07-221-5/+34
|/ / | | | | | | | | | | | | | | | | 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>
* / ARM: generate imx dcd.S files as *.dcd.SSascha Hauer2013-07-101-1/+1
|/ | | | | | | | 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>
* Merge branch 'for-next/multi-image'Sascha Hauer2013-07-011-1/+1
|\
| * imx-image: fix path to imx-image binarySascha Hauer2013-06-261-1/+1
| | | | | | | | | | | | | | $(obj) doesn't necessarily contain the toplevel object path. Use $(objtree) for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/kconfig-update'Sascha Hauer2013-07-0133-3057/+1604
|\ \
| * | kconfig: sync to linux v3.10-rc6Sascha Hauer2013-06-2133-3057/+1604
| |/ | | | | | | | | | | This brings us some new features like directly jumping to search results. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / imx-usb-loader: Add i.MX6 Solo/DualLite supportSascha Hauer2013-06-251-1/+8
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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
|\ \