9
0
Fork 0
Commit Graph

233 Commits

Author SHA1 Message Date
Jan Luebbe 0b78902b01 parameter: fix memory leak
In __dev_add_param, the name string is allocated using strdup.
Free it when removing the parameter.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:01:27 +02:00
Jean-Christophe PLAGNIOL-VILLARD 5eb89cea2a gui: blit the surface on demand
Do not blit the surface everytime we write an image
As we want to able to render multiple image this will cause 1 blit per image;

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:22:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9a048064e4 graphic_utils: introduce common fb_open/close
To open, memmap, get the fb_info and if needed allocate the offscreen buffer

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:22:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3fa8d74abe gui: introduce screen and surface to factorize and simplify code
Instead of passing hundreds of parameter, just pass the right structure.

struct screen represent the screen with a without double buffering.
struct surface represent the part of the screen we want to render.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:22:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD 21a8ef55b0 graphic_utils: pass image so we can draw only the visible part of the image
This is needed if the image is bigger than the screen.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:22:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD da0d61770a gui: move gui file to include/gui and lib/gui
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:22:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3dc70b2255 image_renderer: fix size type
/opt/work/barebox/lib/image_renderer.c: In function 'image_renderer_open':
/opt/work/barebox/lib/image_renderer.c:37:2: warning: passing argument 2 of 'read_file' from incompatible pointer type [enabled by default]
In file included from /opt/work/barebox/lib/image_renderer.c:11:0:
/opt/work/barebox/include/fs.h:167:7: note: expected 'size_t *' but argument is of type 'int *'

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-04 17:22:09 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02: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 4517b5980f Merge branch 'for-next/misc' 2012-10-03 21:10:57 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Jean-Christophe PLAGNIOL-VILLARD f65c991d41 png: add picoPNG lib support
This is an alternative to LodePNG take from http://forge.voodooprojects.org/
which is base on picoPNG C++ wrote by Lode Vandevenne. The same author as
LodePNG.

PicoPNG only support RGBA PNG8

The source code of picopng.c was just adapted to be compliant with C89 and drop
the internal ZLIB support. Coding style untouched.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:23:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 1f16f058e4 add PNG support
use LodePNG version 20120729 from http://lodev.org/lodepng/

The original coding style is keeped to simplify update.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:23:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2beb82f88a graphic_utils: add rgba support
this will allow to render rgba image with or without hw 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:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2dbdd40d57 splash/bmp: switch to image_renderer
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:22:47 +02:00
Jean-Christophe PLAGNIOL-VILLARD 09a1a28233 introduce image_renderer framework
This will allow to support bmp and png

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:21:55 +02:00
Jean-Christophe PLAGNIOL-VILLARD 78b7818fba Introduce graphic utils
to Factorise pixel rendering

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:21:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD 6ce5bc4624 bmp: Move bmp rendering to lib/bmp.c
So we can add other format support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-12 17:21:10 +02:00
Alexander Aring f9fde00226 libbb: remove vi tabwidth setting
Remove vi tabwidth and tabstop setting.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-11 09:20:59 +02:00
Jean-Christophe PLAGNIOL-VILLARD 790ca84f39 uncompress: drop wrong BUG(uncompress_size)
As uncompress_size is a static and will set if call uncompress_size multiple
time.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-10 10:05:46 +02:00
Sascha Hauer bed1a6ffab Merge branch 'for-next/pbl' 2012-09-05 12:59:29 +02:00
Jean-Christophe PLAGNIOL-VILLARD f7edad7cbf recursive_action: add ACTION_FOLLOWLINKS support
this is need to support symlink in envfs

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-05 03:22:14 +08:00
Eric Bénard 738c57eeaa stringlist: fix division by zero
len is checked instead of num so when num is zero, we get a
division by zero a few lines later

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-29 09:10:13 +02:00
Sascha Hauer b859e325e9 Add pre-bootloader (pbl) image support
This allows for creating a pre-bootloader binary for
  - nand boot
  - mmc boot
  - compressed image
 
 Currently on the compressed image is implemented the boot really on current lowlevel
 init support. In a second step this could be move to the pbl c code with generic framework.
 
 The pbl will be incharge of the lowlevel init if needed.
 The barebox will skip it.
 
 The decompressor support lzo and gzip and allow to add easly more.
 
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQG6WuAAoJEOrjwV5ZMRf2UwEP/RVtYzL3/5tYgkYtE7ro7tu4
 bByT4UmZunrkLnqcSSfoan9G1ruiElDVJHIDgGMoYo2z29iOkwb2ui6EYq14kaWv
 rkkKDxZmxGis9plMlRO0ySNRgqbC061lnGuUe9XnZ6XBrGCAXCKm67LunNCV61Bm
 PRCSfK2yhO6bAYYW7jWFzdzCwH9DmEgMZBwOXsq/qzZUgJNfqauqRrOLA1Ot/R8E
 jUhSncOkVTezqJA7CnY2pAsBP+tXeNNaE5IVCO0WvC8l3zFHFRTnjAwOb4+xizNp
 kjjFh8NPSPGDphn6j9y2xbz5mPOqgZuQoIuYgPcYTgHLmhXKZGXa1Cr5MVHKhw1L
 923YUBGMop5SIMjACIzTByL6/toExRwldXyH3HC4fmr1uw/9gmExgmBujtMgt/Jc
 x9YAwkACEQoZ7BYo0oppkEsWmPsrDUgAoUMnN5RLDxKPeJCCPiOZwug21PrV8tUu
 053bfXLMKoEdpzAz5WkS1Ci1Qq0awv+8HZtOaVdRzkyGZaseAxeZ0vvLaBxnxHHJ
 asQRyGj373//KBeTFeVQVYTJyokd1KvbvhHz/kR5rAXfIU2+cNGaiWMVt5i9tWPY
 CV12tocse+E1f3zmuVh9WmO5gX+lNq2ZqUa/OaMYif83uXH2WbfqCvVbx1qTYOOq
 NmBxmE5f5e0Le9FPdpD1
 =t0vB
 -----END PGP SIGNATURE-----

