summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.lib
Commit message (Collapse)AuthorAgeFilesLines
* bootm: fit: add option to add DT snipped that contains fit public keyMarc Kleine-Budde2018-02-201-0/+6
| | | | | | | | | | | | | | | | This makes it easier for build systems to include a configurable dts snippet which holds the public keys for FIT images. Usage: Add to your dts: #ifdef CONFIG_BOOTM_FITIMAGE_PUBKEY #include CONFIG_BOOTM_FITIMAGE_PUBKEY #endif Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile.lib: imx hab: fix hab files with embedded variablesMarc Kleine-Budde2018-02-201-1/+7
| | | | | | | | When passing variables this way, all embedded variables are expanded, so that the path in the .config file can be kept relative. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> SIgned-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* build: fix that the bbenv file is always rebuiltSam Ravnborg2018-01-051-1/+1
| | | | | | | | | | | | | | | From ac9ca6505d5b887c351117d9c033c8a76cc77125 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Tue, 26 Dec 2017 18:05:14 +0100 Subject: [PATCH 3/4] build: fix that the bbenv file is always rebuilt Use if_changed in rule for bbenv file. This avoids re-builds. The target is already assigned to extra-y - so the kbuild logic will work as expected. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* new make helper to decode binaries using base64Uwe Kleine-König2017-06-011-0/+6
| | | | | | | | | | | | | | | | | | This is helpful to provide mvebu binary.0 images with a patch. When added directly a binary patch is needed which isn't understood by patch(1). As it's (at least) unclear if these images are distributable in general I don't provide a patch making use of this, but the pattern is as follows: Add $(obj)/start_netgear_rn2120.pblx.kwbimg: $(board)/netgear-rn2120/binary.0 to images/Makefile.mvebu and then put a binary.0.base64 into the board folder. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add comp_copy function for use with CONFIG_IMAGE_COMPRESSION_NONESascha Hauer2016-09-151-0/+8
| | | | | | | | | | The Makefile compression commands all append the size of the uncompressed image. With CONFIG_IMAGE_COMPRESSION_NONE simply 'shipped' is used which does not append the size. Add and use a special comp_copy function which adds the size. This helps us to get the uncompressed image size in the startup code later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Do not rm the path from pbl-y target张忠山2016-07-051-4/+3
| | | | | | | | | | | | | | | | | | | Whan add some obj in a subdir to lwl-y or pbl-y, like this: lwl-y += subdir/test.o other.o the make process failed: make[2]: *** No rule to make target 'arch/arm/boards/boardname/test.o', \ needed by 'arch/arm/boards/boardname/built-in-pbl.o'. Stop. Note, there are not the part "subdir" in the path of the test.o. this patch fix this Signed-off-by: 张忠山 <zzs213@126.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Make: i.MX: Allow to pass config file to cmd_imx_imageSascha Hauer2016-02-041-2/+2
| | | | | | | | Pass the config file to cmd_imx_image as arguments to make it more flexible. Also add the possibility for another arg containing additional options. 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>
* kbuild: handle multi-objs dependency appropriatelyMasahiro Yamada2014-11-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add xz decompression supportSascha Hauer2014-11-041-0/+31
| | | | | | | | 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>
* 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>
* Add support for metadata in barebox imagesSascha Hauer2014-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-071-15/+3
| | | | | | | 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* | 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>
* Merge branch 'for-next/x86'Sascha Hauer2013-12-061-1/+1
|\
| * Makefile: Align "DTB" string to othersAlexander Shiyan2013-11-111-1/+1
| | | | | | | | | | Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Make: introduce obj-pbl-ySascha Hauer2013-11-251-0/+3
|/ | | | | | For compiling object files both in the regular binary and the pbl. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* 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-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>
* / 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>
* 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/imx-oftree'Sascha Hauer2013-06-021-12/+9
|\ | | | | | | | | 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: Add imx-usb-loader toolSascha Hauer2013-05-311-0/+25
|/ | | | | | | | 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>
* Makefile.lib: Add dtc supportSascha Hauer2013-03-121-0/+41
| | | | | | | | | Add rules to generate dtb files from dts/dtsi files, optionally run the source files through the preprocessor. Also add a rule to generate object files to include in the barbox binary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile.lib: introduce lwl-y for lowlevel codeJean-Christophe PLAGNIOL-VILLARD2013-02-211-0/+8
| | | | | | | | | | | | The lowlevel code is expected to be present only ONCE in PBL is enabled otherwise in barebox This fix the module support with PBL and allow to reduce the size of barebox by drop the lowlevell init in barebox as the compiler does not discard it Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile: move cmd_check_file_size to Makefile.libJean-Christophe PLAGNIOL-VILLARD2013-01-201-0/+11
| | | | | | | so we can use to check pbl Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* let kbuild build foo/bar.o correctly张忠山2012-12-081-4/+4
| | | | | | | | | | | When obj-y has foo/bar.o, kbuild can't generate foo/bar.o according foo/bar.c. Fix this this patch based on linux kernel commit 521cb40b0c44418a4fd36dc633f575813d59a43d Signed-off-by: 张忠山 <zzs213@126.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Makefile.lib: add disasm and ln commandsSascha Hauer2012-08-121-0/+6
| | | | | | | | | | disasm: For generating an disasssembly of an ELF file ln: For creating a softlink Use the disasm command for generating barebox.S Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* kbuild: add pre-bootloader (pbl) targetJean-Christophe PLAGNIOL-VILLARD2012-08-031-0/+14
| | | | | | | | | | This will allow to link compiled object to the built-in-pbl.o across the source tree that will be finally link to the pbl. Now we compile the source %.c in pbl-%.o and provide -D__PBL__ so we can known in the source when it's compile for barebox or the pbl. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* scripts/Makefile.lib: update compress cmd supportJean-Christophe PLAGNIOL-VILLARD2012-01-021-1/+66
| | | | | | | | | import from linux 3.2-rc3 update gzip and add bzip2, lzma, lzo and xz Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* rename U-Boot-v2 project to bareboxSascha Hauer2009-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This has been done with the following script: find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \ -e 's/u2boot/barebox/g' \ -e 's/U2Boot/barebox/g' \ -e 's/U-boot V2/barebox/g' \ -e 's/u-boot v2/barebox/g' \ -e 's/U-Boot V2/barebox/g' \ -e 's/U-Boot-v2/barebox/g' \ -e 's/U_BOOT/BAREBOX/g' \ -e 's/UBOOT/BAREBOX/g' \ -e 's/uboot/barebox/g' \ -e 's/u-boot/barebox/g' \ -e 's/u_boot/barebox/g' \ -e 's/U-Boot/barebox/g' \ -e 's/U-boot/barebox/g' \ -e 's/U-BOOT/barebox/g' find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \ xargs -0 -r rename 's/u[-_]?boot/barebox/' It needs some manual fixup following in the next patch Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* svn_rev_543Sascha Hauer2007-07-051-1/+1
| | | | linux->uboot
* svn_rev_008Sascha Hauer2007-07-051-0/+165
add missing Kconfig