9
0
Fork 0
Commit Graph

1646 Commits

Author SHA1 Message Date
Sascha Hauer 61fc21c197 environment: Do not remove base env directory
When removing empty directories do not remove the base
directory.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-19 22:15:18 +01:00
Hubert Feurstein f52cf03aad common/bootargs: add blkdevparts variables
The kernel command line option blkdevparts works like mtdparts, but for all
block devices. So it can be used for eMMC devices without the need of a
traditional partition table.

Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-17 08:46:36 +01:00
Andrey Panov 2464c7f7d7 ARM: Rockchip: Add DEBUG_LL based on mach-socfpga
Signed-off-by: Andrey Panov <rockford@yandex.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-13 07:21:56 +01:00
Lucas Stach b2e8ce4b76 imd: provide dummy imd_command_setenv
If CONFIG_CMD_IMD is not set there is no imd_command_setenv in the
barebox binary that can be linked to. Although the whole imd infrastructure
will be removed by the linker later in the build process as soon as it
figures out that nothing inside barebox is using it, we still have to
provide a dummy function to keep the build going.

Fixes:
In function `imd_command': undefined reference to `imd_command_setenv'

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-12 10:58:08 +01:00
Sascha Hauer 6f88d51efd blspec: put blspec bootargs into a .dyn bootargs variable
So that they get deleted later when something else is booted.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-02-10 09:55:43 +01:00
Sascha Hauer 7b0f932bcd Merge branch 'for-next/mxs' 2015-02-04 19:09:15 +01:00
Sascha Hauer ce961e3412 Merge branch 'for-next/misc' 2015-02-04 19:09:15 +01:00
Wadim Egorov f0f6a7477b Fix spelling: pathes -> paths
Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 10:02:56 +01:00
Sascha Hauer 7e22de9c3c pbl: Add support for memory_display
The PBL has console support now, so add memory_display support aswell
which can be a good debugging aid.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-28 08:18:44 +01:00
Lucas Stach 0914ad88d2 common: console_console: put functions under correct ifdef
So they aren't build when no console support is selected.

Fixes:
In function `console_get_by_dev': undefined reference to `console_list'

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-19 08:47:13 +01:00
Jean-Christophe PLAGNIOL-VILLARD a1a582f4e0 console: allow to specify the device id
so we can use dynamic number id with specific devname

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-13 08:48:59 +01:00
Sascha Hauer b396f38596 Merge branch 'for-next/netconsole' 2015-01-09 17:38:27 +01:00
Sascha Hauer 39c6c3480a Merge branch 'for-next/mxs' 2015-01-09 17:38:26 +01:00
Sascha Hauer ff6383c8e4 Merge branch 'for-next/misc' 2015-01-09 17:38:26 +01:00
Sascha Hauer cc843dadfd Merge branch 'for-next/efi' 2015-01-09 17:38:26 +01:00
Masahiro Yamada d8753571b2 sizes.h: move include/sizes.h to include/linux/sizes.h
This file originates in Linux.  Linux has it under include/linux/
directory since commit dccd2304cc90.
Let's move it to the same place as well in barebox.

