summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Merge branch 'for-next/imx'Sascha Hauer2014-10-022-28/+35
|\ \
| * | imx-image: handle i.MX35 special caseEric Bénard2014-09-251-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the i.MX35 user manual : Since MLC NAND Flash devices do not guarantee error-free boot blocks, the i.MX35 boot code requires that the first 4 Kbytes of boot code be duplicated in a subsequent block to serve as a second copy option. Actually imx-image puts the image at 4k but it seems that the i.MX35 bootrom copies only from 8k as it expects that there is a copy of the first 0-4k in 4k-8k (and is supposed to use this copy if there is an ECC error in the first 4k) as we can see in the following lines : barebox@Eukrea CPUIMX35:/ md -s /dev/nand0 0x0 00000000: ea0003fe eafffffe eafffffe eafffffe ................ 00000010: eafffffe eafffffe eafffffe eafffffe ................ 00000020: 65726162 00786f62 00000000 00000000 barebox......... =-> header is @ 0 in flash barebox@Eukrea CPUIMX35:/ md -s /dev/nand0 0x1000 00001000: 56341200 00000000 0001eda1 00000000 ..4V............ 00001010: 00000000 00000000 00000000 00000000 ................ =-> so we have data @ 0x1000 in flash barebox@Eukrea CPUIMX35:/ md 0x87f00000 87f00000: 00000000 00000000 00000000 00000000 ................ 87f00010: 00000000 00000000 00000000 00000000 ................ =-> but we don't find this data in RAM barebox@Eukrea CPUIMX35:/ md -s /dev/nand0 0x2000 00002000: ea000012 eafffffe eafffffe eafffffe ................ 00002010: eafffffe eafffffe eafffffe eafffffe ................ 00002020: 65726162 00786f62 00000000 00034272 barebox.....rB.. =-> so we have the image @ 0x2000 in flash barebox@Eukrea CPUIMX35:/ md 0x87f01000 87f01000: ea000871 eafffffe eafffffe eafffffe q............... 87f01010: eafffffe eafffffe eafffffe eafffffe ................ 87f01020: 65726162 00786f62 87f02000 0003b520 barebox.. .. ... =-> and we find it in RAM Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | imx-image: Handle check commands correctlySascha Hauer2014-09-191-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | The length of two subsequent check commands was incorrectly calculated. The check commands have a fixed length anyway, so program a fixed length in the check command and skip the code from check_last_dcd. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | imx-usb-loader: Skip unknown tagsSascha Hauer2014-09-191-2/+4
| |/ | | | | | | | | | | | | | | | | | | Instead of bailing out skip unknown tags. These tags are usually doing operations to poll for a certain register state. The correct solution is to implement this register polling, but for now delay execution for a while and assume the register has the correct state afterwards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / scripts: mk-am3xxx-spi-image: fix wrong assumptions about SPI imagesSascha Hauer2014-09-263-42/+38
|/ | | | | | | | | | | | | | | | | | | | | | | | We assumed that there is a special image format for SPI. This is not the case. The AM33xx can boot either images generated with omap_signGP or raw images which only have the image size and load address in front of the image. Whether these images are booted from SPI or another boot medium doesn't matter. The only special thing about SPI is that the image is in big endian format. - renames mk-am3xxx-spi-image.c to mk-omap-image.c as the image format is not only supported by AM3xxx but also by the OMAP SoCs - removes the option to specify the SoC - introduces -s to build a big endian image - detects if an image already is an image generated with omap_signGP So the behaviour is like this: raw image -> mk-omap-image -> prepend size/address -> image for SD/MMC raw image -> mk-omap-image -s -> prepend size/address, big endian swap -> image for SPI CH image -> mk-omap-image -> nothing, input == output CH image -> mk-omap-image -s -> big endian swap -> image for SPI Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Fix barebox metadataPhilipp Zabel2014-09-041-1/+1
| | | | | | | | | Patch 97e81f2d78f3 (Add support for metadata in barebox images) writes the wrong length for the model tag in the barebox metadata. Fix this to use the correct value. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: gitignore: update based on MakefileAndreas Pretzsch2014-09-011-9/+11
| | | | | | | | | Create up-to-date list of hostprogs and targetprogs based on Makefile. Have this list sorted like the targets in the Makefile to ease maintenance. Also move some leftovers from root .gitignore over here. Signed-off-by: Andreas Pretzsch <apr@cn-eng.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: add bareboximd{,-target} to .gitignoreAntony Pavlov2014-09-011-0/+2
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-image: add input validation to mwLucas Stach2014-09-011-3/+18
| | | | | | | | | | Stop and print a helpful message if we encounter an illegal token while parsing the DCD config, instead of silently swallowing the error and pushing random stuff into the DCD. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile.lib: imxcfg: fix include pathLucas Stach2014-09-011-1/+1
| | | | | | | | | MACH is not defined in this context, also it's very unlikely that we will use the imximg tool with an other arch than IMX, so just hardcode the path. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/metadata'Sascha Hauer2014-08-0717-17/+246
|\ | | | | | | | | | | | | Conflicts: arch/arm/dts/Makefile common/Makefile lib/Makefile
| * Add support for metadata in barebox imagesSascha Hauer2014-08-074-1/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's often useful to get some information about a barebox image before starting or flashing it. This patch introduces barebox Image MetaData (IMD). When enabled a barebox image will contain a list of tags containing the desired information. We have tags for: - the barebox release (2014.07.0-00160-g035de50-dirty) - the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014) - the board model the image is intended for - the device tree toplevel compatible property Also there is an additional generic key-value store which stores parameters for which no dedicated tag exists. In this patch it is used for the memory size an image supports. Since there is no fixed offset in a barebox image which can be used for storing the information, the metadata is stored somewhere in the image and found by iterating over the image. This works for most image types, but obviously not for SoC images which are encoded or encrypted in some way. There is a 'imd' tool compiled from the same sources for barebox, for the compile host and for the target, so the metadata information is available whereever needed. For device tree boards the model and of_compatible tags are automatically generated. Example output of the imd tool for a Phytec phyFLEX image: build: #889 Wed Jul 30 16:08:54 CEST 2014 release: 2014.07.0-00167-g6b2070d-dirty parameter: memsize=1024 of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * make: Use shell script to generate .dtb.S filesSascha Hauer2014-08-072-15/+17
| | | | | | | | | | | | | | Using shell in make to generate an assembly file is not very readable and extendable. Add an external shell script instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * dtc: compile fdtgetSascha Hauer2014-08-0713-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | We need fdtget in subsequent patches, so compile it. Unfortunately this is not straight forward. fdtget needs libfdt, but the Kernel Build System is not prepared for compiling libraries for the host or binaries from files in multiple directories. This patch moves the libfdt files to the dtc toplevel directory and compiles fdtget as a binary from multiple source files but from the same directory. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * make: build device trees with obj-dtb-y and pbl-dtb-ySascha Hauer2014-08-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | To build an object file from a device tree currently we currently have to add them to the Makefile twice, once to dtb-y and once to obj-y. This patch introduces obj-dtb-y and pbl-dtb-y to directly compile a device tree object file for inclusion in the barebox binary or the pbl respectively. The now unneeded dtb-y targets are removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>