summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | make: Add bbenv-y target to generate default environment filesSascha Hauer2014-02-211-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a target to generate environment files from directories. These are compiled into the barebox binary. use it as: bbenv-$(CONFIG_SOMETHING) += my-environment The directory containing the files to compile into the binary should be named my-environment. This can be accessed in C code later as: extern unsigned char __bbenv_my_environment_start[]; extern unsigned char __bbenv_my_environment_end[]; Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | make: Add wildcard rules for compressed filesSascha Hauer2014-02-181-0/+18
| | | | | | | | | | | | To simplify generating compressed files. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | defaultenv: simplify env dependenciesSascha Hauer2014-02-181-2/+10
|/ | | | | | | | | | Finding out whether to rebuild the environment is a difficult task since we have to track all files in a directory. Instead of trying this, just rebuild the environment during every build and only if it differs to the last one overwrite the target. This way make only sees a change when the environment is changed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2014-02-031-2/+2
|\
| * Make generated variables staticAlexander Shiyan2014-02-031-2/+2
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2014-02-031-7/+32
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/boards/dmo-mx6-realq7/lowlevel.c
| * | scripts: fix_size: check magicSascha Hauer2014-01-311-7/+32
| |/ | | | | | | | | | | | | | | Instead of passing the offset to the fix_size tool check the image to fixup for a valid header so that only recognized files are fixed up. This makes the usage of this tool safer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx-usb-loader: Fix memory leakAlexander Shiyan2014-01-291-1/+4
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: kwbimage: fix imagebuild on 32bit host systemMichael Grzeschik2014-01-271-8/+8
|/ | | | | | | | | | We have to use strtoul to run the tool working on 32bit systems. Otherwise it will generate signed numbers for strings representing values with the 32nd bit set. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>