This commit was generated by the following commands:

  find -name '*.[chS]' | xargs sed -i -e 's:<sizes.h>:<linux/sizes.h>:'
  git mv include/sizes.h include/linux/

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-08 14:00:26 +01:00
Sascha Hauer ab989e4588 console: Make sure xzalloc is only used when it's available
To make it possible to call the pr_* functions very early before
malloc is initialized test if malloc is available before using
it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-05 11:30:59 +01:00
Sascha Hauer 663b895e49 malloc: Add a function to detect if malloc pool is already initialized
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-05 11:30:59 +01:00
Sascha Hauer a9d7b3d00e Add PBL console support
This adds simple console support to the PBL which makes it
possible to print more complex messages in the PBL than just
strings or hex numbers. For now puts_ll is used to print the
messages, so it depends on CONFIG_DEBUG_LL which makes it
more a debugging option. However, this could be extended later
to get regular output from the PBL if desired.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-05 11:30:59 +01:00
Sascha Hauer ce5299b0bf printf: move panic() to common/misc.c
panic() is not really a printf like function, so move it to common/misc.c.
This is done because we want to have printf support in the PBL, but PBL
has it's own panic() implementation.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2015-01-05 11:30:58 +01:00
Sascha Hauer 2e1a6c9bce console: Add set_active callback
The netconsole needs to be able to deny activation when the network
has not been enabled. Add an optional callback to the console for
this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-17 15:08:04 +01:00
Antony Pavlov fbb3be3845 clock: incorporate dummy clocksource into core clock code
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-17 12:15:11 +01:00
Sascha Hauer 631be8e6cb blspec: print error when devicetree not found
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-16 14:29:23 +01:00
Lucas Stach 75889a2900 efi: mount efivarfs by default if enabled
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-09 09:59:10 +01:00
Lucas Stach da94ff1e37 efi: add function to determine type of device path
Thanks to the wonders of UEFI we have to walk down the
device path all the way until we arrive at the device
we got this path from...

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-12-09 09:59:09 +01:00
Sascha Hauer b01bc4c810 Merge branch 'for-next/randconfig-1' 2014-12-08 14:54:11 +01:00
Sascha Hauer 3eade89c75 Merge branch 'for-next/persistent-vars'
Conflicts:
	arch/arm/boards/efika-mx-smartbook/defaultenv-efikasb/config
2014-12-08 14:54:09 +01:00
Sascha Hauer c2b5a7015b Merge branch 'for-next/misc' 2014-12-08 14:53:59 +01:00
Sascha Hauer ffc25a1195 Kconfig: make BROKEN invisible
BROKEN is a developer option to keep things in the tree we know
are broken. Make this option invisible so that randconfig builds do
not enable it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-28 15:21:27 +01:00
Sascha Hauer c559baa9e9 ARM: Let MMU depend on !CPU_ARM946E
CPU_ARM946E is selected by boards, so letting it depend on !MMU
leads to broken dependencies. Let MMU depend on !CPU_ARM946E instead.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-28 15:21:26 +01:00
Lucas Stach 3127a942b7 blspec: depend on, not select flexible bootargs
Blspec is a consumer of the flexible bootargs mechanism, so it should
depend on it rather than select it.

Fixes:
warning: (BLSPEC && DEFAULT_ENVIRONMENT_GENERIC_NEW) selects FLEXIBLE_BOOTARGS
which has unmet direct dependencies (COMMAND_SUPPORT && CMD_GLOBAL)

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-26 19:21:09 +01:00
Lucas Stach ceac6c7e14 common: menu needs PROCESS_ESCAPE_SEQUENCE
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:10 +01:00
Lucas Stach 79f2b8a7c9 common: firmware: include libfile
Fixes
common/firmware.c:206:2: error: implicit declaration of function 'copy_file'
in a number of configuration where this file isn't pulled in through
other headers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-24 14:04:08 +01:00
Andrey Smirnov 84dc21e185 partitions/efi: Fix off-by-one error in 'last_lba'
LBAs are numbered starting from zero so the last LBA # would be equal
to total number of blocks minus one.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-11 15:02:23 +01:00
Lucas Stach 34828e0077 blspec: fix incompatible pointer type warning
The warning is correct in that we pass in size_t instead
of int. As we are not interested in the size of the
property at this point, just remove the assignment.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-07 08:00:29 +01:00
Sascha Hauer 7962e7a0b4 defaultenv-2: Make use of nonvolatile variables
This moves the variable assignments previously done in /env/config-board
to non volatile variables in /env/nv/. This makes the settings adjustable
by the user without editing a file.