Merge tag 'pbl' of git://git.jcrosoft.org/barebox into for-next/pbl

Add pre-bootloader (pbl) image support

This allows for creating a pre-bootloader binary for
 - nand boot
 - mmc boot
 - compressed image

Currently on the compressed image is implemented the boot really on current lowlevel
init support. In a second step this could be move to the pbl c code with generic framework.

The pbl will be incharge of the lowlevel init if needed.
The barebox will skip it.

The decompressor support lzo and gzip and allow to add easly more.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 15:55:53 +02:00
Jean-Christophe PLAGNIOL-VILLARD 104c39fe82 compressed image: add gzip support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-08-03 18:09:15 +08:00
Sascha Hauer 21ea2ad830 glob: fix GLOB_SORT
The arguments to collated_compare are actually pointers to
pointers to char, not pointers to char.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 08:29:38 +02:00
Sascha Hauer 3af8c180cb qsort: Fix wrong check
The check for overflow accidently was exactly the opposite.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-08-03 08:28:18 +02:00
Sascha Hauer b1a4e722c3 Merge branch 'for-next/onfi' 2012-08-01 17:49:27 +02:00
Sascha Hauer 9204bf87d6 Merge branch 'for-next/misc' 2012-08-01 17:49:27 +02:00
Sascha Hauer e986897cd0 Merge branch 'for-next/compressed-prepare' 2012-08-01 17:49:27 +02:00
Jean-Christophe PLAGNIOL-VILLARD 991e1caf2f decompress_unlzo: define decompress_unlzo as decompress
so we can use decompress in the decompressor
this will simplify multi decompress support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-30 10:04:23 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3890f77ebe vsprintf: fix EXPORT_SYMBOL typo on simple_strtoull
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-25 09:50:00 +02:00
Bernhard Walle 5fa342b291 lib/Kconfig: Fix alignment of arrows in label
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-24 08:11:01 +02:00
Sascha Hauer 644800f593 lzo: Allow for static inlining
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-23 23:57:44 +02:00
Eric Bénard 7baead578d string: add strim for ONFI code
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-07-05 20:58:54 +02:00
Sascha Hauer a3251562db Merge branch 'for-next/64bit' 2012-07-02 10:58:32 +02:00
Alexander Shiyan 226d222c94 Unused files removed
Files "modules.builtin" probably have been copied from kernel tree.
This files not used by barebox and can be removed safely.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:09:49 +02:00
Sascha Hauer efa379f224 make parse_area_spec arguments loff_t
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 76281a16fb introduce strtoull_suffix function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 16:53:24 +02:00
Sascha Hauer 91c38de28f glob: Add sorted output support
This allows us for example to execute init scripts in the correct
order.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 20:16:44 +02:00
Sascha Hauer cbdf1e6dfa add qsort support
This is based on U-Boot code which in turn is based on uclibc
code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 20:16:26 +02:00
Sascha Hauer 6188685091 Make errno a positive value
Normally errno contains a positive error value. A certain unnamed developer
mixed this up while implementing U-Boot-v2. Also, normally errno is never
set to zero by any library function.
This patch fixes this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 08:35:54 +02:00
Sascha Hauer 8cab6a8733 parameter: return empty string for unset parameters
Currently we return NULL for unset parameters. As we can't set them
back to NULL once set this is not very consistent. Return an empty
string instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 14:02:03 +02:00
Sascha Hauer e4e3fbd22b improve complete support
The following patch serie improve the complete support
 by adding a complete framework to aalow commands complete support.
 
 The add also car complete support for eval and setting and executable
 file support
 
 This also include an update of the stringlist API to support asprintf
 API
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPnohsAAoJEOrjwV5ZMRf2qeIQAIC7WrIao0mB2pIB+51MqeU+
 sof7GLxUl0MWXFFc3OFEHDcY5grC867mBmB9+uDG1mvcxa/bUpw+jMRMrki5j4Kg
 mjaHQ2UCvDjMHqQi7ISc/WTyJb09mtduFIceP0EftAmG8Mb5n9XOMaKwL9r/UQHB
 ps9MijnI/QeFqbrmBZcuaCp59QsPvipYw8NMJITBu2VvWrpKTIox33qPfNATDuEV
 SzMoLwz+uD7W7dEAM/A1uFdo4K5fLyZruDVGQoQ8CRS+zW3E6rr/EakpN5mhr/66
 dVZYO1xWppBaefIJQ1RD6bvwlFvesuuvQmMtDxsCsp07fyBolEWfFzblrwdkbueY
 NPwWExV5nzbRdAKKSyhU/nHiQ2edOQQZtHDAbnM4zh5e6lK7YLrzVklzT4Dfhzn0
 GRdnjCmiQiaZdmAEHe8wte2nr3Lc01fTsj/EFVA+LYP3a9by1iG2Zn3/ChieVcN4
 R+o/2lMBdhxsTszcmwMOemdqVPlt/0VmEXrKGtjTIZEViuQyyhY8ZtEaf4C0zeln
 Jf60t0ZvkehAJc0Lo4UOygjzvErqcKoHMk7utAjP+bi1KcMgF3Q+HmtCnJJs2FHw
 c40FZj1WcLPStEiS1way7miBakxOy2zPumKi1OXx+140L25C1nvQPYu8ilOZHEyU
 opNlo+wQ8h5sG/054kYL
 =rYfw
 -----END PGP SIGNATURE-----

