summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup Kconfig filesAlexander Shiyan2013-08-121-1/+1
| | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2013-08-055-1/+129
|\
| * UBI: reimport UBI from Linux v3.10Sascha Hauer2013-07-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | This is a fresh UBI import from Linux v3.10 This is done mainly to get fastmap support. This was tested with the i.MX nand driver, the MXS nand driver and on CFI NOR flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: MXS: introduce stmp device supportSascha Hauer2013-07-233-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | MXS specific devices have some common infrastructure in the kernel known as STMP devices. We have the same in barebox, but with a mxs_ prefix instead of a stmp_ prefix. As some STMP devices are also found on i.MX6 move the common infrastructure out of MXS specific files and use the stmp_ prefix. This is done in preparation for i.MX6 NAND support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * string: introduce memchr_invSascha Hauer2013-07-221-0/+59
| | | | | | | | | | | | Directly taken from Linux Kernel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2013-08-051-6/+6
|\ \
| * | CONFIG_PANIC_HANG: replace #ifdef with IS_ENABLED()Antony Pavlov2013-08-051-6/+6
| |/ | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | pbl: add lz4 supportJean-Christophe PLAGNIOL-VILLARD2013-07-221-1/+5
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: Add support for LZ4-compressed kernelKyungsik Lee2013-07-166-1/+203
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | decompressor: Add LZ4 decompressor moduleKyungsik Lee2013-07-162-0/+482
|/ | | | | | | | | | | | | This patch adds support for LZ4 decompression in the Linux Kernel. LZ4 Decompression APIs for kernel are based on LZ4 implementation by Yann Collet. LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html LZ4 source repository : http://code.google.com/p/lz4/ 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>
* Merge branch 'for-next-manual/oftree-linux-sync'Sascha Hauer2013-07-021-0/+60
|\
| * lib: string: import case-insensitive string compareSebastian Hesselbarth2013-06-201-0/+60
| | | | | | | | | | | | This imports strnicmp, strcasecmp, and strncasecmp from Linux to barebox. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
* | add function to get boardinfo stringSascha Hauer2013-06-241-1/+1
|/ | | | | | | | When using devicetrees the boardinfo (or model) can be obtained from the devicetree. Add a function to get the boardinfo so that we have a chance to add information from the devicetree. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: Add helpers to provide an enum parameterSascha Hauer2013-05-231-0/+104
| | | | | | | | We recently gained helper functions for different types of device parameters. One thing missing was a helper for an enum type parameter. This patch adds this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/param'Sascha Hauer2013-05-061-39/+263
|\ | | | | | | | | Conflicts: drivers/mci/mci-core.c
| * param: pass param to dev_remove_paramSascha Hauer2013-04-111-11/+6
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: remove now unused dev_[gs]et_param_ipSascha Hauer2013-04-111-17/+0
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: Add ip address convenience functionSascha Hauer2013-04-111-8/+87
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: Add integer and boolean parameter helpersSascha Hauer2013-04-111-0/+161
| | | | | | | | | | | | | | | | | | | | This adds convenience functions for directly registering integers and bools as device parameter. This way driver no longer have to fiddle with string handling. The format used to print the parameter is passed to the functions to be able to print parameters in a flexible way. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: refactor __dev_add_paramSascha Hauer2013-04-071-13/+18
| | | | | | | | | | | | | | | | Let __dev_add_param take a previously allocated struct param_d. This helps when later other users wish to embed a struct param_d in a bigger struct. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: Add dev member to struct param_dSascha Hauer2013-04-061-0/+1
| | | | | | | | | | | | This will make it unnecessary to pass the dev pointer around later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Use a common define for RW_BUF_SIZESascha Hauer2013-04-171-2/+0
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: remove unused libfdtSascha Hauer2013-03-0611-1835/+0
| | | | | | | Now that we are completely independent of libfdt remove the unused code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: move OFTREE Kconfig option to drivers/of/Sascha Hauer2013-03-061-4/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* libubi: Use global mtd_all_ff functionSascha Hauer2013-03-041-12/+1
| | | | | | We introduced a global function for this, so use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mtd'Sascha Hauer2013-03-042-8/+8
|\ | | | | | | | | | | Conflicts: arch/arm/configs/eukrea_cpuimx27_defconfig drivers/mtd/core.c
| * libmtd: rename functions from mtd_* to libmtd_*Sascha Hauer2013-02-142-8/+8
| | | | | | | | | | | | | | | | | | | | The kernel nowadays has mtd_read/write and other functions. In barebox we also have these functions, but with a different prototype, namely they correspond to the libmtd userspace functions. Rename these functions to libmtd_* to avoid name clashes with future mtd updates. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | getopt: change optstring to const char*Alexander Aring2013-02-111-2/+2
|/ | | | | | | | | Change getopt optstring parameter type to const char *. Also change type to const char * of tmp variable which pointed to optstring. This will only handle readonly. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* pbl: fix IMAGE_COMPRESSION_LZO-enabled build on MIPSAntony Pavlov2013-02-051-1/+3
| | | | | | | | | | | | | | | | | | | Here's the error message: LD arch/mips/pbl/zbarebox pbl/built-in-pbl.o: In function `decompress_unlzo': /home/antony/barebox.git.rebased.isp/pbl/decomp.c:35: undefined reference to `free' pbl/built-in-pbl.o: In function `pbl_barebox_uncompress': (.text.pbl_barebox_uncompress+0x6d0): relocation truncated to fit: R_MIPS_26 against `free' pbl/built-in-pbl.o: In function `pbl_barebox_uncompress': (.text.pbl_barebox_uncompress+0x6e0): undefined reference to `free' pbl/built-in-pbl.o: In function `pbl_barebox_uncompress': (.text.pbl_barebox_uncompress+0x6e0): relocation truncated to fit: R_MIPS_26 against `free' make[1]: *** [arch/mips/pbl/zbarebox] Error 1 make: *** [zbarebox.bin] Error 2 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/compile-log-level'Sascha Hauer2013-02-042-3/+3
|\ | | | | | | | | Conflicts: drivers/usb/host/ehci-hcd.c
| * treewide: fix format specifiersSascha Hauer2013-01-272-3/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/commands'Sascha Hauer2013-02-042-0/+796
|\ \
| * | commands: add let command which supports proper arithmeticJan Luebbe2013-01-092-0/+796
| | | | | | | | | | | | | | | | | | | | | | | | This command works like the corresponding Unix shell command and is used for adding, multiplying and much more. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | introduce common bootstrap codeJean-Christophe PLAGNIOL-VILLARD2013-01-227-0/+198
| |/ |/| | | | | | | | | | | | | | | | | | | This will allow to have a generic code to create different bootstrap As example Barebox as TI Xloader Barebox as AT91 Bootstrap Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | graphic_utils/fb_open: fix fbsizeJean-Christophe PLAGNIOL-VILLARD2013-01-161-1/+1
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: add barebox version of libmtdWolfram Sang2012-12-193-0/+372
| | | | | | | | | | | | | | | | Based on mtd-utils and stripped down to needed functionality and reworked to barebox interfaces. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: add libubigenWolfram Sang2012-12-193-0/+316
| | | | | | | | | | | | | | Imported from mtd-utils and stripped down to needed functionality. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: add libscanWolfram Sang2012-12-193-0/+223
| | | | | | | | | | | | | | | | Imported from mtd-utils and stripped down to needed functionality. Add prefix to functions so we have a clean namespace. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: update size_human_readable to latest versionWolfram Sang2012-12-191-16/+31
| | | | | | | | | | | | | | | | Copy over the latest version from u-boot which handles bigger sizes now and does arithmetic with shifts instead of divisions. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: misc: add 'iB' suffixes to strtoull_suffixWolfram Sang2012-12-191-1/+4
|/ | | | | | | Since this is the 'official' notation, we should support it. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'kconfig'Sascha Hauer2012-12-082-4/+4
|\
| * Cleanup Kconfig filesAlexander Shiyan2012-12-082-4/+4
| | | | | | | | | | | | | | | | | | This patch provides a global cleanup barebox Kconfig files. This includes replacing spaces to tabs, formatting in accordance format, removing extraneous lines and spaces. No functional changes. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ext4'Sascha Hauer2012-12-072-5/+5
|\ \
| * | filetype: Pass bufsizeSascha Hauer2012-12-032-5/+5
| |/ | | | | | | | | | | | | | | | | | | 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>
* / rm: implement -rSascha Hauer2012-11-293-1/+57
|/ | | | | | To recursively remove files and directories. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* xymodem.c: fix compiler warningAntony Pavlov2012-11-261-1/+1
| | | | | | | | | | | Fixes: lib/xymodem.c:558: warning: no previous prototype for ‘do_load_serial_xmodem’ lib/xymodem.c:572: warning: no previous prototype for ‘do_load_serial_ymodem’ lib/xymodem.c:586: warning: no previous prototype for ‘do_load_serial_ymodemg’ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bmp: specify we need to keep the data read from the fileJean-Christophe PLAGNIOL-VILLARD2012-11-211-0/+1
| | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ymodem'Sascha Hauer2012-11-163-0/+601
|\
| * commands: change Y-Modem implementationRobert Jarzmik2012-11-123-0/+601
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current Y-Modem implementation has some limitations: - Y-Modem/G protocol is not supported - Multiple files (aka. batch) transfers are not supported - Transfer speed over fast lines (USB console) is slow - Code is not trivial to maintain (personnal opinion) This implementation tries to address all these points by introducing loady2 command. The effects are : - transfer speed for Y-Modem over USB jumps from 2kBytes/s to 180kBytes/s - transfer speed for Y-Modem/G jumps to 200kBytes/s - multiple file transfers are possible This command was tested on a USB console and UART 9600bps serial line : - NAKs (and retransmissions) were tested for faulty serial lines - multiple file transfers were tested - Y-Modem, Y-Modem/G and X-Modem transfers were tested Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Tested-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/readline'Sascha Hauer2012-11-161-11/+23
|\ \