Add support to configure the active framebuffer for the kernel through
device tree.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
If drivers want to fixup their specific instance they need some context
to know which instance they have to fixup.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add support for framebuffers with noncontiguous horizontal lines.
Video drivers can set this value if the hardware requires it.
In case a driver does not set it, the current value of
xres * (bpp / 8) is used instead.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
the cdev for a given directory can be determined by get_cdev_by_mountpath().
Use this function and remove the cdev argument from blspec_scan_directory().
Also, export the function to make code possible which boots the bootloader
spec entries found in directories.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
blspec->menu is only valid when menu support is enabled. Check for it
before dereferencing the pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Right now we do not support persistent names for mtd devices. The
base name can be passed to add_mtd_device, but this is always appended
with a dynamic number. With this patch add_mtd_device takes a device_id
argument which can be used to create a mtd device with an exact name.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
KSZ8031 is similar to KSZ8021. It can use the same functions.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Some controller such as the ARM AMBA pl181 can not handle more than 16bits
data length request.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The macro can be used for temporary stack buffers which need to meet
a minimum alignment requirement.
This will be used by bcm2835 mailbox users, where all buffers need to
be aligned.
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Instead of populating an extra list containing all phandles just iterate
over the whole tree. This is done as preparation for more dynamic devicetrees
where parts are loaded at runtime. Here we don't want to keep the list of
phandles in sync.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
was not include when applying bpkfs patch
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
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>
Often small files are used to store the value od a variable. This
adds a function to easily read such a variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This introduces some new environment variable helpers and updates
the existing ones. Newly introduced are:
getenv_bool: read a bool variable
getenv_ul: read an unsigned long variable
getenev_uint: read an unsigned int variable
getenv_nonempty: like normal getenv, but does return NULL instead of an
empty string
All new helpers take a pointer to the value. This value is only modified
when the variable exists. This allows the following programming scheme:
unsigned int myvalue = sanedefault;
getenv_uint("myvalue", &myvalue);
So without checking the return value myvalue contains the best possible
value.
getenv_ull is updated to this scheme.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
With this the verbosity of barebox can be controlled during runtime
using the 'loglevel' globalvar.
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>
All filesystem drivers which need a backingstore device do the same
ignoring of '/dev/' in the backingstore followed by a cdev_open. Add a
helper function for it and let the core handle the cdev. As a side
effect this makes sure that fsdev->cdev is also set when a device is
mounted without the leading '/dev/' which was previously ignored
by the mount code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The driver didn't work well with at24 driver. NACKS are lost.
Errors are lost in isr due to the local variable err. Also we didn't wait for
bus free in omap_i2c_xfer_msg.
Fix issues and get other improvements from linux kernel
Tested on OMAP4 and AM335x
Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will provide the image data and information via file
# ls -l /tmp/
-rwxrwxrwx 3 arch
-rwxrwxrwx 12 compression
-rwxrwxrwx 16 name
-rwxrwxrwx 5 os
-rwxrwxrwx 24 time
-rwxrwxrwx 12 type
-rwxrwxrwx 10 load_addr
-rwxrwxrwx 10 entry_point
-rwxrwxrwx 2199875 data0
-rwxrwxrwx 2199875 data
-rwxrwxrwx 10 data.crc
if it's multi image
# ls -l /tmp-multi/
-rwxrwxrwx 3 arch
-rwxrwxrwx 12 compression
-rwxrwxrwx 16 name
-rwxrwxrwx 5 os
-rwxrwxrwx 24 time
-rwxrwxrwx 16 type
-rwxrwxrwx 10 load_addr
-rwxrwxrwx 10 entry_point
-rwxrwxrwx 1292 data0
-rwxrwxrwx 983 data1
-rwxrwxrwx 2287 data
-rwxrwxrwx 10 data.crc
you can get the image header via an ioctl on any file
UIMAGEFS_METADATA
if you want to check the crc do
# crc32 -f /tmp-multi/data -V /tmp-multi/data.crc
CRC32 for /tmp-multi/data 0x00000000 ... 0x000008ee ==> 0x88d5a0db
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>