Most of the changes are simple conversions which for many boards makes
/env/config-board unnecessary. Some boards had some logic to assign
global.boot.default based on the current bootsource. This has been
moved to /env/init/bootsource. An additional check is added to not
overwrite a nv.boot.default should it exist.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 12:23:12 +01:00
Sascha Hauer 32e879f0a3 globalvar: Add support for printing all global variables
This could previously only be done with 'devinfo global'. While
this is still possible this adds a more direct access via the
globalvar command. This variant also adds a '*' in front of
the variable if the corresponding non volatile variable exists.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 12:23:12 +01:00
Sascha Hauer 3249006a2f Add support for non volatile variables
This adds (back) support for non volatile variables. Non volatile
variables are variables which are stored in the environment over
reboot. They are used in the same way as the global variables, but
with a 'nv' command and device. The variables are stored under
/env/nv/, one variable per file. Adding a nv variable automatically
adds a global variable with the same name. Changing a nv variable
also changes the same global variable, but not the other way round.
This allows for example to configure the username as:

nv user=sha; saveenv

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 10:58:54 +01:00
Sascha Hauer 70e718baa1 environment: Only save changes to the defaultenv
Instead of storing the complete files with a 'saveenv' command
only store the files that have changes to the default environment.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 10:58:54 +01:00
Sascha Hauer eb3ef18c8c environment: refactor saveenv
Collect all files in a list first and iterate over the list
when creating the actual environment image. Makes the next
patches easier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-06 10:58:54 +01:00
Sascha Hauer f9ced5832c environment: remove unused variable
fd is unused, remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-05 17:10:54 +01:00
Sascha Hauer 4729b4ba09 environment: drop unnecessary casts
No Need to cast void pointers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-05 17:10:54 +01:00
Sascha Hauer 592d35a47c Merge branch 'for-next/xz' 2014-11-05 15:47:39 +01:00
Sascha Hauer 7b4cc54579 Merge branch 'for-next/tegra' 2014-11-05 15:47:39 +01:00
Zahari Doychev f95ce0fff0 common: fix mbr filetype detection
Sometimes mbr is erroneously recocognised as FAT partion. Due to this the mbr
partition parser is not being called and the partitions on the media are not
detected. This patch should  fix the problem. The checking is done as in the
linux kernel.

I have seen the problem using usb sticks. Although partitioning and formatting
them under linux. The file system type field in the mbr remains there which
causes the wrong detections as FAT32 type and not as mbr.

