9
0
Fork 0
Commit Graph

131 Commits

Author SHA1 Message Date
Sascha Hauer f4491d7b04 kallsyms/printk: enable symbol printing support (%pS)
With this kallsyms finally start working at least on ARM. This
enables us resolving addresses into symbols which is particularly
useful in combination with stack unwinding support. As kallsyms
now compile and work we can remove the depends on BROKEN.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-03-10 14:50:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD a3463cc128 lib/decompress_unlzo: use fill and full to read and write data
this will all to simplify the sync with the kernel and later easly add the
self decompression support to barebox

as example with a lzo compression will reduce barebox from 180224 to 99863
bytes so 55.41%
-rwxr-xr-x 1 root root  99863 Jan 28 02:17 build/versatilepb/barebox.bin.lzo

we also reduce the binary size by 224 bytes

Old version
# ls -al build/versatilepb/barebox.bin
-rwxr-xr-x 1 root root 180468 Jan 28 02:14 build/versatilepb/barebox.bin

New version
# ls -al build/versatilepb/barebox*
-rwxr-xr-x 1 root root 180244 Jan 28 02:13 build/versatilepb/barebox.bin

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-28 19:05:00 +01:00
Krzysztof Halasa c5baa0edc4 Fix error handling with malloc, memalign etc. Introduce xmemalign().
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().

This patch also fixes code which didn't check for NULL from malloc() etc.

Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
Krzysztof Halasa 1b6a3e3634 Silence few warnings.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-21 09:02:40 +01:00
Sascha Hauer 32558d1ae5 LED: Add LED trigger support
This patch allows to associate LEDs with certain triggers, such
as heartbeat or network activity.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-12-20 09:57:35 +01:00
Robert Schwebel 681f821d05 doc: unify documentation for 'devinfo'
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
2010-11-01 16:23:09 +01:00
Robert Schwebel 52812cc68f digest: align menu
Align with the other menu entries.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-01 11:44:48 +01:00
Robert Schwebel 6c7f466400 devinfo: use subtree only with devinfo
The do_devinfo_subtree() function is only used if devinfo is compiled
in, so put it under the same ifdef. This avoids the following warning
when built with allnoconfig:

lib/driver.c:247: warning: 'do_devinfo_subtree' defined but not used

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-01 11:44:48 +01:00
Robert Schwebel ee1419ec92 doc: fix wrongly named parameter
Silence this warning:

