9
0
Fork 0
Commit Graph

2005 Commits

Author SHA1 Message Date
Sascha Hauer 444ee36545 state: backend circular: Fix wrong comment
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-27 11:47:29 +02:00
Sascha Hauer 9df009de99 state: bucket_circular: -EUCLEAN means data could be read
-EUCLEAN returned from state_mtd_peb_read() means that the
data shall still be used. This fixes initialization of buckets
which need cleanup

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-23 14:21:37 +01:00
Sascha Hauer 1fde9ef265 state: bucket_cached: Fix reading pages which need cleanup
When the raw device returns -EUCLEAN we have to return
successfully to the upper layer, otherwise it will discard the
data.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-23 14:21:33 +01:00
Jean-Christophe PLAGNIOL-VILLARD 27f3f993b8 fix: console: expose consoles in devfs
on 64bit ssize_t is not an int but a long

so use the protype for fops_write ssize_t

common/console.c: In function ‘console_register’:
common/console.c:373:22: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
  newcdev->fops.write = fops_write;

in commit b4f55fcf35
By Bastian Stender <bst@pengutronix.de>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-13 08:19:30 +01:00
Sascha Hauer 97d2da3d98 Merge branch 'for-next/video' 2017-03-13 08:16:53 +01:00
Sascha Hauer 6134116686 Merge branch 'for-next/mvebu' 2017-03-13 08:16:44 +01:00
Sascha Hauer e0093dcf23 Merge branch 'for-next/misc' 2017-03-13 08:16:44 +01:00
Marc Kleine-Budde e3dda8553e console_countdown: add possibility to abort countdown by external commands
This patch makes it possible to abort a console countdown by an external
command, for example when fastboot is used. This requires additional
modifications in the external commands, a call to "console_countdown_abort()"
has to be inserted.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-10 08:43:27 +01:00
Marc Kleine-Budde 3d92ea4738 console_countdown: width to of countdown to 4 digits
This patch increases the displayed width of the countdown to 4 digits,
otherwise waiting for more then 99 seconds doesn't look good.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-10 08:43:26 +01:00
Sascha Hauer dfcfb5b831 bbu: Search for cdev names aswell
In bbu_find_handler_by_device() search for cdev names aswell since some
update handlers are registered with their cdev name and not the full
path.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-10 08:28:10 +01:00
Jean-Christophe PLAGNIOL-VILLARD 637d6dfef2 efi: clocksoure: add EFI event timer
with this we can be hw generic

If the EFI implement timestamp protocol we could use instead of event
but even EDK2 Never Ever compile it for any target.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:16 +01:00
Jean-Christophe PLAGNIOL-VILLARD 8972eb7ff1 clocksource: move dummy clock source to init_clock
And registered it as soon as possible (at pure initcall).
So we not need to check the cs all the time.
As get_time_ns() is one of the most called function of barebox at runtime.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:15 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6bc48eabbf clocksource: allow to have multiple device from clock source
use the one with the most priority.

We can not select the clocksource at user level.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:15 +01:00
Jean-Christophe PLAGNIOL-VILLARD 92c1033036 efi: move x86 clocksource init at core initcall level
so we can use device/driver model

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:15 +01:00
Jean-Christophe PLAGNIOL-VILLARD 035842ff55 efi: move LoaderTimeInitUSec and LoaderDevicePartUUID to postcore initcall
so we can use device/driver for the timer

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:15 +01:00
Jean-Christophe PLAGNIOL-VILLARD 2f13691f1f efi: add efi handle dump command
so we can inspect easly what is supported by the EFI implementation we running on

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD a371ed0f3c efi-gui: add Timestamp Protocol GUID definition
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-03-09 07:36:14 +01:00
Uwe Kleine-König 0da84a9fe4 filetype: Add image type for boot images used on Armada 370 and XP 2017-03-02 14:03:43 +01:00
Bastian Stender b4f55fcf35 console: expose consoles in devfs
This enables displaying text on e.g. a framebuffer console by issueing

	echo -o /dev/fbconsole0 abc123

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-28 15:52:35 +01:00
Bastian Stender 1233570798 console: replace set_active by open/close
Opening and closing consoles should be independent from setting them
active. This way it is possible to open e.g. a framebuffer console and
display text on it without showing stdout/stderr.

