summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/imx'Sascha Hauer2017-02-131-0/+8
|\
| * ARM: i.MX: Add i.MX7 base architecture supportJuergen Borleis2017-01-201-0/+8
| | | | | | | | | | Signed-off-by Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | output: use '[0m' to reset colorsMichael Olbrich2017-01-241-1/+1
| | | | | | | | | | | | | | | | | | '[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>
* | barebox-imd: add dependency on generated/compile.h also for PBL versionLucas Stach2017-01-171-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | defaultenv: select COMMAND_SUPPORT and GLOBALVARLucas Stach2017-01-171-0/+2
| | | | | | | | | | | | | | 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>
* | bootm: fix magicvar name for global_bootm_verboseEnrico Jorns2017-01-161-1/+1
|/ | | | | Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2017-01-114-11/+9
|\
| * environment: fix typoUlrich Ölmann2017-01-101-1/+1
| | | | | | | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * menu: sanitize menu_add_titleSascha Hauer2017-01-102-8/+6
| | | | | | | | | | | | | | | | 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>
| * globalvar: Fix compiler warningSascha Hauer2017-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
| * globalvar: Make locally used function staticSascha Hauer2017-01-101-1/+1
| | | | | | | | | | | | | | | | 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>
* | imx-bbu-nand-fcb: split up read_fcbJan Remmet2017-01-101-36/+47
|/ | | | | | | 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>
* globalvar: select FNMATCHLucas Stach2017-01-091-0/+1
| | | | | | | 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>
* Merge branch 'for-next/vybrid'Sascha Hauer2016-11-141-1/+9
|\
| * i.MX: Add DEBUG_LL hooks for VF610Andrey Smirnov2016-11-111-1/+9
| | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/state'Sascha Hauer2016-11-145-12/+13
|\ \
| * | state: fix indentationStefan Lengfeld2016-11-031-3/+3
| | | | | | | | | | | | | | | Signed-off-by: Stefan Lengfeld <s.lengfeld@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | state: use packed attribute for on storage structsStefan Lengfeld2016-11-033-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | state: Use dev_* for information rather than pr_*Sascha Hauer2016-10-201-4/+4
| | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | state: pass error code instead of inventing new oneSascha Hauer2016-10-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'for-next/squashfs'Sascha Hauer2016-11-141-0/+4
|\ \ \
| * | | Add filetype and detection for squashfs imagesEnrico Jorns2016-10-241-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'for-next/misc'Sascha Hauer2016-11-141-0/+28
|\ \ \ | |_|/ |/| |
| * | complete: Add completion for nv and globalvar commandsSascha Hauer2016-10-181-0/+28
| |/ | | | | | | | | | | | | | | 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>
* / state: fix state is not saved when string variable is changedStefan Lengfeld2016-11-031-1/+1
|/ | | | | | | 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>
* Merge branch 'for-next/state'Sascha Hauer2016-10-104-32/+40
|\
| * state: consistently pass one type as private data to dev_add_param_*Sascha Hauer2016-09-201-14/+15
| | | | | | | | | | | | | | The different dev_add_param_* calls all use different types as private data. This is unnecessary, use struct state_variable * for all of them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: make locally used function staticSascha Hauer2016-09-202-2/+1
| | | | | | | | | | | | state_set_dirty() is only used in one file, make it static. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: Add state to state_variableSascha Hauer2016-09-202-6/+8
| | | | | | | | | | | | | | A state variable should know which state it belongs to. Add field for it to struct state_variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: fix finding the correct parent nodeMichael Olbrich2016-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | Looking for the parent node during fixup is broken. The path of the parent node is not correctly terminated ('0' vs '\0'). Also, the new state node should be added to the supplied device tree not the barebox device tree used by of_find_node_by_path(). Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: don't keep pointers to device tree nodesMichael Olbrich2016-09-202-8/+13
| | | | | | | | | | | | | | | | | | | | Caching pointers to device tree nodes or is not save. The barebox internal device tree may be changed by loading a new device tree or through fixup handlers. As a result, the node may be deleted and replaced with a new one. Keep a copy of the full path instead and resolve the node as needed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * state: copy backend of_path stringMichael Olbrich2016-09-202-2/+3
| | | | | | | | | | | | | | | | | | | | Caching pointers to device tree nodes or names is not safe. The barebox internal device tree may be changed by loading a new device tree or through fixup handlers. As a result, the string may be deleted. Use local copies of the full path instead. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2016-10-104-25/+45
|\ \
| * | completion: Fix completion for devices with a dot in the nameSascha Hauer2016-10-071-8/+8
| | | | | | | | | | | | | | | | | | | | | Devices can have a dot in the name, so do not expect the full device name before the first dot. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | Allow device parameters for devices with dots in nameSascha Hauer2016-10-071-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Devices can have a dot in the name, so we can't expect to find the full device name before the first dot. Currently parameters of devices with a dot in the name are inaccessible from the shell. Fix this by iterating over the possible device name / parameter name combinations to find a existing combination. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | blspec: fix typoUlrich Ölmann2016-09-281-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | environment: "wrong magic" gives the impression of an errorSam Ravnborg2016-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 15e7ff689cfda27eab10aacda5c26a1ba47979ec Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <srn@skov.dk> Date: Thu, 22 Sep 2016 06:54:42 +0200 Subject: [PATCH 1/1] environment: "wrong magic" give the impression of an error Introduce a more soft wording when the magic of the superblock does not match. Include a hint to the typical reason "(envfs never written?)" This prevents a "what is wrong?" moment when looking at the boot log. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | convert users to %pI4Sascha Hauer2016-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Convert users of ip_to_string() and print_IPaddr() to %pI4 and remove the now unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/defenv'Sascha Hauer2016-10-101-21/+15
|\ \ \
| * | | Make generic default environment type a use choiceSascha Hauer2016-10-101-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far it was hardcoded for each board if defenv-1 or defenv-2 is used. Make this a user choice so that a particular board no longer enforces a defenv type. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | | Merge branch 'for-next/bootchooser'Sascha Hauer2016-10-105-70/+1138
|\ \ \ \
| * | | | boot: add framework for redundant boot scenariosMarc Kleine-Budde2016-09-224-0/+942
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several use cases where a redundant Linux system is needed. The barebox bootchooser framework provides the building blocks to model different use cases without the need to start from the scratch over and over again. The bootchooser works on abstract boot targets, each with a set of properties and implements an algorithm which selects the highest priority target to boot. See the documentation contained in this patch for more information. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | globalvar: introduce globalvar_add_simple_bitmaskSascha Hauer2016-09-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the just introduced param_bitmask this adds the corresponding globalvar convenience function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | globalvar: Allow full variable name in globalvar_addSascha Hauer2016-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a convenience for users allow to pass the full name, including the leading "global.", to globalvar_add(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | nv: Allow full variable name in nvvar_addSascha Hauer2016-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a convenience for users allow to pass the full name, including the leading "nv.", to nvvar_add(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | globalvar: Also create globalvars from for nonvolatile device varsSascha Hauer2016-09-221-45/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nv variables beginning with "nv.dev.<devname>.<varname>" are directly mirrored to <devname>.<varname> and there is no globalvar for it. To make it a bit more consistent and to increase the visibility of the nonvolatile device variables create globalvars for them aswell. With this the propagation flow has changed from: nv.dev.<devname>.<varname> -> <devname>.<varname> to: nv.dev.<devname>.<varname> -> global.dev.<devname>.<varname> -> <devname>.<varname> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | nv: simplify nvvar_addSascha Hauer2016-09-221-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not need to have an extra code path when the variable already exists, instead setting an existing variable can be done in the variable creation code path aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | globalvar: Allow to remove multiple globalvars using wildcardsSascha Hauer2016-09-221-4/+6
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | globalvar: sync with nvvarsSascha Hauer2016-09-221-4/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the behaviour when a driver creates a globalvar using globalvar_add_simple_[string|int|bool|enum|ip]) *after* nvvars are initialized and this globalvar is overwritten with a nvvar. Currently this fix is not needed because all globalvars are registered before the nvvars are initialized. We have two different typed of globalvars. The first type, here referred to as qualified globalvars, has a backend variable storage (the ones created with globalvar_add_simple_[string|int|bool|enum|ip]), the other created with globalvar_add_simple only has a dynamically allocted string as backend. Normally during startup of barebox the qualified globalvars are registered and during load of nvvars are synced with the values from the nvvars. Everything works fine in this case. However, when during nvvar initialisation a globalvar for a nvvar does not exist, then it is registered as unqualified globalvar. When then later some driver wants to register a qualified globalvar for which a unqualified globalvar already exists, it will get a -EEXIST. This is not the expected behaviour. Instead, the current unqualified globalvar should be removed, recreated as qualified globalvar and then afterwards synced with the corresponding nvvar. This behaviour is fixed with this patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | | globalvar: Move static inline functions to common/Sascha Hauer2016-09-221-0/+67
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | These functions will get bigger in the next patch which disqualifies them as static inline functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>