Merge tag 'complete_update_support' of git://git.jcrosoft.org/barebox into next

improve complete support

The following patch serie improve the complete support
by adding a complete framework to allow commands complete support.

The add also car complete support for eval and setting and executable
file support

This also include an update of the stringlist API to support asprintf
API
2012-05-01 21:41:59 +02:00
Sascha Hauer f152f6a770 stringlist: implement string_list_add_asprintf
Useful for allocating a string list entry on the fly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:22:23 +08:00
Sascha Hauer 34faa2e7ca stringlist: use seperately allocated string
Allocate the string in string list seperately instead of
embedding a zero length string into struct stringlist.
Besides looking cleaner this allows us to implement a
string_list_asprintf.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:22:23 +08:00
Sascha Hauer cace82b597 glob: activate GLOB_NOCHECK flag
Needed for hush.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:55 +02:00
Sascha Hauer af06205ad5 dev_add_param: check if param exists already
Before adding a new parameter to a device we should check if
it already exists.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 11:19:59 +02:00
Sascha Hauer 51f2ded17c param: make return value of param getter function const
The string returned by the getter function should not be
changed. Make it const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 11:17:02 +02:00
Sascha Hauer 9d699b790c net: use static string in string_to_ip
Simplify usage of ip_to_string by using a static string.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-15 15:05:38 +02:00