9
0
Fork 0
Commit Graph

16 Commits

Author SHA1 Message Date
Sascha Hauer a51d06d679 of: remove unused libfdt
Now that we are completely independent of libfdt remove the unused
code.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:29 +01:00
Sascha Hauer 973e58e3ab ARM bootm: Switch initrd support to unflattened tree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:29 +01:00
Sascha Hauer 9d8e08353c of: fixup unflattened devicetree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:29 +01:00
Sascha Hauer 64c199dd29 of: Pass barebox internal format devicetree to of_get_fixed_tree
With this every devicetree is first converted to the barebox internal
format before it's converted back to dtb again.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:28 +01:00
Sascha Hauer 004cce1347 of: make flatten independent of libfdt
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-06 11:41:28 +01:00
Sascha Hauer 831d83e922 Merge branch 'for-next/highbank' 2013-03-04 09:21:37 +01:00
Jean-Christophe PLAGNIOL-VILLARD 6ae2455e80 of: add do_fixup_by_compatible with u32 and string version
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-03-03 14:08:44 +01:00
Vicente Bergas afab6ac783 DeviceTree: add support for initrd in the DT
Add the initrd start and end address to the DT, code comes from u-boot.

Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-12 09:04:27 +01:00
Sascha Hauer e118761c5f oftree command: refactor
This has several improvements for the oftree command:

- loading a devicetree (-l) and actually probing (-p) it now is separated
- the command now can dump the internal devicetree or a dtb given on the
  command line.
- The -f option now actually frees the internal devicetree

With this the usage pattern for this command is:

oftree -l /env/oftree

oftree -d -n /sound

oftree -d /env/oftree

oftree -f

oftree -p

oftree -l -p /env/oftree

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-19 11:48:17 +01:00
Sascha Hauer 4979d8e9d5 of: remove unused barebox_fdt
barebox_fdt should once become the pointer to the barebox internal
devicetree. Since barebox has its own internal devicetree format
this was never used. remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-19 11:48:17 +01:00
Sascha Hauer f30b191e36 of: make of_get_fixed_tree more universally usable
Currently the bootm code uses of_fix_tree to apply the fixups
to the devicetree given on the command line. This function assumes
that there is enough space for the fixups available. Also on ARM
we have to make sure the tree does not cross 1Mib boundaries.

This patch moves the space allocation and alignment ensurance
to of_get_fixed_tree and uses it in bootm. This is the first
step for making of_get_fixed_tree the single point of devicetree
handling in barebox.
of_get_fixed_tree now takes an argument of the input fdt. If it is
given, this one is used, otherwise an internal oftree is used which
will be created in subsequent patches.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-11 14:08:30 +01:00
Sascha Hauer 58f3457f4f of: add devicetree probing support
This adds code to probe devices from a devicetree. Most helper
functions are directly imported from Linux.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-14 11:47:42 +02:00
Sascha Hauer 1bb01712a7 of: Fix usage of 0 as NULL pointer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-06-30 22:34:55 +02:00
Sascha Hauer ee4cab9e58 booting: more flexible Linux bootargs generation
We currently use the environment variable 'bootargs' to get the
Linux bootargs. This patch allows for a more flexible bootargs
generation using global variables. With it the Linux bootargs
are concatenated from multiple variables. This allows to replace
parts of the bootargs string without having to reconstruct it
completely.
With this bootargs can be constructed like:

global linux.bootargs.base="console=ttyS0,115200"
global linux.bootargs.ip="ip=dhcp"
global linux.mtdparts="physmap-flash.0:512K(nor0.barebox),-(root)"

This will then automatically be combined into a kernel bootargs
string during boot.

If the 'linux.bootargs.' variables are all empty the old standard
'bootargs' way will be used.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-14 09:16:31 +02:00
Sascha Hauer 56442bb101 oftree: add of_fix_tree()
Currently we have of_get_fixed_tree() which assumes that
there is a global variable holding a oftree. This seems
not very flexible, so for now introduce a of_fix_tree()
which takes an fdt_header as argument and walks the
list of registered of fixup functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-12-15 10:18:14 +01:00
Sascha Hauer c0f9d1bad2 initial oftree command support
This adds basic device tree command support. So far we can
parse a flat device tree (-p), which also stores the tree
in memory, dump it (-d) and free (-f) the internally stored tree.

The chosen node can be updated with barebox bootargs, no other
device tree manipulation is implemented yet.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-10-19 10:09:48 +02:00