9
0
Fork 0
Commit Graph

6953 Commits

Author SHA1 Message Date
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
Jean-Christophe PLAGNIOL-VILLARD 37a97ca3fc qemu-malta: add nor flash support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:16:28 +08:00
Jean-Christophe PLAGNIOL-VILLARD fcd65ca321 qemu-malta: rename serial.c to init.c
as the garbage collector will remove the empty function and the
add_ns16550_device is a empty inline if the driver is not enabled.

This will simplify add device adding.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:09:14 +08:00
Jean-Christophe PLAGNIOL-VILLARD 7136dab1f2 mips: add in_be16/32 and out_be16/32 for cfi support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-30 20:09:05 +08:00
Antony Pavlov 6b489256ee Makefile: add barebox.srec to 'clean'
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 14:01:34 +02:00
Juergen Beisert 72a1bc9d95 netX: don't bother with variable sizes, use the intend
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Juergen Beisert 9e5d1aab6d netX: XPEC firmware is always of attribute const
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Juergen Beisert 79dc70c9ea netX/network: fix debug outputs
If DEBUG is defined it fails due to wrong variable names

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Michael Trensch eecbcafa3f netX: UART may not initialize correctly.
The netX internal UART latches register settings and internally uses
them only if written in the correct order. Other orders may work, but
sometimes the UART gets stuck, as the baudrate has not correctly been
set.

Signed-off-by: Michael Trensch <MTrensch@gmail.com>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Juergen Beisert 3231710c52 netX: unify the device registration
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Juergen Beisert a54d366e04 netX: add a few base addresses for non on chip devices
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:45:55 +02:00
Jaccon Bastiaansen 8cd566f187 Increase heapsize for i.MX21ADS board again.
Barebox cannot boot the recent mainline Linux kernels for the
i.MX21ADS board anymore when using TFTP, because the heap is too
small.

Signed-off-by: Jaccon Bastiaansen <jaccon.bastiaansen@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:43:18 +02:00
Sascha Hauer e652753f95 tlsf_malloc: return valid pointer for malloc(0)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:31:29 +02:00
Sascha Hauer cac75c0f23 dhcp: set start time
The dhcp command starts with an unitialized start time. The start
time is often long in the past which results in an immediate timeout
and resend of the dhcp packet. Fix this by initializing the start time
correctly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:28:56 +02:00
Sascha Hauer 47f8cf2d08 remove dlmalloc.src
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:28:36 +02:00
Sascha Hauer b2c48771cb edit: Add proper screen size handling
We used to have a quite slow algorithm to detect the screen size
which was unused for long time. This patch changes this to first
set the cursor to x=999, y=999 and the read back the actual cursor
position. Since I am not confident that this works on all terminals
this is only used when edit is called as 'sedit'.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:24:47 +02:00
Sascha Hauer c3822d7aaf defaultenv: remove now unnecessary hush-hack
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:55 +02:00
Sascha Hauer e21a340e39 hush: allow to run interactive shell in do_sh
This allows to call 'sh' in scripts without arguments in which
case an interactive shell will be started.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:55 +02:00
Sascha Hauer f034ed2044 hush: Fix globbing
hush has a long standing and anoying glob bug. hush expands wildcards
during parsing of the script or command stream. When the command stream
begins to execute the wildcards are already expanded which leads to:

mkdir /tmp
cd /tmp
mkdir foo; ls *
ls: *: No such file or directory

To fix this expand wildcards right before executing the command. Since
'for' loops are not executed in commands, we have to keep the old behaviour
in here so that 'for i in *' still works.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:55 +02: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 f4762eb5e7 hush: pass GLOB_NOCHECK to glob
By doing so glob will not return GLOB_NOMATCH anymore but instead
just does what fake_glob would do.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:55 +02:00
Sascha Hauer 87681170f5 hush: simplify globhack
hush used to escape '*' '[' '?' during parsing because the quotes
got removed in the first parsing loop.

globhack is used to remove these escapes again for glob. Since we now
keep the quotes until the end of parsing and we no longer escape glob
wildcards, we do no longer have to remove any quotes. With this globhack
can be much simpler.

While at it, change the prototype to match the one from glob() and rename
the function to fake_glob, because that's what it is: it just copies the
input string into the output struct without actually globbing.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:54 +02:00
Sascha Hauer 1aad6d033a hush: remove quotes at end of processing
hush removes the quotes from strings too early. This leads to some bugs.
When hush executes

