summaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * | scripts: imx-usb-loader: cleanup DCD v2 processingAlexander Kurz2016-09-052-47/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-Implement the DCD v2 processing. Processing for the DCD write command went into a separate function enabling the over-all DCD processing to handle check, nop and unlock commands as well. The trivial NOP command is supported right away. Further changes: put in some data consistancy checks and error handling, do structured member access and proper endianess handling and direct error messages to stderr. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx-usb-loader: structured DCD v1 element accessAlexander Kurz2016-08-222-8/+17
| | | | | | | | | | | | | | | | | | | | | DCD v1 elements are encoded little endian. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx-usb-loader: enable DCD 16-bit write for hdr v1Alexander Kurz2016-08-221-7/+2
| | | | | | | | | | | | | | | | | | | | | Do some cleanup which enables DCDv1 16 bit write access as side effect. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx-image: DCD check command for v2 onlyAlexander Kurz2016-08-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DCD check command is currently implemented for imximg v2 only. This command may also be available for v1 as mentioned in IMX35RM as DCD-address-type "wait/read", but due to the lack of further details it will be not supported. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | scripts: imx-usb-loader: do DCD only once, cleanupAlexander Kurz2016-08-221-9/+6
| |/ | | | | | | | | | | | | | | | | Only the first encountered DCD block should be processed, optional DCD processing may be switched off by command option. Clean up the corresponding logic. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / i.MX: scripts: Fix a bug in imx-imageAndrey Smirnov2016-09-051-1/+1
|/ | | | | | | | | | In order to clear a bitmask, "Set" bit has to be '0' and "Mask" bit '1'. Since "Set" is bit 4 and "Mask" is bit 3 this leaves us with a overal or-mask of 1 << 3. Orginal code was doing the inverse and setting bit #4 to '1' bit #3 to '0'. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: socfpga_get_sequencer: convert potential CRLF to LFSteffen Trumtrar2016-08-181-0/+2
| | | | | | | | | | If u-boot was generated under a DOS system, the sequencer files will have CRLF linebreaks. The indent-tool has problems with this and as a result the code will not compile anymore. Fix up any CRLFs prior with the dos2unix tool. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-usb-loader: split off topic-code into functionsAlexander Kurz2016-07-181-67/+92
| | | | | | | | | Improve code understandability: extract the "jump application" Serial Download Protocol access method and file-to-buffer reader functionality out of do_irom_download(). Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-usb-loader: structured protocol accessAlexander Kurz2016-07-181-67/+65
| | | | | | | | Do some cleanup and access the elements of Serial Download Protocol messages in endianess-portable manner using proper typed struct members. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-usb-loader: remove useless variableAlexander Kurz2016-07-181-3/+1
| | | | | | | Remove a variable raising complexity for no reason. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-usb-loader: remove useless codeAlexander Kurz2016-07-181-46/+3
| | | | | | | | | The configuration interface for struct usb_work is not implemented here leaving the options set on fixed settings or even uninitialized. Do some cleanup and remove those half-cooked dead code passages. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx-usb-loader: const function argsAlexander Kurz2016-07-181-12/+17
| | | | | Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* scripts: imx: const function argumentsAlexander Kurz2016-07-183-9/+11
| | | | | Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2016-07-112-4/+4
|\
| * 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>
| * Add more files to .gitignoreAlexander Shiyan2016-07-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds more generated files to ignore list. ... shc@shc /home/git/barebox-github $ git status На ветке imx51 Неотслеживаемые файлы: (используйте «git add <файл>…», чтобы добавить в то, что будет включено в коммит) common/barebox_default_env common/barebox_default_env.h include/asm scripts/basic/docproc ничего не добавлено в коммит, но есть неотслеживаемые файлы (используйте "git add", чтобы отслеживать их) Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | ARM: i.MX: central SOC type definitionAlexander Kurz2016-07-043-8/+11
| | | | | | | | | | | | | | | | | | Move the definition of iMX CPU types to an individual file to allow on-purpose inclusion. Eliminate magic number CPU type encoding in the scripts/imx subdir using the new include file. Signed-off-by: Alexander Kurz <akurz@blala.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>