summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/pstore'Sascha Hauer2016-01-117-0/+728
|\
| * lib: Import reed solomon code from kernelMarkus Pargmann2015-12-106-0/+704
| | | | | | | | | | | | | | | | reed solomon code is used by RAMOOPS to check and fix data stored in volatile memory. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * vsprintf: Add scnprintf from kernelMarkus Pargmann2015-12-101-0/+24
| | | | | | | | | | Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-01-113-5/+6
|\ \
| * | readline: Fix potential buffer overflow in command historySascha Hauer2016-01-081-1/+2
| | | | | | | | | | | | | | | | | | | | | Cursor up copies the last line into the buffer without checking if it fits into the current buffer. Fix this using safe_strncpy. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | readline: Fix potential buffer overflowSascha Hauer2016-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | cread_add_char doesn't take the trailing '\0' into account, so adding it at the end of readline can overflow the buffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootstrap: constify stringsTrent Piepho2016-01-082-3/+3
| |/ | | | | | | | | | | | | Various parameters for device names, etc. should be const strings. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / bootstrap: Boot barebox with kernel calling conventionTrent Piepho2015-12-141-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | In commit 8e3ddc13eb8239177ed20f119e3a3d02518b941d the bootm code was changed to boot barebox using the same calling convention as the kernel. Which on ARM is to pass three arguments which are zero, an architecture code, and a params pointer. A 2nd stage barebox can be booted using lib/bootstrap, which is different code from bootm. This code just leaves garbage in the first three parameters and so doesn't follow the convention. Change it to be compatible with the ARM kernel booting convention. This just sends a zero for the architecture, since the code for architectures depends on boot[zmu] and something using bootstrap wouldn't have those too. And it just passes NULL for the params since we don't have a way to pass a device tree from the preloader. All users of bootstrap are ARM based, but the code is in lib so a non-ARM board might someday make use of it. If the current code would work for them, then the change here will be ok too. Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2015-12-082-1/+12
|\
| * make_directory: fix warning: no previous prototypeSergey Koshechkin2015-11-181-1/+4
| | | | | | | | | | Signed-off-by: Sergey Koshechkin <serge.koshechkin@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * lib: readline support ctrl-l to clear screenDu Huanpeng2015-11-171-0/+8
| | | | | | | | | | | | | | | | maybe it is easier to press ctrl-l to clear the screen than type 'clear' command. Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2015-12-081-0/+4
|\ \
| * | graphics_utils: check for valid framebuffer before creating a screenSascha Hauer2015-11-131-0/+4
| |/ | | | | | | | | | | Otherwise we crash later when we try to print on that screen. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | font: fbconsole: add custom font supportsDu Huanpeng2015-11-234-0/+79
| | | | | | | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fbconsole: register fonts dynamicallySascha Hauer2015-11-134-33/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having a fixed array of fonts register the fonts dynamically. This allows easier adding of fonts to the tree since only one file per font has to be added and no other files modified. Currently we have to register the fonts very early before the first framebuffer is registered. This is because of our limited dev_add_param_enum() which wants to know the number of elements when called, so we can't add elements once after we've called dev_add_param_enum(). Maybe a dev_add_param_array() has to be created whithout this limitation, but that's left for a future exercise. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | lib: fix coding styleDu Huanpeng2015-11-091-3/+3
|/ | | | | Signed-off-by: Du Huanpeng <u74147@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* logo: Makefile: remove debug outputSascha Hauer2015-10-151-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* logo: Kconfig: make BAREBOX_LOGO_* depend on BAREBOX_LOGOAntony Pavlov2015-09-141-0/+4
| | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/param'Sascha Hauer2015-09-011-4/+8
|\
| * param_enum: protect against invalid valuesSascha Hauer2015-08-261-2/+6
| | | | | | | | | | | | | | | | Since dev_add_param_enum is passed a pointer containing the actual value it can contain an invalid value. Protect against it so that we do not access invalid array elements. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param_enum: Make name strings constSascha Hauer2015-08-261-2/+2
| | | | | | | | | | | | | | | | Not only the array containing the pointers should be const but also the strings themselves, so instead of using const char ** use const char * const *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-09-011-3/+3
|\ \
| * | lib: libfile: Do not ignore errors in close()Andrey Smirnov2015-08-191-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | Some character devices may perform meaningful operations in their implementation of close() -- a good example would be socfpga.c which checks if the FPGA was programmed succesfully in it's close() method -- so ignoring return value of this call may cause false positives in checking exit status for success. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | gui: implement blitting screen areasSascha Hauer2015-08-201-0/+19
| | | | | | | | | | | | | | So far we only supported blitting the whole screen from the shadow fb to the framebuffer. Add a function to blit areas. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | gui: Use fb provided shadowfb for offscreen renderingSascha Hauer2015-08-201-17/+7
| | | | | | | | | | | | | | The fb core now has builtin support for offscreen rendering, use this and drop offscreen handling in the gui code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | fb: return original fb_info in FBIOGET_SCREENINFOSascha Hauer2015-08-201-4/+2
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/logo'Sascha Hauer2015-08-066-0/+151
|\
| * Add new barebox logo to the treeSascha Hauer2015-07-206-0/+151
| | | | | | | | | | | | | | | | This adds the new barebox logo to the tree. This is added as svg image which is converted to different png images during build time. The logo can be found under /logo/barebox-logo-<width>.png in the running barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/fbcon'Sascha Hauer2015-08-0611-56/+11150
|\ \
| * | graphics_utils: Let fb_open allocate the screenSascha Hauer2015-07-203-35/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | Allocate the screen dynamically in fb_open. This opens the way to create a fb_create_screen function which takes a struct fb_info * instead of a filename. This is suitable for the framebuffer console which already has a struct fb_info *. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | fonts: Add 7x14 fontSascha Hauer2015-07-204-0/+4125
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | lib/fonts: add "MINI4x6" fontAntony Pavlov2015-07-164-0/+2164
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | import lib/fonts framework from linux kernelAntony Pavlov2015-07-166-0/+4730
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | graphics_utils: add function to create pixel from rgb tripletSascha Hauer2015-07-161-6/+26
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | graphics_utils: Export get_pixelSascha Hauer2015-07-161-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_pixel converts a 32bit trgb color into framebuffer format. This is useful for other code aswell, so export it. Other functions in the graphics utils code use the name get/set_pixel aswell, but instead of converting data they get a pixel from the framebuffer or set a pixel on the framebuffer. To separate from these rename the function to gu_hex_to_pixel. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | graphics_utils: Add function to invert an areaSascha Hauer2015-07-161-0/+19
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | gui: Fix typo in function nameSascha Hauer2015-07-152-2/+2
| | | | | | | | | | | | | | | | | | It's a render buffer, not a redering buffer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | graphic_utils: Add a common namespace to functionsSascha Hauer2015-07-153-14/+14
| |/ | | | | | | | | | | | | This adds a common namespace to the graphic functions. We use gu_ for graphic_utils. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | xfuncs: add wrapper for wchar strdup functionsMichael Olbrich2015-07-231-0/+31
| | | | | | | | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | xfuncs: add xasprintf() and xvasprintf()Michael Olbrich2015-07-231-0/+24
|/ | | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2015-07-032-1/+23
|\
| * xfuncs: import xstrndup() from busyboxMarc Kleine-Budde2015-06-181-0/+22
| | | | | | | | | | | | | | | | This function is needed for the fixed length string feature in the state framework. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * parameter: allow setting of string parameters of zero lengthMarc Kleine-Budde2015-06-181-1/+1
| | | | | | | | | | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-07-037-13/+15
|\ \
| * | treewide: fix 'new blank line at EOF' formatting errorAntony Pavlov2015-07-024-4/+0
| | | | | | | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | read_file_2(): drop unnecessary 'else'Alexander Smirnov2015-07-021-2/+2
| | | | | | | | | | | | | | | Signed-off-by: Alexander Smirnov <alllecs@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | parameter: always build MAC dev param functionsLucas Stach2015-07-021-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAC dev parameter functions would only be built when CONFIG_NET is set. This was okay as long as only network devices were using MAC dev params. This has changed with the merge of the state framework, so always compile them in if CONFIG_PARAMETER is set. Fixes: common/built-in.o: In function `state_mac_create': common/state.c:387: undefined reference to `dev_add_param_mac' Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | image_renderer: Use read_file_2Sascha Hauer2015-06-261-4/+4
| | | | | | | | | | | | | | | | | | | | | This returns a proper error code and allows us to print a proper error message which might not always be -ENOMEM. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | device parameters: sort alphabeticallySascha Hauer2015-06-181-1/+9
| |/ | | | | | | | | | | | | | | With many parameters on the global device it becomes increasingly annoying to find a parameter in the list. Sort it alphabetically to make this easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / bmp support: Use unaligned accessorsSascha Hauer2015-06-231-5/+6
|/ | | | | | | Some fields in the bmp header are unaligned. Use unaligned accessor functions to acces them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>