summaryrefslogtreecommitdiffstats
path: root/include/filetype.h
Commit message (Collapse)AuthorAgeFilesLines
* filetype: Detect Layerscape PBL imagesSascha Hauer2019-05-091-0/+2
| | | | | | | The Layerscape SoCs have their own boot image format. Add filetype detection for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add code to detect i.MX image v2Andrey Smirnov2018-08-311-0/+1
| | | | | | | | Modify file_detect_type() and add code needed to be able to detect i.MX boot images with v2 header. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add code to detect i.MX image v1Andrey Smirnov2018-08-311-0/+1
| | | | | | | | Modify file_detect_type() and add code needed to be able to detect i.MX boot images with v1 header. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/bootm'Sascha Hauer2018-07-091-0/+1
|\
| * filetype: add ELF typeAntony Pavlov2018-06-151-0/+1
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | kwbimage_v0: add support to detect and boot a mvebu v0 imageUwe Kleine-König2018-06-041-0/+1
|/ | | | | | | | | The differences between v0 and v1 of the mvebu kwbimage are small enough that the function to boot such an image can be shared between both variants. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Detect ARM aarch64 Linux imagesSascha Hauer2018-04-041-0/+1
| | | | | | ARM aarch64 Linux image have a special type. Allow to detect them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add type detection at an offsetPhilipp Zabel2018-02-051-0/+1
| | | | | | | | Add file_name_detect_type_offset to allow file system detection for loop mounts at an offset. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add fastboot sparse format detectionSascha Hauer2018-01-171-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: fix file type detection for Barebox MIPSOleksij Rempel2017-08-151-1/+1
| | | | | | | | | | | | | | | Since there is no "0/" after "barebox" in the file header, comparison won't stop on the right place. Fix regression introduced by patch: |commit 03939c0dfbf27d99e81d85e1bc0340fbee083d74 |Author: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |Date: Tue Jan 22 15:40:36 2013 +0100 | | filetype: add is_barebox_mips_head support Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
* filetype: Add image type for boot images used on Armada 370 and XPUwe Kleine-König2017-03-021-0/+1
|
* Add filetype and detection for squashfs imagesEnrico Jorns2016-10-241-0/+1
| | | | | | | | | | | | | | | | | | | This adds `filetype_squashfs` to the list of known filetypes and adds a detection for squashfs files to file_detect_type(). This currently matches on the `hsqs` start sequence of an image file. Additionally, the newly introduced filetype is registered as the type of the squashfs_driver which allows, for example, to mount squashfs without the need to specify a type parameter. This changes enable booting a squashfs with the simple `boot` command pointing to the location (device) that holds the squashfs. Note that booting with blspec is limited as the current squashfs driver is not capable of handling symbolic links. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: add new filetype for SoCFPGA xload imageSteffen Trumtrar2016-08-181-0/+1
| | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot: Add a ARM Barebox filetype handlerMarkus Pargmann2016-03-111-0/+2
| | | | | | | | | This will automatically call barebox_update for the transfered file if it is an ARM Barebox image and the destination file is defined by some update handler. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* detect_fs: use device instead of fileVicente Bergas2015-10-021-0/+1
| | | | | | | | detect_fs would usually mount a device on a directory, so, use a device-specific type detection. Signed-off-by: Vicente Bergas <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add filetype for MXS bootstreamSascha Hauer2015-06-121-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/xz'Sascha Hauer2014-11-051-0/+1
|\
| * filetype: Add XZ filetype supportSascha Hauer2014-10-241-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | common: fix mbr filetype detectionZahari Doychev2014-11-051-0/+1
|/ | | | | | | | | | | | | | Sometimes mbr is erroneously recocognised as FAT partion. Due to this the mbr partition parser is not being called and the partitions on the media are not detected. This patch should fix the problem. The checking is done as in the linux kernel. I have seen the problem using usb sticks. Although partitioning and formatting them under linux. The file system type field in the mbr remains there which causes the wrong detections as FAT32 type and not as mbr. Signed-off-by: Zahari Doychev <zahari.doychev@linux.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add DOS EXE file detection supportSascha Hauer2014-07-141-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* barebox: common: added new filetypesWadim Egorov2014-07-091-0/+2
| | | | | | | | | - 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>
* filetype: Add detection for barebox environmentSascha Hauer2014-02-201-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: add Binary PacKage BPK typeJean-Christophe PLAGNIOL-VILLARD2013-10-061-0/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add ubifs detectionSascha Hauer2013-08-071-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* lib: Add support for LZ4-compressed kernelKyungsik Lee2013-07-161-0/+1
| | | | | | | | | | | | 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>
* treewide include/: Add missing includesSascha Hauer2013-05-311-0/+2
| | | | | | | 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>
* common/filetype: move partition-table detection into own functionHubert Feurstein2013-04-291-0/+1
| | | | | Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: add GPT supportJean-Christophe PLAGNIOL-VILLARD2013-02-161-0/+1
| | | | | | | | 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>
* filetype: add is_barebox_headJean-Christophe PLAGNIOL-VILLARD2013-01-221-0/+5
| | | | | | | 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>
* filetype: add is_barebox_mips_head supportJean-Christophe PLAGNIOL-VILLARD2013-01-221-0/+16
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Make buf in file_detect_type constSascha Hauer2013-01-201-1/+1
| | | | | | This function has no business changing the buffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add ext fs detection supportSascha Hauer2012-12-031-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Pass bufsizeSascha Hauer2012-12-031-1/+3
| | | | | | | | | | 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>
* filetype: add shortnamesSascha Hauer2012-10-301-0/+2
| | | | | | | 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>
* Merge branch 'for-next/png'Sascha Hauer2012-10-031-0/+2
|\ | | | | | | | | | | Conflicts: common/filetype.c include/filetype.h
| * filetype: add PNG supportJean-Christophe PLAGNIOL-VILLARD2012-09-121-0/+1
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * filetype: add BMP supportJean-Christophe PLAGNIOL-VILLARD2012-09-121-0/+1
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/omap'Sascha Hauer2012-10-031-0/+16
|\ \ | | | | | | | | | | | | Conflicts: Makefile
| * | xload: get barebox size from barebox_arm_headJan Weitzel2012-09-071-0/+16
| |/ | | | | | | | | | | | | | | | | 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>
* | filetype: Improve FAT detectionFranck Jullien2012-09-201-0/+2
|/ | | | | | | | | | | | | | | | 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>
* filetype: add fat filesystem supportJean-Christophe PLAGNIOL-VILLARD2012-09-041-0/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* MIPS: bootm: add "MIPS barebox" handlerAntony Pavlov2012-05-111-0/+1
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: add Bourne Shell supportJean-Christophe PLAGNIOL-VILLARD2012-04-181-0/+1
| | | | | | Put it at first as it's the most likely to detect Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* filetype: add Android boot image supportJean-Christophe PLAGNIOL-VILLARD2012-04-121-0/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* filetype: Add oftree detectionSascha Hauer2011-12-151-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add file detection supportSascha Hauer2011-11-291-0/+23
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>