Signed-off-by: Zahari Doychev <zahari.doychev@linux.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-05 14:53:28 +01:00
Sascha Hauer ccb2816477 Add xz decompression support
This adds xz decompression support from the kernel. Both compressing
the barebox binary with xz and decompressing xz files on the commandline
is supported.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:18:55 +01:00
Lucas Stach f63a42a999 reset_source: add thermal reset
Some SoCs are able to detect if they got reset
in response to an overtemperature event.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-11-04 12:16:20 +01:00
Sascha Hauer 2f81d316d2 filetype: Add XZ filetype support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-24 07:51:14 +02:00
Sascha Hauer ade0583602 param: let dev_add_param return the newly created param
dev_add_param creates a new parameter so it makes more sense to
return it than to return an error code. Since the return value
is hardly ever checked this is only a small patch.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 16:33:34 +02:00
Antony Pavlov d096cafff7 clock.c: fix whitespaces
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-10-08 11:12:54 +02:00
Sascha Hauer fa93e4fb60 Merge branch 'for-next/resource-err-ptr' 2014-10-02 08:54:42 +02:00
Sascha Hauer d0064495d3 Merge branch 'for-next/firmware' 2014-10-02 08:54:41 +02:00
Sascha Hauer 930ce6e142 Introduce message logging support
This adds a buffer for log messages and a 'dmesg' command to
print the messages. The log buffer is implemented as log objects
rather than a string buffer. This makes it easy to implement
limiting the messages, cleaning the buffer and timestamping
the messages.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 15:33:22 +02:00
Sascha Hauer 6ae9a40c79 startup: Don't print multiple lines with pr_info
Print the banner with pr_info, but the empty lines before and after
it with printf. This makes the banner show up in the log show up
properly.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:44:16 +02:00
Sascha Hauer 8af0569b7b clock: make get_time_ns() safe to be called without clocksource
make it possible to call get_time_ns() before the clocksource
has been registered. Just return 0 in this case which is still
better than crashing the system.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:44:15 +02:00
Sascha Hauer 96cae61eba clock: Add a variable with the first timestamp after startup
For measuring the startup time it's useful to save the first
timestamp after the clocksource has been registered.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-30 10:44:15 +02:00
Sascha Hauer d5a82eb095 resource: Let request_ioport_region return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-16 08:32:10 +02:00
Sascha Hauer dde56d42ad resource: Let request_iomem_region return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-16 08:32:09 +02:00
Sascha Hauer 82ed205466 resource: Let __request_region return an error pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-16 08:32:09 +02:00
Juergen Beisert a6982e2e26 Add a Firmware programming framework
This framework handles a list of registered Firmware programming handlers
to unify a firmware programming interface by hiding the details how
to program a specific Firmware in its handler. This is created with FPGAs
in mind but should be usable for other devices aswell.
A user has two possibilities to load a firmware. A device file is create
under /dev/ which can be used to copy a firmware to. Additionally a
firmwareload command is introduced which can list the registered firmware
handlers and also to upload a firmware.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-09-09 10:30:25 +02:00
Sascha Hauer 7782c08047 Merge branch 'for-next/usb-gadget'
Conflicts:
	commands/Makefile
	common/Kconfig
	common/Makefile
	drivers/usb/gadget/dfu.c
2014-08-07 20:34:28 +02:00
Sascha Hauer 38c3b2455e Merge branch 'for-next/misc'
Conflicts:
	lib/Makefile
2014-08-07 13:13:31 +02:00
Sascha Hauer 5b7b7ee5d9 Merge branch 'for-next/metadata'
Conflicts:
	arch/arm/dts/Makefile
	common/Makefile
	lib/Makefile
2014-08-07 06:15:16 +02:00
Sascha Hauer 50d10b224e Merge branch 'for-next/env' 2014-08-07 06:14:58 +02:00
Sascha Hauer 8a11a59b37 Merge branch 'for-next/efi'
Conflicts:
	.gitignore
	Makefile
	drivers/serial/Makefile
2014-08-07 06:14:56 +02:00
Sascha Hauer 90118343e4 Merge branch 'for-next/console' 2014-08-07 06:14:18 +02:00
Sascha Hauer 97e81f2d78 Add support for metadata in barebox images
It's often useful to get some information about a barebox image
before starting or flashing it. This patch introduces barebox
Image MetaData (IMD). When enabled a barebox image will contain
a list of tags containing the desired information. We have tags
for:

