summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/misc'Sascha Hauer2015-08-061-2/+2
|\
| * socfpga_mkimage: Fix/clarify error messageSascha Hauer2015-07-081-2/+2
| | | | | | | | | | | | | | | | | | The actual max_image_size may be smaller than the define MAX_IMAGE_SIZE due to the additional header needed, so print max_image_size in the error message. Also, when complaining about a too big image say how big the image actually is. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx-image: Make in-place capableSascha Hauer2015-07-161-23/+24
| | | | | | | | | | | | | | Read in the source image completely before starting to write the output image. This makes it possible to pass the same file as input and output. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx-image: Do not pad imageSascha Hauer2015-07-161-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | We have to pad the load size to the next 4k boundary, but only for the HAB4 case we actually care what data is loaded in the rest of the image. This lets the padding depend on the prepare_sign option. Background for this patch is a new yet-to-be-introduced image loading mechanism for i.MX. This new mechanism only loads the PBL portion of the image to memory, and not the whole image anymore. This means that the image in this case changes from: i.MX header (with loadsize: whole image), PBL, payload, padding to: i.MX header (with loadsize: header + PBL + padding), PBL, padding, payload With the padding between PBL and payload we are no longer able to find the payload, so we cannot add the padding there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: OMAP: Add omap3 USB loader toolSascha Hauer2015-07-022-0/+924
| | | | | | | | | | | | The OMAP3 supports uploading the first stage bootloader via USB. The ROM leaves the MUSB controller enabled and it can then be used to upload a 2nd stage image. This patch adds the omap3-usb-loader tool and the necessary barebox support to upload the 2nd stage image. The omap usb loader tool is downloaded from https://github.com/grant-h/omap_loader and changed to also accept CHSETTINGS images. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: Add mxs-usb-loader to .gitignoreSascha Hauer2015-06-181-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts/omap_signGP: Fix image size in GP headerWadim Egorov2015-06-171-0/+7
| | | | | | | | | | | | The size field in the GP header has to include its own size. This can be easily misread in the TRM. Sometimes, when the gp_header size is not included, the ROM code will not copy the complete MLO into the SRAM. This happens when the MLO file size is 98823 bytes (and the value of GP header size field is 98303 bytes). Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2015-06-093-1/+14
|\
| * scripts: update socfpga_sequencer importer to Quartus 15.0Steffen Trumtrar2015-05-153-1/+14
| | | | | | | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx-image: Correctly fill image size in prepended headerAndrey Smirnov2015-05-072-1/+12
| | | | | | | | | | | | | | | | | | If called with '-b' option 'imx-image' tool prepends barebox header to the image, but the tool does not fill the data at image size offset correctly. Fix that. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Makefile.lib: Make 'check_file_size' more flexibleAndrey Smirnov2015-05-071-3/+3
|/ | | | | | | | | | Make 'check_file_size' more flexible by not hardcoding the file whose size is going to be checked to '$@'. This way it is possible to use this subroutine to check the size of files other than the target of the rule. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-05-061-0/+35
|\
| * checkpatch: add DT compatible string documentation checksAntony Pavlov2015-04-281-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a simple check that any compatible strings in DeviceTree dts files are present in Documentation/devicetree/bindings and in dts/Bindings/. Vendor prefixes are also checked for existing in vendor-prefixes.txt. This code is based on linux v4.0-rc6 checkpatch.pl dt-checking code by Rob Herring & Florian Vaussard: Rob Herring (2): checkpatch: add DT compatible string documentation checks checkpatch: fix wildcard DT compatible string checking Florian Vaussard (3): checkpatch: fix spurious vendor compatible warnings checkpatch: check compatible strings in .c and .h too checkpatch: improve the compatible vendor match Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Rob Herring <robh@kernel.org> Cc: Florian Vaussard <florian.vaussard@epfl.ch> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | images: add HABv4 support for i.MX6Marc Kleine-Budde2015-04-153-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds high assurance boot support (HABv4) image generation to barebox, currently tested on i.MX6 only. In order to build a signed barebox image, add a new image target to images/Makefile.imx as illustrated in the diff below: - - - a/images/Makefile.imx + + + b/images/Makefile.imx @@ -163,10 +163,14 @@ image-$(CONFIG_MACH_SABRELITE) += barebox-freescale-imx6dl-sabrelite.img pblx-$(CONFIG_MACH_SABRESD) += start_imx6q_sabresd CFG_start_imx6q_sabresd.pblx.imximg = $(board)/freescale-mx6-sabresd/flash-header-mx6-sabresd.imxcfg FILE_barebox-freescale-imx6q-sabresd.img = start_imx6q_sabresd.pblx.imximg image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd.img +CSF_start_imx6q_sabresd.pblx.imximg = $(havb4_imx6csf) +FILE_barebox-freescale-imx6q-sabresd-signed.img = start_imx6q_sabresd.pblx.imximg.signed +image-$(CONFIG_MACH_SABRESD) += barebox-freescale-imx6q-sabresd-signed.img + Here the default i.MX6 CSF file $(havb4_imx6csf) is used, it's generated during build on from the template "scripts/habv4/habv4-imx6.csf.in". You can configure the paths to the SRK table and certificates via: System Type -> i.MX specific settings -> HABv4 support. The proprietary tool "cst" by Freescale tool is expected in the PATH. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | imx-image: add option to prepare image for HAB signingMarc Kleine-Budde2015-04-151-1/+12
|/ | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-image: pad generated image to 4kMarc Kleine-Budde2015-04-031-1/+14
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-image: main: make use of round_up instead of open coding itMarc Kleine-Budde2015-04-031-1/+2
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-image: mx35: increase load image size, due to dobule headerMarc Kleine-Budde2015-04-031-0/+3
| | | | | | | | | | | | | Since commit: 690e39202747 imx-image: handle i.MX35 special case the IVT+DCD header is placed both at 0x0 and 0x1000, this patch reflects this change and increases the load image size accordingly. Cc: Eric Bénard <eric@eukrea.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-image: introduce HEADER_LEN and replace several 0x1000 and 4096Marc Kleine-Budde2015-04-031-6/+7
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-image: replace 0x400 by FLASH_HEADER_OFFSETMarc Kleine-Budde2015-04-031-2/+3
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-image: add_header_v2(): replace hardcoded 0x400 by offset parameterMarc Kleine-Budde2015-04-031-3/+3
| | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2015-03-093-0/+165
|\
| * scripts: socfpga: statify sys_mgr_init_tableSteffen Trumtrar2015-03-061-0/+1
| | | | | | | | | | | | | | | | | | The preloader import-script misses the sys_mgr_init_table variable. When multiple boards are build, this will lead to compile errors, because the variable exists multiple times. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: socfpga: add coccinelle magicSteffen Trumtrar2015-03-022-0/+96
| | | | | | | | | | | | | | | | | | | | | | Use coccinelle to cleanup the imported u-boot code some more. This will remove: - debugging macros (TCL_RPT, BFM_STAGE, ALTERA_ASSERT) - empty if/else/for blocks resulting from macro deletion - some unused functions (scc_mgr_xxx) Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: add socfpga preloader-files importerSteffen Trumtrar2015-03-021-0/+68
| | | | | | | | | | | | | | | | Add script to automatically import and fixup the autogenerated handoff files into the board folder. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts/dtc: Update to upstream version 1.4.1Jan Luebbe2015-03-0532-2036/+2598
| | | | | | | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts/dtc: import update-dtc-source.sh from kernel v4.0-rc1Jan Luebbe2015-03-053-28/+61
|/ | | | | | | | | | The original script was written by Grant Likely <grant.likely@linaro.org>. The version for barebox also imports some libfdt sources, so that we are able to compile the fdtget host tool. Also remove the unused non-kconfig makefiles. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: fix warning generated by glibc 2.20Lucas Stach2015-03-023-3/+5
| | | | | | | | | | | | | Defining only _BSD_SOURCE is deprecated with version 2.20 of glibc. It has been replaced by _DEFAULT_SOURCE. The manpage says that code which wants to work in the same way on both old and new versions of glibc should simply define both symbols. Also move the definition up in fix_size as those feature flags should be defined before including any standard headers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/socfpga'Sascha Hauer2015-02-042-0/+222
|\
| * scripts: socfpga sequencer extraction toolMarkus Pargmann2015-01-132-0/+222
| | | | | | | | | | | | | | | | | | | | This script extracts the socfpga sequencer from a generated u-boot automagically. The resulting changes of the barebox tree should be enough to compile with the new sequencer. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-02-041-1/+1
|\ \
| * | scripts/checkpatch.pl: don't search for CREDITS when checking ↵Antony Pavlov2015-01-201-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | top_of_kernel_tree() The CREDITS file is removed in the commit commit 6570288f2d97d3a3dceb3e631b4e4f4305352dc8 Author: Masahiro Yamada <yamada.m@jp.panasonic.com> Date: Tue Jan 13 14:27:07 2015 +0900 Remove the CREDITS file But checkpatch.pl still trying to check it presence. There is not such CREDITS file and checkpatch.pl exits with 'Must be run from the top-level dir. of a kernel tree' message. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Fix spelling: pathes -> pathsWadim Egorov2015-01-281-2/+2
| | | | | | | | | | Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | kconfig/menu.c:590: fix warning: ‘jump’ may be used uninitialized in ↵Jean-Christophe PLAGNIOL-VILLARD2015-01-131-1/+1
|/ | | | | | | this function [-Wmaybe-uninitialized] Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: Add mxs-usb-loader toolSascha Hauer2015-01-052-0/+239
| | | | | | | | This is directly taken from the rockbox projects sbloader tool, just renamed to mxs-usb-loader to avoid confusion with bareboxes several different image tools. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: Add mxsboot toolSascha Hauer2015-01-053-1/+643
| | | | | | | Copied from U-Boot v2014.10 and changed to use getopt instead of handcrafted parsing. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: add mxsimage toolSascha Hauer2015-01-053-0/+2564
| | | | | | | | | | | | | This is copied from U-Boot v2014.10 and modified for use with barebox: - Add a main() function to make it a standalone tool - Add option to pass in the prepare stage and bootloader image as options. If the config file contains @PREP@ or @BOOTLOADER@ the string will be replaced with the actual image file passed via the -p and -b options. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/marvell'Sascha Hauer2014-12-081-14/+16
|\
| * scripts: kwboot: fix detection of timeoutUwe Kleine-König2014-11-171-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In function kwboot_xm_sendblock() the loop that implements retrying to send a boot block might be quit if kwboot_tty_send or kwboot_tty_recv return a failure. In this case the value of the variable c that is expected to hold the response byte is uninitialized and most likely still holds an ACK from the previous call to kwboot_xm_sendblock(). So the right thing to do is not to clobber rc if it's already != 0. The result of this patch in my current scenario is that kwboot dies with xmodem: Connection timed out when the SoC stops replying instead of continuing to try sending the remaining blocks which results in select() blocking for one second for each block. Fixes: 0535713bbfa0 ("scripts: add kwboot tool") Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> -- Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Gregory CLEMENT <gregory.clement@free-electrons.com> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> I also tried to increase the timeout, but without success :-(. Will test a different USB-to-RS232 adapter ... Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/kconfig'Sascha Hauer2014-12-0834-554/+707
|\ \
| * | kconfig: update to v3.18-rc6Sascha Hauer2014-11-2731-490/+678
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts/Makefile.host: Update to Linux-3.18-rc6Sascha Hauer2014-11-271-58/+16
| | | | | | | | | | | | | | | | | | Needed for new Kconfig. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | kbuild: handle multi-objs dependency appropriatelyMasahiro Yamada2014-11-272-6/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The comment in scripts/Makefile.build says as follows: We would rather have a list of rules like foo.o: $(foo-objs) but that's not so easy, so we rather make all composite objects depend on the set of all their parts This commit makes it possible! For example, assume a Makefile like this obj-m = foo.o bar.o foo-objs := foo1.o foo2.o bar-objs := bar1.o bar2.o Without this patch, foo.o depends on all of foo1.o foo2.o bar1.o bar2.o. It looks funny that foo.o is regenerated when bar1.c is updated. Now we can handle the dependency of foo.o and bar.o separately. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
* / imx-usb-loader: Add i.MX6sx supportSascha Hauer2014-11-271-0/+7
|/ | | | | | Not much to do here, only add the Product ID. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/xz'Sascha Hauer2014-11-052-0/+54
|\
| * Add xz decompression supportSascha Hauer2014-11-042-0/+54
| | | | | | | | | | | | | | | | This adds xz decompression support from the kernel. Both compressing the barebox binary with xz and decompressing xz files on the commandline is supported. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: add mailmapper, a tool to create/update mailmap fileMasahiro Yamada2014-10-171-0/+160
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tool helps to create/update the mailmap file. It runs 'git shortlog' internally and searches differently spelled author names which share the same email address. The author name with the most commits is asuumed to be a canonical real name. If the number of commits from the cananonical name is equal to or greater than 'MIN_COMMITS' (=50), the entry for the cananical name will be output. ('MIN_COMMITS' is used here because we do not want to create a fat mailmap by adding every author with only a few commits.) If there exists a mailmap file specified by the mailmap.file configuration options or '.mailmap' at the toplevel of the repository, it is used as a base file. The base file and the newly added entries are merged together and sorted alphabetically (but the comment block is kept untouched), and then printed to standard output. Usage ----- scripts/mailmapper prints the mailmapping to standard output. scripts/mailmapper > tmp; mv tmp .mailmap will be useful for updating '.mailmap' file. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-10-022-0/+13
|\
| * Add some .gitignore filesSascha Hauer2014-09-121-0/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * checkpatch.pl: check for the FSF mailing addressAntony Pavlov2014-09-121-0/+10
| | | | | | | | | | | | | | This check code is imported from Linux v3.16 checkpatch.pl. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>