A fixed partition means that we can't remove it. This is only suitable
for our vital /dev/self0 and /dev/env0 partitions, so remove the fixed
flag.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The current caching layer only has a single buffer for
writing and reading. The FAT driver often accesses the
fat and then data again, which currently can't be cached.
Reimplement this with a list of cached chunks. The number
of chunks and their sizes are currently hardcoded, but
that could be easily made configurable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The environment isn't loaded until this command is
is selected - even if compiled in.
This patch makes the dependency explicit.
Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Now that we don't need malloc for the console anymore it's
safe to call printf anytime, so switch the initcall debugging
to regular debug() statements..
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Currently we just hang when an initcall fails. This resulted
in most initcalls just returning 0 unconditionally. Instead
of hanging which usually leaves the user without a clue what
happened just continue and hope for the best.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This changes the dynamically allocated kfifos to statically initialized
ones. This makes the console work without malloc and thus safe to be
called before malloc is initialized.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this allow to check we do not exceed the size of the SRAM as example
introduce BAREBOX_MAX_BARE_INIT_SIZE the maximum size of bare_init
this will allow your bare_init will fit in SRAM as example
ARCH can overwrite it via ARCH_BAREBOX_MAX_BARE_INIT_SIZE
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
needed to use menu framework
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will allow to always call poller_call even durring timeout
and still the case in getc
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
enable it only if a compression is enabled
support gzip, bzip2 and lzo
you will be able to choose which compression to use
-rw-r--r-- 1 root root 8436 Dec 15 01:35 barebox_default_env
-rw-r--r-- 1 root root 2782 Dec 15 01:35 barebox_default_env.bz2
-rw-r--r-- 1 root root 2691 Dec 15 01:38 barebox_default_env.gz
-rw-r--r-- 1 root root 3262 Dec 15 01:38 barebox_default_env.lzo
with using gzip and the default env we can save 5.6KiB (5,745 bytes)
with using bzip2 and the default env we can save 5.5KiB (5,654 bytes)
with using lzo and the default env we can save 5.1KiB (5,174 bytes)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
TLSF: Two Level Segregated Fit memory allocator implementation.
Written by Matthew Conte (matt@baisoku.org).
Public Domain, no restrictions.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Provide a new API for accessing uImages which makes it easy
for commands to open images, verify them, load to (free) sdram
regions and show information about uImages.
- We now do not load the image to malloced space anymore.
- The data in the header is now stored in cpu native endianess
after uimage_open which makes it easy to access the header data.
- uImage can be loaded to dynamically allocated sdram regions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Currently we have of_get_fixed_tree() which assumes that
there is a global variable holding a oftree. This seems
not very flexible, so for now introduce a of_fix_tree()
which takes an fdt_header as argument and walks the
list of registered of fixup functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
DOS partitions are the only partitions we handle at the moment
and without it most MMC/SD enabled configs are useless, so make
it default yes. Also, use 'depends on' instead of 'if'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Juergen Beisert <jbe@pengutronix.de>
We do not have any command line parser support for bootm anymore.
Disable it for now to at least be able to compile it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Since fprintf and console_puts now return the number of
character written the prototypes have changes. We forgot
to fix console_simple which now fails to compile with:
common/console_simple.c:48:6: error: conflicting types for 'fprintf'
include/stdio.h:57:5: note: previous declaration of 'fprintf' was here
common/console_simple.c:67:6: error: conflicting types for 'console_puts'
include/stdio.h:20:5: note: previous declaration of 'console_puts' was here
Fix this by returning the proper numbers of characters written.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Some console are transient, like the USB connected serial
console which should be removed when the USB connection is
severed.
Enable console removal for such devices.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Several filetypes can be autodetected. Barebox could make use
of this in several ways:
- Add a command to detect filetypes
- detect arm zImages and uImages to unify the different boot commands
- maybe detect UBI or JFFS2 images to construct parts of the kernel
command line
- select correct uncompression function based on filetype
This patch adds basic support to detect filetypes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The rests of U-Boots iminfo command are sitting in commands/bootm.c and
are in a nonusable state. Factor it out to its own file and make it work
again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This covers disk like media like SD card, CF cards, regular hard disks and also
USB mass storage devices. Most common used partition table is still of DOS type.
This implementation is prepared to support more partition types in the future.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The puts functions now properly return the number of characters
written. With this we can also fix fprintf.
Also, remove never reached return in fputs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Thanks to a common memory handling barebox knows the sdram banks
and sizes, so we can add a common fixup functions for the nodes
in the devicetree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds basic device tree command support. So far we can
parse a flat device tree (-p), which also stores the tree
in memory, dump it (-d) and free (-f) the internally stored tree.
The chosen node can be updated with barebox bootargs, no other
device tree manipulation is implemented yet.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
rename it to digest_file_window
introduce digest_file to digest a file and digest_file_by_name
where we specify the algo by name
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
as in barebox the data could be the mapped file or a allocated memory with
just the data (non header)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
On arm we have the concept of memory banks which can
be registered and iterated over. This is useful for
other architectures aswell, so add some generic infrastructure
for this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add Kconfig option LOCALVERSION so you can set a customizable suffix
to the barebox version string.
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
If a timeout is specified and expired the command will be executed
by default boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add a helper function for boards to register their memory
devices. This makes the board code smaller and also helps
getting rid of map_base and struct memory_platform_data.
And switch all of the memory to it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
add missing EXPORT_SYMBOL for nan static function
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
add missing EXPORT_SYMBOL for nan static function
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch fixes loadb and loady commands. tstc() should return true if
console_input_buffer is not empty.
Signed-off-by: Alexey Galakhov <agalakhov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Handle value == NULL similiar to how value == '' is currently handled.
hush's builtin_getopt() seems to trigger this for OPTARG.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Normally the default path to save the environment is /dev/env0. However,
we can't map a file in a fat filesystem to /dev/env0. So if we want to
store the environment in a file in fat we have to make it configurable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For some environments the dummy malloc functions offer a very small
alternative implementation. malloc will get its memory from sbrk()
and never frees memory again.
This of course is not suitable for interactive environments and thus
depends on CONFIG_SHELL_NONE
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Some scenarios like initial bootloaders do not need interactive shell
support, so make this optional. Without a shell a board must provide
its own run_shell function.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Environment variables are only useful in interactive environments.
Make it optional on our way to support a noninteractive barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This adds a simple block layer to barebox. Reading and writing
to block devices can be painfully slow without caching, so
add a simple caching layer here.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
In a noninteractive environment barebox will be compiled without
command support. So move version_string to a seperate file which
is compiled unconditionally.
Also, display the banner when the simple console support is used.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
if CONFIG_DEFAULT_ENVIRONMENT_PATH="" then
$(DEFAULT_ENVIRONMENT_PATH) expands to 'defaultenv "" '
The "" would cause every single file found in $(srctree) to be included in
$(ENV_FILES). This would then cause scripts/mod/sumversions.c to get
recompiled using $(CC) and fail compilation if $(CC) points to a newlib
cross compiler
Signed-off-by: Jon Ringle <jon@ringle.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
The menu entry to set the default baudrate (CONFIG_BAUDRATE) makes no sense,
as long as its content is not used. This patch makes barebox using the setting
again.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ensures subsequent init functions to export environment variables during
init without having to rely on linking order being correct.
Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Barebox does not have interrupt functionality. Nevertheless it's
sometimes useful to periodically call functions, like for example
a heartbeat LED or watchdog reset. Instead of cluttering the code
with calls to these functions this patch adds a generic polling
infrastructure. Code which might run for longer now can call
poller_call() periodically which in turn will call all registered
pollers.
This patch adds a call to poller_call in two generic pathes. First
of them is getc() which covers waiting for uart input. Second is
ctrlc() which should be called anyway from code which might run
for longer. So instead adding poller_call directly to your code,
consider checking ctrlc instead which also gives additional
convenience to the user.
The poller code is safe against reentrancy which means that it's
safe to call poller_call inside a poller.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
commands/loadb.c doesn't build with CONFIG_CONSOLE_SIMPLE, because it uses
fprintf / for_each_console (which uses console_list).
Fix it by adding trivial implementations of both in console_simple.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Silence these warnings:
common/kallsyms.c:8: Warning: documented function `const u8 kallsyms_names' was not declared or defined.
common/kallsyms.c:10: Warning: documented function `const u8 kallsyms_token_table' was not declared or defined.
common/kallsyms.c:11: Warning: documented function `const u16 kallsyms_token_index' was not declared or defined.
common/kallsyms.c:13: Warning: documented function `const unsigned long kallsyms_markers' was not declared or defined.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The function names do not make it clear what return value
is expected and do not save a single line of code. Put
the code inline and unbreak the wrong checks introduced
with a3c1e5d888.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Eric Bénard <eric@eukrea.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
use getopt to simplify it and prepare for xmodem support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will we usefull to enable functionnality if used
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Positional parameters are not nice, so implement a getopt
function. This has to be done as a builtin because otherwise
we have no access to the parents argc/argv.
getopt works as expected, here is a little example:
while getopt "hs:" OPT
do
if [ $OPT = h ]; then
echo "usage"
exit 1
else
echo "scr: opt: $OPT optarg: $OPTARG"
fi
done
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fix memory leak in globbing part of hush. a simple '['
on the command line was enough to trigger it.
We must call globfree() before setting the glob structure
to zero.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
before we duplicate it between command/bootm.c and scripts/mkimage.c
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
before we duplicate it between common/bootm.c and scripts/mkimage.c
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The __initdata define was present before Jean-Christophe
added it as fake value for Linux compatibility. Rename
the previous define to a different name to avoid
clashes
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will allow you to create a box style entry
via C API by specifying the type as
struct menu_entry me = {
.display "test",
.type = MENU_ENTRY_BOX,
.box_state = 1,
.action = action_to_run,
}
and via shell
menu -e -a -m <menu> -c <command> [-R] [-b 0|1] -d <description>
menu -e -a -m <menu> -u submenu -d [-b 0|1] <description>
-b with 0 for not selected and 1 for selected
and -c for the command to run when changing state
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will allow to automaticaly run an entry if the user do no choice
this is usefull for boot menu as example
with menu -s -m boot -A 3 -d "Auto Boot in"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
Clients now only have to call menu_add_submenu or menu_add_command_entry
instead of allocating many strings.
This also fixes some problems in the menu code. The priv field in struct
menu_entry was a pointer to struct menu or a pointer to an allocated string.
It was never freed, only had to be freed when it was an allocated string.
The reference to a submenu is now kept as a string and not to the menu
itself. The code checked the existence of the submenu when creating it, but
crashed when the submenu was removed and referenced afterwards. Now the
code hapily allows references to nonexistant menus but complains during
runtime when the menu is not there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Introduce a menu framework that allow us to create list menu to simplify
barebox and make it more user-frendly
This kind of menu is very usefull when you do not have a keyboard or a
serial console attached to your board to allow you to interract with
barebox
For the develloper part,
The framework introduce two API
1) C
that allow you to create menu, submenu, entry and complex menu action
2) Command
that allow you as the C API to create menu, submenu, entry and complex
menu action but this time the actions will be store in a function and
then be evaluated and excecuted at runtime.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
v2: Do not exit from all scripts but only the current one
This fixes the case:
barebox:/ cat /test
if [ 0 = 0 ]; then
exit 1
fi
barebox:/ /test
barebox:/ echo $?
0
barebox:/
Also, remove code to not allow exit from main shell. The for(;;) loop
in common/startup.c will bring us back anyway.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The correct config variable is CONFIG_MODULES, so tweak any references
to the incorrect CONFIG_MODULE.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Memory allocation is very simple in u-boot-v2. So, it makes also sense to
add the "operating system" emulation layer into the main memory management
source file, to keep them at one place and simple.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Don't try to be smarter than GCC. There are various better optimizations
available than to write our own. So, use the globaly available string
functions instead.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
When assert() is always defined to do nothing, the debug functions makes no
sense, because they also do nothing. Removing them shrinks the code.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Use a function prototype style as used in all other u-boot-v2 sources, too.
Also remove C++ support. We do not use C++ in this project.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
This feature is provided, to support more than u-boot-v2. But its more
confusing than helpful. Remove it and do it straight forward like all other
sources in this tree, too.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Include the board config first to be able to configure the memory management
in the documented way. If not used, the defaults are used.
On the other hand, there is no need to pollute the other source files with
these local management settings. So, move them from the header into the
C source file.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
There is no need to init variables with 0. So, move them to the bss and let
the C runtime does this job for us.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Any wrong or unknown command will result into the output:
Unknown command '<some text>' - try 'help'
If the command 'help' is disabled, this will end up in:
Unknown command 'help' - try 'help'
which is for blondes. Suppress the "try 'help'" for the case the 'help'
command is disabled.
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
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>
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>
This allows us to return COMMAND_ERROR_USAGE for
a failed command which will then print the usage,
a very common case for commands.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
instead of throwing all output away when the console
is not initialized, buffer it in a kfifo and print
it later when the first console gets initialized.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We use FIFOs on some devices, so flush them before exiting so
we do not get funny characters in the output.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Some devices, especially the ones doing DMA should be disabled before
giving control to an OS. We take the simple approach here: Just shutdown
the devices in the reverse order they were activated.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When waiting for the user to confirm the new baudrate, wait
for '\n' and '\r' instead of only '\r'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Issue:
Compiling on Ubuntu 8.10 Fails:
inlined from 'envfs_save' at scripts/../common/environment.c:135:
/usr/include/bits/fcntl2.h:51: error: call to '_open_missing_mod'
declared with attribute error: open with O_CREAT in second argument
needs 3 arguments
Usage: open(filename, O_WRONLY | O_CREAT)
Fix:
When using open with O_CREAT, it requires
mode to be defined.
Signed-off-by: Nishanth Menon <nm@ti.com>
This patch removes adding of an additional \ when doing
echo "\""
which gives \" instead of just "
I checked in latest busybox hush and this code is still present there,
but it behaves correctly in busybox due to some other code pathes I
didn't investigate.
If this change has any unwanted side effects feel free to flame on me
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add an own device id for partitions. This is necessary to allow
the partition layer to check if the given device is really a partition.
Also, check for readonly flag in erase.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add a simple console layer which is not able to handle multiple
consoles for those who don't need it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[Patch 07/17] U-Boot-V2:Common Make partitions configurable
Not all configurations of Uboot require partitions. This patch modifies partition compilation as configurable param
Signed-off-by: Nishanth Menon<x0nishan@ti.com>
[Patch 02/17] U-Boot-V2: Handle case of clock rollover for get_time_ns
get_time_ns does a simplistic delta = cycle_now - cycle_last. It is possible that the h/w counter reached max and reset back to 0.
This patch addresses this issue by checking for rollover condition.
NOTE 1: This does not guarentee that you cannot confuse get_time_ns. You could possibly wait for two reset cycles and then get a messed up value.
To fix that we may need interrupt mode timer tick - something on the lines of jiffies on linux.
NOTE 2: the question of cs->mask is not clear. if the mask is for the tick, then it is better done with (cycle_now & cs->mask) - (cs->cycle_last & cs->mask).
Signed-off-by: Nishanth Menon<x0nishan@ti.com>
Memory layout can now be specified via kconfig options. Two
possibilities exist: default layout means the layout is stack
/ malloc heap / U-Boot. The user can also specify fixed addresses
for each TEXT_BASE / stack / malloc heap.
as we rather use positive logic. Make it dependent on boards that
have it rather than on ARM
Signed-off-by: Nishanth Menon <x0nishan@ti.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For practical reasons I changed all string literals assumed to be constant
to reside in .rodata subsection at end of .text section.
Signed-off-by: Carsten Schlote <schlote@vahanus.net>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Fixed a bug in sbrk(). When the new mem_brk value returned by
sbrk_no_zero() returns NULL to indicate 'out of memory', sbrk()
still memset()s innocent memory at address NULL.
For some architectures this memory might be empty, so this never
causes a problem. Anyway on Coldfire I still have my vector table
there. Nuking them isn't really a good idea :-)
Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
Fixed the handling of data similiar as found in cramfs.
This fixes the problem with an unreadable defaultenv on big-endian
targets.
The endian macors are now loaded from /asm/common.h by default.
Signed-off-by: Carsten Schlote <c.schlote@konzeptpark.de>
This patch adds a __SANDBOX__ define to identify compiling for the
sandbox.
When building for sandbox, don't use sync() workaround.
Fixes this error for sandbox on PPC:
CC common/memsize.o
common/memsize.c:30:38: error: asm/io.h: No such file or directory
common/memsize.c: In function 'get_ram_size':
common/memsize.c:51: warning: implicit declaration of function 'sync'
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Add a symbol to the "Debugging" menu which enables the debug symbols in
u-boot-v2. This makes it possible to view the source code with
'objdump'.
Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
This patch improves the default environment handling, now the makesystem
bails out if the default environment path is empty or points to an
invalid directory (with activated default environment). It also fixes
this error:
find: invalid predicate `'
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>