summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Merge branch 'for-next/env'Sascha Hauer2014-08-071-2/+8
|\ \
| * | saveenv: provide a zeroed/empty/ignore environmentJuergen Borleis2014-08-011-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an external environment storage should be used in very rare and special cases, the intentional behaviour should be to ignore the external environment and always fall back to the built-in environment. By storing an empty "to be ignored" environment into the external environment a confusing error message about invalid CRC sums will go away and still the built-in environment is used. With this new option we can force the intentional behaviour. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | envfs: change API to be able to forward special flags into the envfs superblockJuergen Borleis2014-08-011-1/+1
| |/ | | | | | | | | | | | | | | | | | | In order to be able to mark an stored envfs image with special features (intentional ignore for example), we now can feed forward these flags. By forwarding a '0' for the flags nothing changes because the envfs superblock was already allocated with xzalloc. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / ARM: add Canon A1100 ROM image generationAntony Pavlov2014-08-011-0/+10
|/ | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts/checkpatch.pl: don't search for Doxyfile when checking ↵Antony Pavlov2014-07-221-1/+1
| | | | | | | | | | | | | | | | | | | top_of_kernel_tree() Doxygen documentation is removed in the commit commit 98360be0fefd58bf27df03c47d887dd676a31d73 Author: Sascha Hauer <s.hauer@pengutronix.de> Date: Tue Jun 17 10:27:03 2014 +0200 Documentation: remove doxygen documentation But checkpatch.pl still trying to check 'Doxyfile' presence. There is not such 'Doxyfile' 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>
* kconfig: Fix compiler warningSascha Hauer2014-07-051-1/+1
| | | | | | | | gcc-4.9 is too silly to recognize that *jump cannot be used uninitialized and issues a warning. Explicitly initialize *jump to avoid the warning. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-07-042-8/+9
|\ | | | | | | | | | | | | | | Conflicts: arch/arm/boards/chumby_falconwing/falconwing.c arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c arch/x86/mach-x86.dox scripts/setupmbr/setupmbr.c
| * scripts: tegra: add gitignoreLucas Stach2014-07-011-0/+1
| | | | | | | | | | | | | | Keep the git status area clean of generated binaries. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * Fix misspellings of "persistant" -> "persistent" in various placesRobert P. J. Day2014-06-301-14/+14
| | | | | | | | | | | | | | | | Fix misspellings of "persistent", including the renaming of a function to "register_persistant_environment". Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts/setupmbr: remove doxygen docsSascha Hauer2014-07-031-143/+0
| | | | | | | | | | | | This text is now in Documentation/boards/x86.rst. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Documentation: remove doxygen documentationSascha Hauer2014-06-261-103/+0
| | | | | | | | | | | | | | The doxygen documentation is long outdated. Remove it. It will be replaced with sphinx based documentation later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | kernel-install: fix return value check for getlineSascha Hauer2014-06-261-1/+1
|/ | | | | | | getline returns the number of characters read, so check for ret < 0 instead of ret. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/tegra'Sascha Hauer2014-06-0434-0/+13595
|\
| * Makefile.lib: add rule to built Tegra BCTsLucas Stach2014-05-151-0/+6
| | | | | | | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * tegra: cbootimage: remove noisy outputLucas Stach2014-05-151-5/+0
| | | | | | | | | | | | | | | | Our build is quiet by default, so don't allow cbootimage to spam our logs. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: tegra: import cbootimageLucas Stach2014-05-1533-0/+13594
| | | | | | | | | | | | | | | | | | Needed to built the BCTs and bootable images. Version 1.2 from https://github.com/NVIDIA/cbootimage.git Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: AM3xxx: Add support for building AM33xx spi imagesJan Luebbe2014-05-152-9/+45
|/ | | | | | | mk-am35xx-spi-image can only build AM35xx images. Rename the tool to mk-am3xxx-spi-image and add support for the AM33xx. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/dts'Sascha Hauer2014-05-051-2/+4
|\
| * dts: Use dt-bindings from kernelSascha Hauer2014-04-281-2/+4
| | | | | | | | | | | | | | | | barebox used to have its own include/dt-bindings with files copied from the corresponding kernel files. Use upstream dt-bindings directly instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | genenv: fix tempdir creation when target is a relative pathSascha Hauer2014-04-291-1/+20
|/ | | | | | | | | | when $target is a path relative to $objtree the script fails. This is because we cd to $basedir and then copy to $tempdir which then is no longer valid. Fix this by converting $tempdir to an absolute path first. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Christoph Fritz <chf.fritz@googlemail.com>
* make: fix searchpath of generated autoconf.hSilvio Fricke2014-04-231-1/+1
| | | | | | | | | | | | If barebox is builded out-of-tree we don't find the autogenerated autoconf.h because we search in the srctree. With this patch we don't get this error message: cc1: fatal error: /[...]/barebox/include/generated/autoconf.h: No such file or directory Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* imx-image: don't leak file handleLucas Stach2014-04-231-4/+6
| | | | | Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: fix signedness mixups in printf format specifiersLucas Stach2014-04-232-4/+4
| | | | | | | | | This most likely doesn't fix any real bugs, but it's the right thing to do and reduces the noise level with static checkers. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* OMAP4_USBboot: Change output text formattingVicente Bergas2014-03-241-8/+9
| | | | | | | | | | | The basic console used for USBboot has two different formattings, one for text coming from the host and another for text coming from the target. This change makes both formattings readable regardless of the console background color. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-03-071-1/+0
|\ | | | | | | | | Conflicts: common/environment.c
| * scripts/kwboot: Remove redundant assignmentAlexander Shiyan2014-02-171-1/+0
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/marvell'Sascha Hauer2014-03-071-2/+3
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/dts/Makefile
| * | scripts/kwbimage: Fix resource leak in image_create_payload()Alexander Shiyan2014-02-041-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts/kwbimage: Fix resource leak in image_create()Alexander Shiyan2014-02-041-0/+1
| |/ | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx-image'Sascha Hauer2014-03-071-1/+3
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/dts/Makefile
| * | ARM: i.MX: Add include directories to imximage targetSascha Hauer2014-02-131-1/+3
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | defaultenv: Add boot option for DFUSascha Hauer2014-02-281-0/+68
| | | | | | | | | | | | | | | | | | | | | | DFU is for device firmware upgrade, but for development purposes it's sometmes useful to just start a kernel vie DFU. This adds a boot option for doing this and also the corresponding counterpart on the host. With this it's possible to boot a system with: scripts/dfuboot.sh -k linuximage -d dtb -c "root=ubi0:root ubi.mtd=ubi rootfstype=ubifs ignore_loglevel" Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>