summaryrefslogtreecommitdiffstats
path: root/pbl
Commit message (Collapse)AuthorAgeFilesLines
* pbl: Alias memcpy and memsetSascha Hauer10 days1-0/+7
| | | | | | | | With KASan the memcpy/memset functions are instrumented as well, but some code will still have to call the non instrumented versions __memcpy and __memset. Add aliases for them to PBL to make them available. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ARM: remove PBL_FORCE_PIGGYDATA_COPYSascha Hauer2019-09-231-8/+0
| | | | | | | This option is unused in the tree, remove it for now. If you need this option, let me know, we'll find another solution. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/qemu'Sascha Hauer2019-09-121-0/+16
|\
| * pbl: Implement strrchrSascha Hauer2019-08-191-0/+16
| | | | | | | | | | | | strrchr is needed for libfdt. Add support for it to the pbl. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | pbl: Move piggy verification into pbl_barebox_uncompress()Sascha Hauer2019-08-231-9/+26
|/ | | | | | | | piggy verification is a direct prerequisite of uncompressing the piggydata, so move the verification there. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
* pbl: support panic with log outputRouven Czerwinski2019-08-071-0/+5
| | | | | | | | If panic is called with a string in the PBL, print the panic string before falling into the busy loop. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: add sha256 and piggy verification to PBLRouven Czerwinski2019-08-072-0/+43
| | | | | | | | | Extract the necessary functions from sha256 into a PBL headder and add a verification function to the PBL. The function will be called before the individual architectures decompress functions is run. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: report decompression failurePeter Mamonov2019-06-131-0/+4
| | | | | Signed-off-by: Peter Mamonov <pmamonov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: enable MIPS for PBL_RELOCATABLEOleksij Rempel2018-12-131-1/+1
| | | | | | | it is needed for multiimage support Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: console: Let console pointer survive BSS clearingSascha Hauer2016-09-151-5/+10
| | | | | | | | The PBL console support may be configured before the BSS segment is cleared. Put the pointer into the data section so that it is not affected by the BSS clearing. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: console: Use console_putc to output the carriage returnSascha Hauer2015-11-111-1/+1
| | | | | | | console_puts uses console_putc() to output characters, so the carriage return should be output with the same function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PBL: console: Make independent of DEBUG_LLSascha Hauer2015-07-311-7/+43
| | | | | | | | | | With more stuff being done in PBL regular console support gets more and more useful. This makes the PBL console independent of DEBUG_LL which is only meant for early debugging but not regular output. To use the regular PBL console a board must call pbl_set_putc() which stores a pointer to the putc function to be used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: remove start_barebox() stubMasahiro Yamada2015-02-121-6/+0
| | | | | | | | PBL never calls start_barebox(). If it does, it is a bug. Without this stub function, we can detect such a bug at link time. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: Add support for memory_displaySascha Hauer2015-01-281-0/+10
| | | | | | | The PBL has console support now, so add memory_display support aswell which can be a good debugging aid. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add PBL console supportSascha Hauer2015-01-052-0/+33
| | | | | | | | | | | This adds simple console support to the PBL which makes it possible to print more complex messages in the PBL than just strings or hex numbers. For now puts_ll is used to print the messages, so it depends on CONFIG_DEBUG_LL which makes it more a debugging option. However, this could be extended later to get regular output from the PBL if desired. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* PBL: Add strnlen, needed for printf supportSascha Hauer2015-01-051-0/+14
| | | | | | | vsprintf needs strnlen, so in oder to add console support to the PBL we need a strnlen implementation. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add xz decompression supportSascha Hauer2014-11-042-0/+7
| | | | | | | | 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>
* pbl: add lz4 supportJean-Christophe PLAGNIOL-VILLARD2013-07-222-0/+8
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add multi images supportSascha Hauer2013-07-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the make infrastructure to build multiple SoC or board specific images from a single barebox binary. The basic idea is that we no longer have a single pbl, but instead multiple pbls, one per image if necessary. Each pbl is defined by its entry function so that each pbl can do exactly what a given board needs. Additionally the pbls together with a self extracting barebox binary can be encapsulated in specific image formats. squashed in build fixes from Lucas Stach for make version >= 3.82: Split Multimage Makefile rule in explicit and implicit parts Fixes build with make version >=3.82 Frome the make 3.82 NEWS file: * WARNING: Backward-incompatibility! In previous versions of make it was acceptable to list one or more explicit targets followed by one or more pattern targets in the same rule and it worked "as expected". However, this was not documented as acceptable and if you listed any explicit targets AFTER the pattern targets, the entire rule would be mis-parsed. This release removes this ability completely: make will generate an error message if you mix explicit and pattern targets in the same rule. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Lucas Stach <dev@lynxeye.de>
* ARM: Add relocatable binary supportSascha Hauer2013-03-071-0/+10
| | | | | | | | | | | | | | | | | | For making the same binary executable on different SoCs which have different DRAM addresses we have to be independent of the compile time link address. This patch adds relocatable binary support for the ARM architecture. With this two new functions are available. relocate_to_current_adr will fixup the binary to continue executing from the current position. relocate_to_adr will copy the binary to a given address, fixup the binary and continue executing from there. For the PBL and the real image relocatable support can be enabled independently. This is done to (hopefully) better cope with setups where the PBL runs from SRAM or ROM and the real binary does not. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pbl'Sascha Hauer2013-02-043-0/+89
|\
| * pbl: add none compression supportJean-Christophe PLAGNIOL-VILLARD2013-01-302-0/+15
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * pbl: factorise decompressorJean-Christophe PLAGNIOL-VILLARD2013-01-302-0/+33
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * pbl: move configs to pbl/KconfigJean-Christophe PLAGNIOL-VILLARD2013-01-301-0/+41
| | | | | | | | | | | | | | so it more easy to add new entry and to maintain Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/at91'Sascha Hauer2013-02-041-1/+3
|\ \ | |/ |/| | | | | | | | | | | Conflicts: arch/arm/boards/at91rm9200ek/init.c arch/arm/boards/pm9263/init.c arch/arm/configs/at91sam9n12ek_defconfig arch/arm/mach-at91/Kconfig
| * startup: add __noreturn to start_bareboxSascha Hauer2013-01-201-1/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | pbl string: Fix no previous prototype warningsSascha Hauer2013-01-251-8/+2
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: provide hang() function for the pblSascha Hauer2012-10-261-0/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Add pre-bootloader (pbl) image supportJean-Christophe PLAGNIOL-VILLARD2012-08-033-0/+146
This allows for creating a pre-bootloader binary for - nand boot - mmc boot - compressed image The pbl will be incharge of the lowlevel init if needed. The barebox will skip it. Import string functions from linux 3.4 (arch/arm/boot/compressed/string.c) and implement a dummy panic. For now on introduce dummy zbarebox* targets and c code that will contain later the decompressor. This only implemeted on ARM. This patch is based on Sascha Hauer <s.hauer@pengutronix.de> Add compressed image support patch Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>