barebox_image_size was calculated wrong when PRE_IMAGE is defined.
In this case _text does not refer to the binary image start. We
have to use TEXT_BASE here.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Wait until the reset bit is actually cleared instead of some
arbitrary delay (which caused problems with a PHY which was in some
energy saving mode).
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
First check the status at least once, then do timeout checks. Minor
cleanups also.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
when compiling for a imx53 with i2c enabled i got the following error:
drivers/built-in.o: In function `i2c_imx_set_clk':
/home/ggebhardt/repos/ecuv6_bl/barebox/drivers/i2c/busses/i2c-imx.c:282:
undefined reference to `imx_get_i2cclk'
make[4]: *** [.tmp_barebox1] Error 1
make[3]: *** [CMakeFiles/bootloader] Error 2
make[2]: *** [CMakeFiles/bootloader.dir/all] Error 2
make[1]: *** [CMakeFiles/bootloader.dir/rule] Error 2
make: *** [bootloader] Error 2
I copied the following from the corresponding imx51 implementation.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When CONFIG_DEFAULT_ENVIRONMENT_GENERIC is set the Make system
will automatically compile in defaultenv/ into the environment. Some
boards explicitely add this path again in their defconfig which is
not needed. Remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
imx27_add_mmc0 really registered SDHC2. Fix this by adding a
imx27_add_mmc1 and use this in the pca100 board file. Also add
imx27_add_mmc2 helper for register SDHC3.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We are already setup voltages from capabilities register.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We used to automatically prepend the device name before the partition
name. So when we added a partition named 'barebox' to a device named
'nor0' the partition was named 'nor0.barebox'.
The Kernel can mount its rootfs based on the mtd name, for example with
root=mtd:root. If for example we have multiple mtd devices (nor and nand)
'root' is a bad name for the partition, it should better be 'nor0.root'
This patch adds an additional commandline switch to addpart to optionally
skip the automatic device name adding. This makes it possible to define
our mtd partitions like this:
nor_parts="512k(nor0.barebox)ro,128k(nor0.bareboxenv),2M(nor0.kernel),-(nor0.root)"
This way the barebox partition names stay the same, but we can now
pass the exact name to the kernel (root=mtd:nor0.root).
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We normally do not expect USB devices to be hotplugged. Instead of
rescanning each time the usb command is called, scan only once.
This makes the usb command safe for being called multiple times
without making already registered USB devices reinitialized. To
really scan multiple times a '-f' option is introduced.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
- forward the return value of chk_mounted to detect whether mount succeeded
- free resources on mount failure
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The behaviour of other shells suggest that with source or '.'
the path should be resolved using the PATH environment variable. Do
the same in barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
We used to simply answer with -ENOENT in open() when the
initial call to stat() failed. Instead, forward the error from
stat().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch adds an automount command which makes it possible
to execute a script when a certain directory is first accessed.
It's the commands responsibility to make this directory available
(bringing devices up and mounting it). This results in automount
support which makes sure that from the shell every file can
be accessed without having to care for device bringup. Bringing
up devices may be expensive (USB, dhcp). The automount support
makes it easy for the environment to bringup devices when they
are actually needed.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
every struct fs_device_d contains a struct mtab_entry, so they
have a 1:1 relationship. Instead of having to use container_of
to get from a struct mtab_entry to a struct fs_device_d we can
better embed the members of struct mtab_entry into struct fs_device_d
directly.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
get_fs_device_by_path returns a struct device_d instead of what the
name suggests a struct fs_device_d. Also it returns the rootpath
of the corresponding fs_device. This patch changes the name of
this function to get_fs_device_and_root_path to better reflect what
the function does and changes the return type to struct fs_device_d.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Remove GPIO2.6 setup from lowlevel_init. It can be defined in board
initialization code if it necessary.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
barebox will use DHCP and pass the result to the kernel
update the help
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
use rootpath as nfsroot and bootfile as kernelimage if present
when ip mode is dhcp
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
To reduce the size of the MLO we have to activate thumb-2 support.
Otherwise the board will not boot.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add a OMAP4 specific GMPC nand config for pcm049 and phyCARD-A-XL2 to increase
performance. Also add the possiblility to pass a board GPMC nand config.
Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
drop kernelimage_type bootm now boots all of them.
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add support for KS8851 16bit MLL chip from Micrel Inc.
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Support for omap4 based Phytec phyCARD-A-XL2 board
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
When programming or erasing a page, don't wait
systematically for 3s, but finish the operation as soon as
the hardware has finished, and timeout if 3 seconds have
passed.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
For net boot setups it is useful to submit boot params like server or
bootfile over dhcp. To distinguish barebox from e.g. pxe machines,
a custom vendor id can be sent in dhcp discover/request messages.
E.g. the ISC dhcp server can be configured with
| if substring(option vendor-class-identifier,0,8) = "barebox:" {
| next-server 192.168.3.24;
| server-name "192.168.3.24";
| option tftp-server-name "192.168.3.24";
| option root-path = concat("/srv/sysroots/by-mac/",
| binary-to-ascii (16, 8, "-", substring (hardware, 1, 6)));
| }
to sent boot params which are valid for barebox hosts only.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Jean-Christophe PLAGNIOL-VILLARD:
- update the use dhcp command option
- support to set the vendor via env dhcp_vendor_id
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
- use tslf
- bootm: enable oftree and uimage support
- enable mmu support
- drop cfi support (no nor on the board)
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
update fancy prompt to be the same as the other Atmel board
use the same feature on 9g10ek and 9261ek
- use tlsf
- enable MMU
- set max size to 256KiB
- bootm: add initrd support
- nand: drop non used hw ecc and oob device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- set max size to 256KiB
- enable MMU
- bootm: enable oftree and initrd support
- nand: drop non used hw ecc
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>