2018-05-08 |
blspec: add checking of optional key machine-id
...
For filtering of Bootloader Spec entries, Bootloader Spec
specify an optional key machine-id. By set the
global.boot.machine-id variable the checking of machine-id
key in Bootloader Spec entries will be activate. If the
variable and key match, appropriate boot entry will be
booting. If it not match boot entry will be ignore and
barebox check the next boot entry.
Signed-off-by: Andreas Schmidt <mail@schmidt-andreas.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Andreas Schmidt
authored
on 2 May 2018
Sascha Hauer
committed
on 8 May 2018
|
2018-01-22 |
blspec: fix crash when trying to boot from loop mounts
...
When trying to boot from a loop mount path, the blspec code passes a
NULL pointer to dev_name, because cdev->dev is not set for loop mounts:
unable to handle NULL pointer dereference at address 0x00000020
pc : [<4fe09e28>] lr : [<4fe02305>]
sp : 4ffef7c0 ip : 31b75c78 fp : 31b6a388
r10: 31b6a368 r9 : 315a4cac r8 : 00000001
r7 : 00000001 r6 : 311b8540 r5 : ffffffea r4 : 31b6a3f8
r3 : 00000000 r2 : 10000000 r1 : 00000001 r0 : 00000000
Flags: nzcv IRQs off FIQs off Mode SVC_32
[<4fe09e28>] (dev_id+0xc/0x38) from [<4fe02305>] (blspec_scan_directory+0x3e1/0x484)
[<4fe02305>] (blspec_scan_directory+0x3e1/0x484) from [<4fe02551>] (blspec_bootentry_provider+0x1d/0x3c)
[<4fe02551>] (blspec_bootentry_provider+0x1d/0x3c) from [<4fe0984b>] (bootentry_create_from_name+0x23/0xdc)
[<4fe0984b>] (bootentry_create_from_name+0x23/0xdc) from [<4fe246f9>] (do_boot+0x95/0x160)
[<4fe246f9>] (do_boot+0x95/0x160) from [<4fe032e9>] (execute_command+0x21/0x48)
[<4fe032e9>] (execute_command+0x21/0x48) from [<4fe088e3>] (run_list_real+0x56b/0x634)
[<4fe088e3>] (run_list_real+0x56b/0x634) from [<4fe08249>] (parse_stream_outer+0xd9/0x164)
[<4fe08249>] (parse_stream_outer+0xd9/0x164) from [<4fe08b6d>] (run_shell+0x31/0x60)
[<4fe08b6d>] (run_shell+0x31/0x60) from [<4fe032e9>] (execute_command+0x21/0x48)
[<4fe032e9>] (execute_command+0x21/0x48) from [<4fe088e3>] (run_list_real+0x56b/0x634)
[<4fe088e3>] (run_list_real+0x56b/0x634) from [<4fe085fd>] (run_list_real+0x285/0x634)
[<4fe444b9>] (unwind_backtrace+0x1/0x58) from [<4fe00b7d>] (panic+0x1d/0x34)
[<4fe00b7d>] (panic+0x1d/0x34) from [<4fe42a75>] (do_exception+0xd/0x10)
[<4fe42a75>] (do_exception+0xd/0x10) from [<4fe42ad5>] (do_data_abort+0x21/0x2c)
[<4fe42ad5>] (do_data_abort+0x21/0x2c) from [<4fe42394>] (do_abort_6+0x48/0x54)
Fix this by checking cdev->dev as well as cdev before calling dev_name.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Philipp Zabel
authored
on 18 Jan 2018
Sascha Hauer
committed
on 22 Jan 2018
|
2017-07-11 |
blspec: skip all devicetree tests if entry doesn't specify one
...
If the blspec entry does not specify a devicetree to test against,
it doesn't make any sense to check the compatible of the machine or
find the root node.
Instead of first testing the barebox devicetree check if the entry
specifies one.
Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Steffen Trumtrar
authored
on 10 Jul 2017
Lucas Stach
committed
on 11 Jul 2017
|
2017-04-06 |
blspec: register as bootentry provider
...
Instead of using a global function called by
bootentry_create_from_name(), register blspec as bootentry
provider.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 6 Apr 2017
|
2016-10-10 |
Merge branch 'for-next/misc'
Sascha Hauer
committed
on 10 Oct 2016
|
2016-09-28 |
blspec: fix typo
...
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ulrich Ölmann
authored
on 27 Sep 2016
Sascha Hauer
committed
on 28 Sep 2016
|
blspec: fix return value of entry_is_of_compatible()
...
The function returns a boolean and not an integer. Hence the former
explicit/implicit cast of an ERR_PTR to a boolean has led to a return value of
true although a bootspec entry with a faulty devicetree is not compatible.
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ulrich Ölmann
authored
on 27 Sep 2016
Sascha Hauer
committed
on 28 Sep 2016
|
2016-09-27 |
blspec: fix erroneus free in entry_is_of_compatible()
...
Whenever of_unflatten_dtb() encountered an error it already released the memory
before returning the error code. Make this apparent by setting the pointer to
NULL to avoid an erroneus free.
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Ulrich Ölmann
authored
on 27 Sep 2016
Sascha Hauer
committed
on 27 Sep 2016
|
2016-09-22 |
convert users to %pI4
...
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>
Sascha Hauer
committed
on 22 Sep 2016
|
2016-07-26 |
blspec: Turn message back to debug level
...
Normally one should not be interested that the blspec code scans
a directory. In case blspec is not actively used it might even be
confusing, so lower priority of the message in blspec_scan_directory()
to pr_debug.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jul 2016
|
blspec: Make blspec_boot static
...
Since blspec_boot is now only used locally we can make it static. Move
it up to avoid a static declaration.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jul 2016
|
blspec: separate bootentries from blspec entries
...
This completes the separation of the blspec code from the boot
code. With this the boot code only handles generic boot entries
of type struct bootentry which are embedded into the type
(blspec/bootscript) specific structs.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jul 2016
|
bootentries: Add title/description
...
We currently have to special case blspec entries vs. boot scripts
in the common boot code since we want to print different informations
about them. This adds a 'title' and 'description' which can be filled
in with different information by bootscripts and blspec entries and
so we get rid of the special handling.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jul 2016
|
blspec: factor out a struct bootentry
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jul 2016
|
blpec: rename struct lspec -> bootentries
...
The code in common/boot.c collects the different boot entries in
lists of type struct blspec, eventhough many of them may not be
bootloader spec entries but for example boot scripts. This is the first
step of separating the data structures from boot entries and bootloader
spec: As struct blspec is merely a container for collecting boot entries
We simply rename struct blspec to struct bootentries. No functional change.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jul 2016
|
include: Move bulk of boot.h to bootm.h
...
The majority of the stuff currently in include/boot.h is about bootm
code implemented common/bootm.c. To be more consistent move it to a
new file include/bootm.h.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jul 2016
|
2016-07-22 |
blspec: Remove once/default handling
...
This is widely unused and in the way of subsequent cleanups. If you are
indeed using it please complain on the list, we'll find a solution to
add it back in a different way.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 22 Jul 2016
|
blspec: remove unused blspec_boot_devicename
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 22 Jul 2016
|
2016-05-09 |
Merge branch 'for-next/include-cleanup'
Sascha Hauer
committed
on 9 May 2016
|
2016-05-04 |
blspec: push appendroot handling to bootm
...
The bootm code now can handle the adding of the root= option itself,
so drop the code and let bootm do it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 4 May 2016
|
2016-04-15 |
string: Fix (v)asprintf prototypes
...
Our asprintf and vasprintf have different prototypes than the glibc
functions. This causes trouble when we want to share barebox code
with userspace code. Change the prototypes for (v)asprintf to match
the glibc prototypes. Since the current (v)asprintf are convenient
to use change the existing functions to b(v)asprintf.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 15 Apr 2016
|
2016-02-11 |
blspec: ignore lines beginning with '#'
...
According to the bootloader spec these should be treated as comments.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Feb 2016
|
blspec: Do not crash on config files without newline on last line
...
When the last line in a config file has no newline then 'next' is NULL
on the the loop iteration. Check that before derefencing 'next'.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Feb 2016
|
2015-09-23 |
introduce strerrorp
...
putting an error pointer into strerror can be a bit confusing since
strerror takes a positive error code but PTR_ERR returns a negative
number, so we have to do strerror(-PTR_ERR(errp)). Some places got
this wrong already, so introduce a strerrorp function which directly
takes an error pointer.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 Sep 2015
|
2015-07-06 |
Merge branch 'for-next/blspec'
Sascha Hauer
committed
on 6 Jul 2015
|
2015-07-03 |
Merge branch 'for-next/mtd'
...
Conflicts:
drivers/mtd/core.c
Sascha Hauer
committed
on 3 Jul 2015
|
2015-06-26 |
blspec: Use device_detect_by_name
...
device_detect_by_name will automatically separate by colons now,
we no longer have to do this in the blspec code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Jun 2015
|
2015-06-18 |
blspec: Automatically append rootarg
...
This patch makes it possible to automatically add a suitable root= option
for booting Linux from the same filesystem on which the bootspec entry
has been found. This adds an additional 'linux-appendroot' option to
bootspec which if set to 'true' will cause barebox to automatically
add a root= option. This currently works for NFS, UBIFS and regular
block devices like ATA, SD/MMC using the root=PARTUUID= mechanism.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 18 Jun 2015
|
2015-06-17 |
blspec: Automatically attach UBI devices
...
When blspec_scan_cdev finds an UBI device then attach it. This
allows us to boot blspec entries found on the UBIFS images inside
UBI volumes by pointing to the corresponding mtd partition.
With this we can do 'boot nand0.root' or even 'boot=nand0' on the
commandline.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 17 Jun 2015
|
2015-02-10 |
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>
Sascha Hauer
committed
on 10 Feb 2015
|