This patch prooved to be useful while working with a colleague on a single
machine. It allows to switch the user without editing /env/config by
just issuing:
export user=me
. Note, in bash this construct (i.e. an if without body) bails out with:
Syntax error: "fi" unexpected
but in hush it seems to do the right thing.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Running i2c_read without the 'count' setting causes an error and reboots.
barebox@Phytec phyCORE-i.MX27:/ i2c_read -b 1 -a 0x4a -r 0x00
ERROR: out of memory
no stack data available
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The trap relocation function trap_reloc can be used across several PPC
platforms and is added to the ppc library. Accordingly, the definition
of trap_reloc is removed from mach-mpc5xxx/start.S
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Following the MMIO primitives fix, the definitions of __raw_* function
is sourced from Linux and added.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
cpu_read*() and cpu_wrire*() are precisely equal to __raw_read*() and
__raw_write*().
Striving for correctness we can replace all those __raw_*() with cpu_*()
as that's exactly what the former ones do.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
file_to_sdram is used to load an initrd. The resource size is
then used to pass the initrd size to Linux. This means that
the resource size must exactly match the initrd size. Currently
this is not the case since we request the sdram region in chunks
of 8 Kbytes. Fix this by adjusting the resource size when the file
is loaded.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
On a systax error we have to bail out of the shell instead of
setting inp->p to NULL and crash barebox with a NULL pointer
deref. This only happened in scripts.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This fixes the problem I had (i.e. a boot loop caused by a stray fi in
/env/bin/init).
Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
arch/ppc/Kconfig is reworked to make the configuration environment
architecture neutral. All MPC5200 configuration is moved to the
MPC5200 architecture specific configuration file. These modifications
are reflected in the PCM030 board support.
arch/ppc/Makefile compilation directives are updated in preparation
for the introduction of future cpus/machines.
lib/time.c is moved to the architecture specific directory and the
building instructions updated in the Make files. The file is
cleaned up of unused code.
The definition of L1_CACHE_... is updated and CACHELINE_SIZE is
defined in ppc/include/asm/cache.h for future use by the mpc85xx.
The file mach-mpc5xxx/pci_mpc5200.c and mach-mpc5xxx/start.S are
updated accordingly.
The declaration of search_exception_table is moved in
include/asm/common.h because it is used across architectures.
mach-mpc5xxx/traps.c is also updated to reflect this change.
The definition of exception in asm/ppc_asm.tmpl is updated for future
use by the mpc85xx. The file starts.S in mach-mpc5xxx is updated
accordingly.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
bootm_initrd tests for data->initrd, but this never becomes true because
the setting of data->initrd is inside a if(bootm_initrd()). Fix this. Also,
do not support the initrd options when initrd is disabled.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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
bootm_initrd tests for data->initrd, but this never becomes true because
the settingof data->initrd is inside a if(bootm_initrd()). Fix this. Also,
do not support the initrd options when initrd is disabled.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
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>
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>