Signed-off-by: Bastian Stender <bst@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-28 15:52:35 +01:00
Jean-Christophe PLAGNIOL-VILLARD 4c29a9511b efi: move x86 efi boot support to x86 arch
prepare to drop the efi arch as efi boot up is not arch sepecific

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-27 08:33:14 +01:00
Jean-Christophe PLAGNIOL-VILLARD c3931154de efi: move startup and payload to common/efi
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-02-24 08:21:33 +01:00
Sascha Hauer 30139163b7 Merge branch 'for-next/imx' 2017-02-13 09:26:04 +01:00
Michael Olbrich 39db674c45 output: use '[0m' to reset colors
'[m' is supposed to have the same effect as '[0m'. However, some EFI
implementations seem to ignore '[m', so use '[0m' everywhere to avoid
rendering issues.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-24 09:34:11 +01:00
Juergen Borleis ea55770308 ARM: i.MX: Add i.MX7 base architecture support
Signed-off-by Juergen Borleis <jbe@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-20 09:10:30 +01:00
Lucas Stach aef5d05100 barebox-imd: add dependency on generated/compile.h also for PBL version
Barebox-imd is also used in the PBL. As the object file names are different
for the PBL, the explicit dependency on generated/compile.h wasn't there.
This leads to random build failures in parallel builds, or worse the PBL
picking up the old compile.h defines from an earlier build.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-17 07:58:10 +01:00
Lucas Stach f606a0cde9 defaultenv: select COMMAND_SUPPORT and GLOBALVAR
To satisfy the direct dependencies of the selected commands.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-17 07:58:09 +01:00
Enrico Jorns e1e8656a7d bootm: fix magicvar name for global_bootm_verbose
Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-16 08:14:42 +01:00
Sascha Hauer e05529dd8b Merge branch 'for-next/misc' 2017-01-11 19:00:03 +01:00
Ulrich Ölmann 04cec8156a environment: fix typo
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-10 08:27:33 +01:00
Sascha Hauer c757c67642 menu: sanitize menu_add_title
passing a string to menu_add_title() which then gets free by this
function is just plain ugly. Pass it a const char * which gets
duplicated in menu_add_title() when necessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-10 08:27:33 +01:00
Sascha Hauer 30f85100b1 globalvar: Fix compiler warning
Fixes:
common/globalvar.c:393:7: warning: 'pname' may be used uninitialized in this function [-Wmaybe-uninitialized]

This is a false positive, pname cannot be uninitialized. Silence this
warning.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-10 08:27:33 +01:00
Sascha Hauer 8125f16642 globalvar: Make locally used function static
Fixes:

common/globalvar.c:382:5: warning: no previous prototype for 'globalvar_simple_set' [-Wmissing-prototypes]

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-10 08:27:33 +01:00
Jan Remmet 26cf000639 imx-bbu-nand-fcb: split up read_fcb
There are other ecc modes for the fcb out there.

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-10 08:27:23 +01:00
Lucas Stach cce74dff55 globalvar: select FNMATCH
This is needed since support for wildcards has been introduced.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2017-01-09 13:41:12 +01:00
Sascha Hauer 8eb1fb3519 Merge branch 'for-next/vybrid' 2016-11-14 12:37:20 +01:00
Sascha Hauer f55e379fca Merge branch 'for-next/state' 2016-11-14 12:35:52 +01:00
Sascha Hauer e5374fa4d4 Merge branch 'for-next/squashfs' 2016-11-14 12:35:50 +01:00
Sascha Hauer f772aa92c2 Merge branch 'for-next/misc' 2016-11-14 12:35:49 +01:00
Andrey Smirnov 3dc136ef87 i.MX: Add DEBUG_LL hooks for VF610
Add code to support DEBUG_LL functionality on VF610/Vybrid platform.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-11 08:57:25 +01:00
Stefan Lengfeld 2e93886c38 state: fix indentation
Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-03 07:20:13 +01:00
Stefan Lengfeld 88b67f8ee4 state: use packed attribute for on storage structs
These structs are used for on-storage data layouts. They should be not
affected by different integer precisions and alignment optimizations of
32bit or 64bit machines. Using the architecture independent integer data
types, like uint32_t, achieves the former, using the packed attribute
the later.

Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-03 07:19:13 +01:00
Stefan Lengfeld d0f1f07dfa state: fix state is not saved when string variable is changed
The dirty flag was not set properly.

Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-11-03 07:18:08 +01:00
Enrico Jorns 9bcbb51263 Add filetype and detection for squashfs images
This adds `filetype_squashfs` to the list of known filetypes and adds a
detection for squashfs files to file_detect_type(). This currently
matches on the `hsqs` start sequence of an image file.

Additionally, the newly introduced filetype is registered as the type of
the squashfs_driver which allows, for example, to mount squashfs without
the need to specify a type parameter.

This changes enable booting a squashfs with the simple `boot` command
pointing to the location (device) that holds the squashfs.

Note that booting with blspec is limited as the current squashfs driver
is not capable of handling symbolic links.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-24 08:14:41 +02:00
Sascha Hauer 28d5eb1bbc state: Use dev_* for information rather than pr_*
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-20 09:34:42 +02:00
Sascha Hauer 8099956f6a state: pass error code instead of inventing new one
Both of_find_path() and of_find_path_by_node() return a meaningful
error code, so forward it instead of inventing a new one. Do this
especially for the -EPROBE_DEFER case which currently does not work.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-20 09:31:07 +02:00
Sascha Hauer eca7871bce complete: Add completion for nv and globalvar commands
The 'nv' command is often used to create a nv variable
for an existing global variable, so add a command completion
function for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2016-10-18 22:45:32 +02:00
Sascha Hauer 179d4060e8 Merge branch 'for-next/state' 2016-10-10 08:31:08 +02:00
Sascha Hauer bfdb14c7da Merge branch 'for-next/misc' 2016-10-10 08:31:07 +02:00
Sascha Hauer db9c78d579 Merge branch 'for-next/defenv' 2016-10-10 08:31:06 +02:00