summaryrefslogtreecommitdiff
path: root/pbl/decomp.c
Commit message (Collapse)AuthorAgeFilesLines
* pbl: decomp: print mismatched hashes on one line eachAhmad Fatoum2022-11-021-13/+13
| | | | | | | | | | | | | | | | | | With DEBUG_LL enabled, hashes are printed to show mismatches, but each byte is padded with 6 or 14 zeroes and has a line just for itself. Rework this, so it now looks a lot cleaner: CH 40e941dfcf53087b86e549fbc279cbc1d4fd87c64febb42af6324c5b3ec64e03 IH 3aa627d34b97f4a6af6a4ebf022236dc4b025c5902296b694a65eb6b92f8d66d While at it, print a hexdump of the first 64 bytes of the buffer that could not be verified. This is only printed when DEBUG is enabled and serves as a first aid to debugging as verification failure is not an expected occurrence with firmware baked into barebox PBL. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20221019123817.1659468-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: export pbl_barebox_verifyAhmad Fatoum2022-08-221-3/+3
| | | | | | | | | | | | | There's no downside to always build the digest verification code in PBL and export pbl_barebox_verify to access it. This allows board code to use the function for verifying other firmware blobs and CONFIG_PBL_VERIFY_PIGGY=y will remain to enable the verification at barebox proper extraction time. Code not using it will have the function sections garbage collected by the linker, so no functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220818050447.2072932-2-a.fatoum@pengutronix.de 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: add sha256 and piggy verification to PBLRouven Czerwinski2019-08-071-0/+39
| | | | | | | | | 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>
* Add xz decompression supportSascha Hauer2014-11-041-0/+4
| | | | | | | | 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-221-0/+4
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: add none compression supportJean-Christophe PLAGNIOL-VILLARD2013-01-301-0/+12
| | | | | 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-301-0/+32
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>