memtest fails when a reserved sdram region is at the bank start at
address 0. This patch supports the exclusion of memory region at
the bank start.
Tested on P2020RDB and DA923RC, qemuarm versatilepb.
Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We can compile barebox for multiple boards at once, but currently
they all share a single default environment. This patch adds a
defaultenv_append() which boards can call to customize the default
environment during runtime. Each board now generate default environment
snippets using bbenv-y and add them during runtime with defaultenv_append()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The readf command is useful to read the content of a file into
a shell variable. It should be used for ascii content and thus
stops reading at all nonprintable characters including newline.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We obtained a USB Product ID from Openmoko for barebox running
in DFU mode. Use it as default for the dfu command. Now we can
make the USB VID/PID arguments optional.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Check the return value of usb_dfu_register and bail out
with an error if it fails. Also return successfully if it succeeds
instead of returning 1 unconditionally.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Similar to mount(8) the barebox command mount now supports passing a string
to the file system driver via -o.
This is used in the next commit to let the user specify port numbers for
nfs mounts.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
default_environment_path only exists when CONFIG_ENV_HANDLING is enabled.
Boards would have to #ifdef this if they wanted to use
default_environment_path. Use accessor functions instead which can
be ifdeffed on a single place.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Don't return after freeing stored devicetree if also loading ist wanted.
Allow "oftree -f -l my.dtb"
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The GbE support based on the patch for generic 'mii-tool', see
http://ftp.debian.org/debian/pool/main/n/net-tools/net-tools_1.60-24.2.diff.gz
We need to note Jean-Christophe PLAGNIOL-VILLARD for his
initial GbE support patch:
http://lists.infradead.org/pipermail/barebox/2013-February/012634.html
Generic 'mii-tool' GbE support patch has some disadvantages:
1. 1000baseT-HD is prefered to 1000baseT-FD;
2. show GbE-features for 10/100 only phys (e.g. Level One LXT971).
This patch fixes this disadvantages.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
miitool without arguments will try to show status for all phys.
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With the -s option all mii buses can be scanned for devices so
that they are available without doing network operations. Also,
now *all* phy devices on a mii bus can be examined, not only
the one attached to an ethernet device.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch adds the crc32 command to be build
as host and optionally as target tool.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
boot -l crashes with CONFIG_MENU disabled because blspec_alloc returns
with blspec->menu being NULL in this case. So guard the usage of
blspec->menu accordingly.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
"%d" in format string requires a signed integer.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
A lot of files rely on include/driver.h including include/of.h (and
this including include/errno.h. include the files explicitly so we can
eventually get rid of including of.h from driver.h
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With this we can do 'boot <name>' where name is one of:
- a filename under /env/boot/
- a full path to a boot script
- a device name
- a partition name under /dev/
- a full path to a directory which
- contains boot scripts, or
- contains a loader/entries/ directory containing bootspec entries
Multiple names can be given, they are tried in order. So any mixture
between bootspec entries and bootscripts can be given. bootspec entries
can now also be given as a path to a directory containing bootspec entries.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The 'boot -m' command executes the /env/boot/* scripts in order to
determine the title of a boot menu entry. This is not complete and
depends on changes in the environment, so remove it for now.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The Bootloader Specification describes a way how kernels can
be installed on devices and how they can be started by the bootloader.
The bootloader spec is currently supported by (x86) gummiboot and
by systemd which provides a kernel-install script. With the bootloader
spec it's possible for the Operating system to install a new kernel
without knowing about the bootloader and for the bootloader it's possible
to discover and start Operating Systems on a media without being
configured.
For more details about the spec see:
http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/
This patch adds barebox support for the spec. It enhances the 'boot'
command so that not only boot script names can be given, but also
devices containing bootloader spec entries. With this it's possible
to call the 'boot' command like: 'boot sd emmc net'. It would then
first look for bootloader spec entries on the (removable) sd card,
then, is nothing is found, on the internal emmc and if still
unsuccessful would call the 'net' bootscript.
The bootloader Spec currently doesn't specify which entry should be
default if multiple entries are found on a single device. Therefore
barebox currently has two extensions of the spec. The $BOOT diretory
can contain a file named 'default'. If present, the content of the
file is treated as a filename under $BOOT/loader/entries/ which is
used as default. Similarly if a file named 'once' is present, the
entry is started once and the file is removed afterwards. This is
useful for testing if a newly installed kernel works before making
it the default.
As on ARM and other Architectures a devicetree has to be specified
for the kernel, the 'devicetree' property is used to specify a
devicetree. Like 'kernel' and 'initrd' this also contains a pth
relative to $BOOT.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With this a mount <devname> will mount the device to /mnt/<devname>. This
directory is created automatically if it doesn't exist already.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This replaces the 'boot' script in the defaultenv-2 with a command
with the same behaviour. A command gives more flexibility for future
externsions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
It's useful to know which filesystems a barebox binary supports.
Add a -v option to the mount command to find it out.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When printing the devices on which a path is mounted the backingstore is
the interesting thing, not dev_name.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>