- the barebox release (2014.07.0-00160-g035de50-dirty)
- the build timestamp (#741 Mon Jul 28 15:08:54 CEST 2014)
- the board model the image is intended for
- the device tree toplevel compatible property

Also there is an additional generic key-value store which stores
parameters for which no dedicated tag exists. In this patch it
is used for the memory size an image supports.

Since there is no fixed offset in a barebox image which can be
used for storing the information, the metadata is stored somewhere
in the image and found by iterating over the image. This works
for most image types, but obviously not for SoC images which are
encoded or encrypted in some way.

There is a 'imd' tool compiled from the same sources for barebox,
for the compile host and for the target, so the metadata information
is available whereever needed.

For device tree boards the model and of_compatible tags are automatically
generated.

Example output of the imd tool for a Phytec phyFLEX image:

build: #889 Wed Jul 30 16:08:54 CEST 2014
release: 2014.07.0-00167-g6b2070d-dirty
parameter: memsize=1024
of_compatible: phytec,imx6x-pbab01 phytec,imx6dl-pfla02 fsl,imx6dl
model: Phytec phyFLEX-i.MX6 Duallite Carrier-Board

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:52 +02:00
Sascha Hauer 3cfa4bc00c move file helper functions to separate file
We have our file helper functions in several places. Move them
all to lib/libfile.c.
With this we no longer have file helpers in fs/fs.c which contains
the core fs functions and no functions in lib/libbb.c which are
not from busybox.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-07 06:13:51 +02:00
Sascha Hauer ca22ccd7cd Revert "common: resource: print conflicts as warning"
On several i.MX boards we register SDRAM with the values
from the SDRAM controller and also with values from the
device tree. This now issues a warning each time the board
is started. Revert the commit for now.

A better solution might be to check if the same SDRAM region
already exists before trying to register it again.

This reverts commit c9e2e08edc.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-04 21:00:57 +02:00
Juergen Borleis 72ce27f8e0 envfs: change API to be able to forward special flags into the envfs superblock
In order to be able to mark an stored envfs image with special features
(intentional ignore for example), we now can feed forward these flags.
By forwarding a '0' for the flags nothing changes because the envfs superblock
was already allocated with xzalloc.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 08:24:00 +02:00
Juergen Borleis c4c7b16588 envfs: provide an intentional way to ignore an existing external environment
Add a simple flag to envfs to be able to mark an external environment as
"not to be used".
This change should not affect existing systems, because the current envfs
implementation ensures the 'flags' member in the envfs master block is always
zeroed.

Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-08-01 08:24:00 +02:00
Wadim Egorov 6414f69910 barebox: common: Add missing filetype description
Added missing filetype description for UBIFS.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-24 11:34:51 +02:00
Holger Schurig b3265685f7 sandbox: allow "make ARCH=sandbox allyesconfig"
Compiling the tree with allyesconfig is helpful because different
compilers (gcc, clang) or static checkers (e.g. clang's scan-build)
can then process and check more code.

This patch introduces two new configuration symbols that Kconfig files
can depend on. That way, code that is only working where a cache or DMA
implementation exists can be opted out.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:29:57 +02:00
Holger Schurig 3549cc582c sandbox: disable bareboxcrc32 in sandbox mode
It won't compile currently anyway.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 21:29:57 +02:00
Sascha Hauer 0bd652f62a Add release string
Currently we only have version_string which contains information
about the date the binary was compiled and by whom it has been
compiled. This adds a release_string which only contains the
plain release version.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:58 +02:00
Sascha Hauer 057a57448d Add function to parse a string in dfu format
The dfu command parses a string which contains a list of
devices and flags. This format is useful for other users
aswell, so add common helper functions to parse it and
let the dfu command use this format.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-22 08:11:08 +02:00
Sascha Hauer 5ec16bea1a Merge branch 'for-next/console' into for-next/usb-gadget 2014-07-22 08:07:10 +02:00
Sascha Hauer 4c05bb1445 Merge branch 'for-next/misc' into for-next/usb-gadget 2014-07-22 08:06:44 +02:00
Sascha Hauer 54889bff1e introduce verbose debug
During debugging it sometimes helps to me even more verbose. This
adds an additional debug level for this. Also we remove an already
existing pr_vdebug definition in the USB gadget u_serial driver.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-17 07:42:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD 9183a8c683 EFI: introduce efi_strguid to convert GUID to human readable names
use in devinfo Protocols

Tested today on qemu with all the GUID translated

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-16 10:46:19 +02:00
Sascha Hauer 1dff7e414d Add initial EFI architecture support
This adds support for running barebox in an EFI environment
on X86 PC hardware.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-16 10:46:18 +02:00
Sascha Hauer 66f1030e11 filetype: Add DOS EXE file detection support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-14 08:01:11 +02:00
Sascha Hauer 17d1f9288c Move efi.h to include/
With upcoming EFI payload support the efi.h file will diverge
from the kernel, so move it from include/linux/ to include/

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-14 08:01:11 +02:00
Sascha Hauer 2d9d230089 block: Add flush callback
Some block devices need an explicit callback for flushing written
blocks. Add this callback.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-14 08:01:11 +02:00
Sascha Hauer 9c4f107c35 console: Allow persistent device names
Add a devname field to struct console_device so that the device
name can be set by the driver. This makes it possible to have
persistent device names.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-11 09:58:36 +02:00
Sascha Hauer 241c6a017b console: Add puts callback to console devices
Some devices may have a much more efficient way to output strings
rather than single characters. Let console devices implement a
callback for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-11 08:15:40 +02:00
Wadim Egorov 50c081e093 barebox: common: added new filetypes
- Added omap CH image header recognition
  * filetype_ch_image
  * filetype_ch_image_be

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-09 14:11:23 +02:00
Sascha Hauer 7d9311aa84 dlmalloc: remove unused functions
remove unused function declarations and definitions:

- vallocc is #if 0 in source code
- pvalloc is defined but not used
- cfree is defined but not used
- malloc_usable_size is unused
- mallopt is not defined
- mallinfo is not defined

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-09 07:38:12 +02:00
Herve Codina 6ae5677190 hush: Fix error code returned value
Just returns error code instead of 0 or 1.

With this fix, $? is set to child exit code in all cases.
Without this fix, /child $PATH;echo $? displays 1 even if
child script calls exit with a specific non zero error code.

Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-09 07:38:12 +02:00
Sascha Hauer efa4d684d8 Merge branch 'for-next/misc'
Conflicts:
	arch/arm/boards/chumby_falconwing/falconwing.c
	arch/arm/boards/imx233-olinuxino/imx23-olinuxino.c
	arch/x86/mach-x86.dox
	scripts/setupmbr/setupmbr.c
2014-07-04 17:27:06 +02:00
Sascha Hauer ce1b0d4ae3 Merge branch 'for-next/doc' 2014-07-04 17:19:40 +02:00
Holger Schurig 477199c684 menutree: let it select GLOB and GLOB_SORT
The menutree doesn't select CONFIG_GLOB, but it depends on it. Without
it will just hang. So let it select it automatically. Also remove the
dependency of CONFIG_GLOB on CONFIG_HUSH, because glob() will run with
the simple shell as well.

Also let CONFIG_MENUTREE select on CONFIG_GLOB_SORT. While is not
strictly needed, many people use menu/00-foo menu/10-bar menu/20-barf
to sort their menu entries. So select it out of convenience.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-02 07:26:55 +02:00
Sascha Hauer 98360be0fe Documentation: remove doxygen documentation
The doxygen documentation is long outdated. Remove it. It will
be replaced with sphinx based documentation later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-26 10:09:52 +02:00
Alexander Aring c9e2e08edc common: resource: print conflicts as warning
Crazy things happen if there are resource conflicts and a device probe
runs dev_request_mem_region. The dev_request_mem_region returns a
start pointer which is zero. The probe function doesn't check on this
and probing the device on zero base address.

To debug this in debug log level there are many other outputs. This patch
replace the debug print to a warning printout. A conflict should
normally never happen. If there is a conflict it's much easier to see it
with this patch.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-24 08:07:45 +02:00
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Sascha Hauer 8f8a18906b fix format specifiers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-05 09:35:31 +02:00
Sascha Hauer 6331e58a2c Merge branch 'for-next/misc'
Conflicts:
	commands/devinfo.c
2014-06-04 21:03:36 +02:00
Holger Schurig 93ba05b5fd bootm: beautify output
* fix indentation of options in 'help bootm'
* add missing help for -m
* put some output into debug/verbose mode

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:07:12 +02:00
Holger Schurig bfd5d7f112 misc: upper-case some abbreviations
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:07:12 +02:00
Holger Schurig bd278ae4fd meminfo: purely cosmetical changes
Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-02 09:07:12 +02:00