summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/socfpga'Sascha Hauer2017-05-052-1/+118
|\
| * ARM: socfpga: add arria10 supportSteffen Trumtrar2017-05-031-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arria10 is a SoC + FPGA like the Cyclone5 SoCFPGA that is already supported in barebox. Both a the same in some parts, but totaly different in others. Most of the hardware blocks are the same in the SoC parts. The OCRAM is larger on the Arria10 and the SDRAM controller is different. The serial core only supports 32bit accesses (different to the 8bit accesses on the Cyclone5). As Arria10 has 256KB of OCRAM, it is possible to fit a larger barebox (and/or use PBL) instead of the two stage bootprocess used on the Cyclone5 and its 64KB OCRAM. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: socfpga: rename socfpga->cyclone5Steffen Trumtrar2017-05-031-1/+1
| | | | | | | | | | | | | | | | Prepare the SoCFPGA code base for different system types (Arria10, Stratix10,...). Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: mkmakefile: apply changes from Linux kernelDennis Menschel2017-04-111-10/+26
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The version of mkmakefile which has been used in barebox until now dates back to commit fd5f0cd6b0cef59ba18e5ac13be5b2775fa6ec28 from the Linux kernel git history (Tue May 2 12:33:20 2006 +0200). This patch effectively includes all changes from the aforementioned commit to the latest stable version of the Linux kernel: git log --pretty=oneline --abbrev-commit fd5f0cd..v4.10 scripts/mkmakefile 06ed5c2 kbuild: Make scripts executable 9319f45 kbuild: support simultaneous "make %config" and "make all" 0ff3577 kbuild: silence generated makefile message 3c955b4 fixes for using make 3.82 d230124 kbuild: teach mkmakfile to be silent 1d3b3bf kbuild: scripts/mkmakefile: dynamic determination of output directory 971edcf kbuild: re-enable Makefile generation in a new O=... directory 18c32da kbuild: fix building with O=.. options 0b35786 kbuild: call make once for all targets when O=.. is used In particular, the list of changes includes a fix for the following Make warning: Makefile:18: *** mixed implicit and normal rules: deprecated syntax GNU Make 3.82 raises an error instead of a warning and aborts the make process. GNU Make 3.82 is still used today by distributions like Red Hat Enterprise Linux 7.3. Signed-off-by: Dennis Menschel <menschel-d@posteo.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tags: Process Kconfig files in a single passAntony Pavlov2017-03-301-7/+2
| | | | | | | | | | | | | | | This is an adoption of the linux kernel commit | commit a281b8569e9eb4beb1651c92145271555ba05f0c | Author: Michal Marek <mmarek@suse.com> | Date: Wed Oct 14 11:17:13 2015 +0200 | | tags: Process Kconfig files in a single pass | | Signed-off-by: Michal Marek <mmarek@suse.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* tags: Do not try to index defconfigsAntony Pavlov2017-03-301-12/+0
| | | | | | | | | | | | | | | | | | | This is an adoption of the linux kernel commit | commit ab9ca615f5f4053417cba464015bf2d7334a2371 | Author: Michal Marek <mmarek@suse.com> | Date: Thu Oct 15 11:14:02 2015 +0200 | | tags: Do not try to index defconfigs | | The defconfig files are in predictable locations, so there is no need to | index them. Plus, the script was only looking for files named | 'defconfig', which only works on a few architectures nowadays. | | Signed-off-by: Michal Marek <mmarek@suse.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts/tags.sh: drop __TestClearPage*() helpersAntony Pavlov2017-03-301-2/+0
| | | | | | | | | | | | | | | | | | | This is an adoption of the linux kernel commit | commit 685eaade56c66c806dbe8102f12e2926cf4ec870 | Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | Date: Fri Jan 15 16:52:10 2016 -0800 | | page-flags: drop __TestClearPage*() helpers | | Nobody uses them. | | Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | Signed-off-by: Andrew Morton <akpm@linux-foundation.org> | Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mvebu'Sascha Hauer2017-03-131-9/+25
|\
| * scripts/kwboot: new parameter -n to skip a number of NAKsUwe Kleine-König2017-02-141-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On some machines the CPU resets twice and so kwboot must hit the second window to enter debug or boot mode. For this scenario it helps to ignore a number of NAKs. If you choose a number too high for booting, the process is only slowed down because when the CPU enters UART boot mode it sends NAKs when not getting any input. This new option also helps when there are voltage fluctuations due to the power up sequence which might be interpreted as valid chars. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: kwboot: fix image check for padded imagesUwe Kleine-König2017-02-141-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When there is some padding between header and payload the claim header_size + image_size == file_size fails. Relax the check accordingly to: header_size <= image_offset && image_offset + image_size == file_size Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2017-03-135-256/+289
|\ \
| * | scripts: imx/mxs remove mxs-usb-loaderOleksij Rempel2017-03-093-240/+8
| | | | | | | | | | | | | | | | | | | | | ... and use imx-usb-loader instead Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx imx-usb-loader: add support for imx23 and imx28Oleksij Rempel2017-03-091-1/+84
| | | | | | | | | | | | | | | | | | | | | This code was rewrtitten from mxs-usb-loader. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx imx-usb-loader: warn if device was excluded by path optionOleksij Rempel2017-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | notify user about the reason why device was ignored by imx-usb-loader. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx imx-usb-loader: add usb path supportOleksij Rempel2017-03-031-13/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases we need to work with more than one device attached to one host. For this situation we need path filter to make sure we talk with proper device. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx-usb-loader: implement DCD v2 check commandAlexander Kurz2017-02-222-2/+109
| |/ | | | | | | | | | | | | | | | | | | | | | | The DCD v2 check command supported by i.MX53 and later SoC polls a given memory location as long as a given condition is true. Enable imx-usb-loader to perform this check. When the timeout is hit, imx-usb-loader returns an error. For practical reasons the timeout computation will differ from the native implementation, since performing check commands via USB will be much slower compared to native processing. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / scripts: mxsimage: Fix build with OpenSSL < 1.1.xSascha Hauer2017-03-021-31/+31
|/ | | | | | | Move the compatibility wrapper functions up so that they are defined before they are used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/imx'Sascha Hauer2017-02-132-7/+15
|\
| * ARM: i.MX: Add i.MX7 base architecture supportJuergen Borleis2017-01-201-0/+1
| | | | | | | | | | Signed-off-by Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * imx-usb-loader: add i.MX7S supportJuergen Borleis2017-01-191-0/+7
| | | | | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
| * imx-usb-loader: this table is used internally only, so keep it staticJuergen Borleis2017-01-191-1/+1
| | | | | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
| * imx-usb-loader: let constant data be constJuergen Borleis2017-01-191-7/+7
| | | | | | | | Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
* | Merge branch 'for-next/arm'Sascha Hauer2017-02-137-492/+55
|\ \
| * | scripts/omap4_usbboot: use libusbVicente Bergas2017-01-137-492/+55
| |/ | | | | | | | | Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / checkpatch: fix another left brace warningGeyslan G. Bem2017-01-181-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | This patch escapes a regex that uses left brace. Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped left brace in regex is deprecated, passed through in regex;" Comment from regcomp.c in Perl source: "Currently we don't warn when the lbrace is at the start of a construct. This catches it in the middle of a literal string, or when it's the first thing after something like "\b"." This works as a complement to 4e5d56bd ("checkpatch: fix left brace warning"). Signed-off-by: Geyslan G. Bem <geyslan@gmail.com> Signed-off-by: Joe Perches <joe@perches.com> Suggested-by: Peter Senna Tschudin <peter.senna@gmail.com> Cc: Eddie Kovsky <ewk@edkovsky.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for-next/mvebu'Sascha Hauer2017-01-111-13/+43
|\
| * scripts/kwbimage: allow to overwrite binaryUwe Kleine-König2017-01-101-5/+35
| | | | | | | | | | | | | | This is a preparation to let barebox provide the binary.0. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts/kwbimage: use ALIGN_SUP instead of open-coding itUwe Kleine-König2017-01-101-1/+1
| | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts/kwbimage: fix typoUwe Kleine-König2017-01-101-1/+1
| | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts/kwbimage: fix handling of binary headerUwe Kleine-König2017-01-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | A binary header is 12 bytes + (4 bytes * Number of Arguments) bigger than the actual binary. Before this commit image extraction was wrong an made binary.0 too big by four bytes at the end (which were 0 in all usual cases). Image creation had the same problem which resulted in broken images when the binary doesn't end in 4 bytes containing 0. Further handle binaries with a length that is not aligned to 4 bytes. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx imx-usb-loader: add i.MX6SL supportAlexander Kurz2017-01-101-0/+7
| | | | | | | | | | | | | | Add the i.MX6SL USB id to the list of known ids. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | scripts: imx imx-usb-loader: sort USB id listAlexander Kurz2017-01-101-28/+28
|/ | | | | | | For better readability sort the list of known USB ids by VID and PID. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: mxsimage: Fix build with OpenSSL 1.1.xSascha Hauer2017-01-091-34/+70
| | | | | | | | | | | The EVP_MD_CTX and EVP_CIPHER_CTX are made opaque since 1.1.x , so instead of embedding them directly into struct sb_image_ctx and initializing them using EVP_*_CTX_init(), we use pointers and allocate the crypto contexts using EVP_*_CTX_new(). This is an adoption of the U-Boot commit 7bae13b7579a6b from Marek Vasut Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/vybrid'Sascha Hauer2016-11-141-0/+1
|\
| * i.MX: scripts: Add "vf610" soc to imx-imageAndrey Smirnov2016-11-111-0/+1
| | | | | | | | | | | | | | Needed in order to support Vybrid SoCs. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-11-141-1/+1
|\ \
| * | gen-dtb-s: Put compressed dtb in different sectionSascha Hauer2016-10-241-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | For builtin dtbs all compiled dtbs matching section .dtb.rodata.* are collected in a single section. Since every dtb is compiled as uncompressed and also as compressed binary each dtb ends up twice in the section. Let's put the compressed variants in .dtbz.rodata.* sections rather than .dtb.rodata.*.z so they end up in the binary only once. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Daniel Krüger <daniel.krueger@systec-electronic.com>
* / scripts imx-image: add DCD NOP command supportAlexander Kurz2016-11-074-0/+41
|/ | | | | | | | The DCD NOP command is available for all flash header v2 devices (i.MX28, 50, 53, 6 and 7). Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mvebu'Sascha Hauer2016-10-101-21/+80
|\
| * scripts: kwboot: set boot source to UART before sendingUwe Kleine-König2016-10-041-3/+11
| | | | | | | | | | | | | | | | Sending an image that specifies one of the alternative boot sources doesn't make sense. So change the boot source to UART on the fly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: kwboot: simplify kwboot_mmap_imageUwe Kleine-König2016-10-041-6/+4
| | | | | | | | | | | | | | | | There was only a single caller who passes prot=PROT_READ unconditionally. So drop this parameter and simplify accordingly. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: kwboot: shorten delay between two boot messagesUwe Kleine-König2016-10-041-1/+1
| | | | | | | | | | | | | | | | | | Together with the previous changes that allow to handle the scenario where too many messages were sent, this greatly improves the probability to hit the time window during which the CPU accepts a boot message. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: kwboot: improve diagnostic outputUwe Kleine-König2016-10-041-3/+12
| | | | | | | | | | | | | | | | | | After entering uart boot mode the CPU prints some diagnostic messages. Showing them to the user helps her to notice when the message window was missed or there is an other problem. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: kwboot: flush input and output only onceUwe Kleine-König2016-10-041-8/+8
| | | | | | | | | | | | | | | | | | | | | | When flushing input before sending of a boot message the acknowledging reply for the previous message from the CPU might be discarded and so missed. So only flush once before sending boot messages in a loop. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * scripts: kwboot: try to resync on packet boundary after receiving a NAKUwe Kleine-König2016-10-041-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we sent the boot message too often the CPU might already have started to interpret this as an xmodem packet. As sender and receiver are not in sync it's impossible to transfer a packet successfully. So when we get a NAK send '\xff' bytes until the receiver reaches the packet boundary. When we send too many the SoC replies with a NAK for each byte and doesn't interpret it as the start of a new package (which must start with SOH == '\x01'). A slower alternative would be to wait for another NAK which is sent when reception of the already started packet times out. This was tested on an Armada XP based machine with bootrom version 1.20. 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>
* Merge branch 'for-next/socfpga'Sascha Hauer2016-09-131-34/+110
|\
| * socfpga: Add support for V1 images to socfpga_mkimageTrent Piepho2016-08-181-34/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Altera's SocFPGA Arria10 SoC uses a new image format, different from the one used on CycloneV. The formats are similar, with the header matching up to the point where the version field is 1 instead of 0. At that point the header fields diverge. The CRC and checksum use is the same between the two. This patch extends socfpga_mkimage to support generating the new format with a version command line option. The default will be V0 for CycloneV. The new format is, IMHO, not as good as the previous one. It requires the start location be after the header, while the V0 format would allow the start location to be before or after. Barebox boot images are designed to start from offset 0, which is before the header. To avoid modifying the common barebox start code specifically for Arria10, I instead add a trampoline instruction after the V1 header to jump to the real start location, wherever it might be. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2016-09-134-71/+129
|\ \
| * | scripts: imx: add support for i.MX50Alexander Kurz2016-09-123-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Add imximg support for i.MX50 processors which use the i.MX flash header v2 format. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>