echo "hello sascha"

it correctly results in:

argv[0] = "echo"
argv[1] = "hello sascha"

However, the following behaves incorrect:

a="hello sascha"
echo "$a"

results in:

argv[0] = "echo"
argv[1] = "hello"
argv[2] = "sascha"

This is because hush removes the quotes and inserts variable values in a
single loop, so

echo "$a"

becomes:

echo hello sascha

after the loop.

Instead, keep the quotes until all variables are inserted and remove them
at the end.

This also fixes that echo \" resulted in \" instead of ".

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:54 +02:00
Sascha Hauer 37e77d3cfe hush: run_pipe_real: bail out early to safe an indention level
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:54 +02:00
Sascha Hauer 162e2a820d hush: run_pipe_real must have num_progs == 1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:54 +02:00
Sascha Hauer 86c031783f hush: remove bogus 'else'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:08:54 +02:00
Sascha Hauer 3996c942f2 hush: cleanup coding style
General coding style cleanup

- add some blank lines
- add whitespaces on on both sides of operators

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:06:46 +02:00
Sascha Hauer b1c5b646b3 hush: safe an indention level by continueing a loop
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:06:43 +02:00
Sascha Hauer 8c3cc9621f hush: safe indention level by continueing a loop
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-30 13:04:49 +02:00
Antony Pavlov 36893bf29a MIPS: start.S: clean up whitespaces
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-26 08:56:09 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9ccc05d2be menu: fix menu alloc init
The auto_select is supposed to be set to -1.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-25 18:37:43 +08:00
Jean-Christophe PLAGNIOL-VILLARD eb7667b681 menu: fix support for "\n", "\n\r" and "\r"
If "\n\r" or "\r\n" is ignore one.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-25 18:37:41 +08:00
Jean-Christophe PLAGNIOL-VILLARD 76c9becdc2 menu: fix non command management support
the auto select is always available

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-25 18:37:40 +08:00
Jean-Christophe PLAGNIOL-VILLARD 38f9300444 menu: fix double action when "\n\r" or "\r\n" is received
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-25 18:37:34 +08:00
Jean-Christophe PLAGNIOL-VILLARD 66e657476c usb: fix driver name
use the usb_driver name

otherwise we will have a NULL driver entry in devinfo

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-25 18:37:20 +08:00
Marc Kleine-Budde 78312fa0c5 common: memory: fix off-by-one in tlsf_create
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 15:19:29 +02:00
Jean-Christophe PLAGNIOL-VILLARD 60e03c64b0 tny-a926x: fix MOB-TNY-MD2 Motherboard support
The MD2 add:
 - uart 2
 - ethernet
 - usb
 - spi
 - i2c

so fix just add uart and ethernet

update defconfig
always enable the motherboard and drop the SHA256 support (to fix in the
256KiB).

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-24 18:27:32 +08:00
Jean-Christophe PLAGNIOL-VILLARD f44268517f at91: at91_register_uart use number instead of IDs
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-04-24 18:27:30 +08: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 2893952c28 devinfo: use accessor function for parameters
Instead of directly accessing the struct member of struct param_d
use the provided getter function.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 11:18:32 +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 80b5293bca ARM mxs: Add cpu_is_mx* macros for drivers shared with i.MX
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 11:13:07 +02:00
Sascha Hauer ba361ee78f Merge branch 'pu/mx6-v2' into next
Conflicts:
	arch/arm/Makefile
	arch/arm/mach-imx/Kconfig

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:38:23 +02:00
Sascha Hauer fd9c7d412e ARM Freescale i.MX6 Armadillo2: Add defconfig
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:51 +02:00
Sascha Hauer 79b7b546b9 ARM: initial Freescale i.MX6q Armadillo2 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:48 +02:00
Sascha Hauer 7753263c50 net mii: Add mii_open/mii_close functions
Some phys need board specific fixups. To be able to do this
from board code add mii_open/mii_close functions so that the
board can use the regular mii_read/mii_write functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 6f20c7bc70 mmc i.MX esdhc: Add i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 86cfd96af4 net fec: Add i.MX6 support
Currently only 100Mb/s is tested. Freescale's U-Boot suggests that
there are some additional adjustments necessary for Gigabit support.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer e0c18c0866 serial i.MX: i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:47 +02:00
Sascha Hauer 2e7db33d4b ARM: add initial i.MX6 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 10:31:44 +02:00