lib/parameter.c:85: Warning: argument `value' of command @param is not found in the argument list of dev_set_param(struct device_d *dev, const char *name, const char *val)
lib/parameter.c:85: Warning: The following parameters of dev_set_param(struct device_d *dev, const char *name, const char *val) are not documented:
  parameter val

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-22 20:47:03 +02:00
Sascha Hauer 298252bdef process_escape_sequence: Add missing include
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:42 +02:00
Sascha Hauer 0d1c13019e libbb: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:25 +02:00
Sascha Hauer 6bc37ca831 remove dead ldiv code
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:25 +02:00
Sascha Hauer c89ac15f80 lib/driver.c: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:25 +02:00
Sascha Hauer ee6b3e174d copy_file: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:23 +02:00
Sascha Hauer f167796416 crc32: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:23 +02:00
Sascha Hauer eff51304a7 readline: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:22 +02:00
Sascha Hauer 246c053c7a fnmatch:sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:22 +02:00
Sascha Hauer e7ef703f07 glob: sparse fixes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-10-21 22:21:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD 14f5e927f4 sha1/sha256: use be32_to_cpu and cpu_to_be32
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-22 10:32:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD 7a1033c3a3 sha1: use unit32_t and uint8_t
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-22 10:32:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD e85c6bb0a7 driver: use id as -1 for auto assigned id
before if you specify id = 0 the next available id will be taken
otherwise fail if already registered now as in linux we use -1

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-20 08:58:52 +02:00
Jean-Christophe PLAGNIOL-VILLARD c3ad283b8b add sha256 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:57:22 +02:00
Jean-Christophe PLAGNIOL-VILLARD 3b0850e515 add sha1 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:57:21 +02:00
Jean-Christophe PLAGNIOL-VILLARD 0e3339a0e2 add md5 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:57:21 +02:00
Jean-Christophe PLAGNIOL-VILLARD 77a57f4cb4 add digest framework
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:57:21 +02:00
Jean-Christophe PLAGNIOL-VILLARD c33a2e503c device: fix dev_name
dev_name is supposed to return the name of the device plus the id

currently we use %s%d format where in the kernel the use %s.%d
we may think to switch to this format for the device name and keeping the %s%d
for the devfs

this will be usefull to not modify the clock device name as example

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-20 08:56:37 +02:00
Jean-Christophe PLAGNIOL-VILLARD 427c608583 driver: allow register device with specific id
if you specify id = 0 the next available id will be taken
otherwise fail if already registered

before if you specify one it will have use the next free id anyway

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2010-09-17 10:56:24 +08:00
Sascha Hauer af60e5883e vsprintf: fix wrong EXPORT_SYMBOL
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-09-16 08:31:10 +02:00
Jean-Christophe PLAGNIOL-VILLARD dfcdce8eec arm: add common clkdev
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Andrea GALLO <andrea.gallo@stericsson.com>
Cc: Gael SALLES <gael.salles@stericsson.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-06 19:09:38 +02:00
Jean-Christophe PLAGNIOL-VILLARD e0953c5db2 string: add strlcpy support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Andrea GALLO <andrea.gallo@stericsson.com>
Cc: Gael SALLES <gael.salles@stericsson.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-06 19:09:38 +02:00
Sascha Hauer a33bc77bdd add rbtree support (needed for ubi)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 13:00:01 +02:00
Sascha Hauer 1b5de4c0fe crc32: activate crc32_no_comp (needed for jffs2 and UBI)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-07-05 13:00:01 +02:00
Sascha Hauer 257da5cac0 add progression bar function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-28 10:43:55 +02:00
Sascha Hauer 738d70e430 include support for a simple pseudo number generator
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-22 15:44:44 +02:00
Sascha Hauer c3789cd49b rework device parameters
Change device parameters so that the memory management is in generic
code. This also removes the need of storing statically initialized
parameters as they are stored in a struct list_head for each device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-17 08:28:25 +02:00
Sascha Hauer e723f79cb7 make panic and hang __noreturn functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:15:03 +02:00
Sascha Hauer adaffb5b0c add process_escape_sequence function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02:00
Sascha Hauer 362d6375aa add snprintf function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02:00
Sascha Hauer 6d079ae2ca add unlzo support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-03-30 14:14:58 +02:00
Sascha Hauer 922bb41a47 remove typedef cmd_tbl_t and replace it with struct command
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 17:25:32 +01:00
Robert P. J. Day 057125d9b5 Remove obsolete comment referring to CFG_CMD_JFFS2.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-21 15:25:04 +01:00
Sascha Hauer 9ff9388632 vsprintf: Only define PAGE_SIZE if not already defined
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-18 16:44:58 +01:00
Sascha Hauer 73108301d4 Remove unnecessary casts in key defines
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-18 16:44:54 +01:00
Sascha Hauer 8fc2d57024 read_key: Use ARRAY_SIZE instead of hardcoded value
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-18 11:11:40 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Juergen Beisert 765cb0028d Fix some exported names
Unsure if this is the/a correct fix, but without it, my build fails.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-11 10:37:11 +01:00
Sascha Hauer 73d57b1d35 list: remove duplicated list.h
We accidently have two list implementations in the tree:
include/list.h and include/linux/list.h. This patch moves
the latter (newer one) to include/linux/list.h.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-11-03 09:48:53 +01:00
Sascha Hauer 420a3173f0 commands: remove maxargs
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-10-19 16:18:33 +02:00
Sascha Hauer 51b0b001d3 stringlist: Fix printing on smaller consoles
Do not add additional space between strings, we already
did this by adding 4 to the string length.

Signed-off-by: Sascha Hauer <sha@pengutronix.de>
2009-10-15 16:06:05 +02:00
Sascha Hauer 82875bfd52 readline: Allow only ascii and printable characters
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-09-29 08:50:42 +02:00