9
0
Fork 0
Commit Graph

26 Commits

Author SHA1 Message Date
Wadim Egorov 50c081e093 barebox: common: added new filetypes
- Added omap CH image header recognition
  * filetype_ch_image
  * filetype_ch_image_be

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-09 14:11:23 +02:00
Sascha Hauer 0de5aae341 filetype: Add detection for barebox environment
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-20 14:43:43 +01:00
Jean-Christophe PLAGNIOL-VILLARD 32d88d9a86 filetype: add Binary PacKage BPK type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-10-06 13:26:51 +02:00
Sascha Hauer d9abbe8d01 filetype: Add ubifs detection
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-08-07 08:44:48 +02:00
Kyungsik Lee cdc837f4d9 lib: Add support for LZ4-compressed kernel
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>
2013-07-16 08:24:30 +02:00
Sascha Hauer b381e781bf treewide include/: Add missing includes
This adds several missing includes to files under include/ which
we relied on being included implicitly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-05-31 08:32:59 +02:00
Hubert Feurstein c06956e15f common/filetype: move partition-table detection into own function
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-29 09:32:54 +02:00
Jean-Christophe PLAGNIOL-VILLARD a7d9ec0498 filetype: add GPT support
GPT need to be check before MBR

Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-16 23:39:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD 172f44651c filetype: add is_barebox_head
to detect if it's a barebox for the current running arch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-22 22:03:44 +01:00
Jean-Christophe PLAGNIOL-VILLARD 03939c0dfb filetype: add is_barebox_mips_head support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-22 22:03:44 +01:00
Sascha Hauer d40e6e1476 filetype: Make buf in file_detect_type const
This function has no business changing the buffer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-20 16:33:03 +01:00
Sascha Hauer d2dc3640ef add ext fs detection support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 11:23:25 +01:00
Sascha Hauer 5e74263762 filetype: Pass bufsize
Pass the buffer size to the file detection code. This makes sure we do not
read past the buffer. This is especially useful for ext filesystem detection
as the magic is at byte offset 1080. Also introduce a FILE_TYPE_SAFE_BUFSIZE
define which is set to the minimum bufsize the detection code needs to detect
all known filetypes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-12-03 11:23:25 +01:00
Sascha Hauer cc9fffc825 filetype: add shortnames
The filetype strings are not really suitable for shell scripts, so
add a shortname array of filetypes usable for shell scripts.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-30 15:42:39 +01:00
Sascha Hauer cd323c0224 Merge branch 'for-next/png'
Conflicts:
	common/filetype.c
	include/filetype.h
2012-10-03 21:12:19 +02:00
Sascha Hauer bee8dddbfc Merge branch 'for-next/omap'
Conflicts:
	Makefile
2012-10-03 21:11:48 +02:00
Franck Jullien 010ee209b7 filetype: Improve FAT detection
We may have some disk with MBR as a first sector. In this case, the
current FAT check returns an error. However, the FAT sector exist and
the MBR can tell us where it is.

This patch add to file_name_detect_type function the ability to find
the FAT boot sector on the first sector of the first partition in case
it is not on sector 0.

It also introduce is_fat_or_mbr to check if a buffer is a FAT boot
or MBR sector

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-20 08:57:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 50239e0195 filetype: add PNG support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:23:34 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2dfb4028b4 filetype: add BMP support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:22:43 +02:00
Jan Weitzel 75831d1687 xload: get barebox size from barebox_arm_head
Add functions to read the barebox_arm_head, check barebox magicword
and read out the barebox image size.
Create a inital partion of 1Mb to access the barebox image on nand.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-07 10:31:54 +02:00
Jean-Christophe PLAGNIOL-VILLARD 653c767213 filetype: add fat filesystem support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-04 09:08:39 +02:00
Antony Pavlov 87b302f4e2 MIPS: bootm: add "MIPS barebox" handler
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-11 09:05:11 +02:00
Jean-Christophe PLAGNIOL-VILLARD 733d85510c filetype: add Bourne Shell support
Put it at first as it's the most likely to detect

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-18 19:53:08 +08:00
Jean-Christophe PLAGNIOL-VILLARD f3d1525337 filetype: add Android boot image support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-12 11:54:35 +02:00
Sascha Hauer 9c11a31ce2 filetype: Add oftree detection
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 10:20:09 +01:00
Sascha Hauer b6996039f6 add file detection support
Several filetypes can be autodetected. Barebox could make use
of this in several ways:

- Add a command to detect filetypes
- detect arm zImages and uImages to unify the different boot commands
- maybe detect UBI or JFFS2 images to construct parts of the kernel
  command line
- select correct uncompression function based on filetype

This patch adds basic support to detect filetypes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-11-29 21:12:42 +01:00