summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Add missing includesSascha Hauer2013-11-082-0/+2
| | | | | | | | A lot of files rely on include/driver.h including include/of.h (and this including include/errno.h. include the files explicitly so we can eventually get rid of including of.h from driver.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: convert the bmp renderer to respect line_lengthAndre Heider2013-11-061-4/+4
| | | | | Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* gui: convert graphic utils to respect line_lengthAndre Heider2013-11-061-5/+5
| | | | | Signed-off-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add function to read single line filesSascha Hauer2013-10-141-0/+43
| | | | | | | Often small files are used to store the value od a variable. This adds a function to easily read such a variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2013-10-071-0/+7
|\ | | | | | | | | Conflicts: commands/Makefile
| * process_escape_sequence: add support to \$?Jean-Christophe PLAGNIOL-VILLARD2013-09-181-0/+7
| | | | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/lzo'Sascha Hauer2013-10-076-402/+454
|\ \
| * | lzo: update to lzo-2013Jean-Christophe PLAGNIOL-VILLARD2013-09-226-402/+454
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | take from linux next-20130227 same version as v3.11 before -rwxr-xr-x 1 root root 123001 Feb 28 01:04 build/highbank/arch/arm/pbl/zbarebox.bin after -rwxr-xr-x 1 root root 122226 Feb 28 01:02 build/highbank/arch/arm/pbl/zbarebox.bin smaller and faster Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | copy_file: Add missing O_TRUNCSascha Hauer2013-09-291-1/+1
| | | | | | | | | | | | | | Without it, when copying a smaller file over a larger file the resulting file still has the remaining space from the larger file. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: Fix copy_file when filesize is FILESIZE_MAXTeresa Gámez2013-09-272-4/+9
|/ | | | | | | | | | Using tftp command does not work proper when files have FILESIZE_MAX, as copy_file and show_progress can not handle it. Check the file size for FILESIZE_MAX and handle it as file size = 0. Signed-off-by: Teresa Gámez <t.gamez@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/boardinfo'Sascha Hauer2013-09-051-1/+1
|\ | | | | | | | | | | | | Conflicts: arch/mips/boards/qemu-malta/init.c commands/bootm.c drivers/of/base.c
| * remove remaining references of CONFIG_BOARDINFOSascha Hauer2013-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | With this all code uses barebox_get_model() and no longer a compile time generated string. Also this renames barebox_boardinfo() to barebox_get_model() since we are going to add the corresponding _set_ function and 'model' corresponds to the devicetree notion. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ubifs'Sascha Hauer2013-09-051-0/+39
|\ \ | |/ |/|
| * Add deflate_decompress functionSascha Hauer2013-08-071-0/+39
| | | | | | | | | | | | Needed to implement decompressors for gzip without headers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | 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>