summaryrefslogtreecommitdiffstats
path: root/arch/arm/lib/bootm.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-12-06 10:33:05 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-01-06 14:25:06 +0100
commit8e3ddc13eb8239177ed20f119e3a3d02518b941d (patch)
tree65662dffd9756fb4fe4a4245757c6567a1cbec58 /arch/arm/lib/bootm.c
parentcee2a60c56be41047a5640e5cbdce43de52c0ee4 (diff)
downloadbarebox-8e3ddc13eb8239177ed20f119e3a3d02518b941d.tar.gz
barebox-8e3ddc13eb8239177ed20f119e3a3d02518b941d.tar.xz
ARM: boot barebox with kernel calling convention
Start a 2nd stage barebox with the Linux Kernel calling convention. Right now barebox does not interpret ATAGs or devicetree passed to it, but it doesn't hurt to pass parameters so that future bareboxes can use them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib/bootm.c')
-rw-r--r--arch/arm/lib/bootm.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 599b09af9c..c0e4e15ea6 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -296,15 +296,28 @@ static struct image_handler zimage_handler = {
static int do_bootm_barebox(struct image_data *data)
{
- void (*barebox)(void);
+ void *barebox;
barebox = read_file(data->os_file, NULL);
if (!barebox)
return -EINVAL;
- shutdown_barebox();
+ if (IS_ENABLED(CONFIG_OFTREE) && data->of_root_node) {
+ data->oftree = of_get_fixed_tree(data->of_root_node);
+ fdt_add_reserve_map(data->oftree);
+ of_print_cmdline(data->of_root_node);
+ if (bootm_verbose(data) > 1)
+ of_print_nodes(data->of_root_node, 0);
+ }
+
+ if (bootm_verbose(data)) {
+ printf("\nStarting barebox at 0x%p", barebox);
+ if (data->oftree)
+ printf(", oftree at 0x%p", data->oftree);
+ printf("...\n");
+ }
- barebox();
+ start_linux(barebox, 0, 0, 0, data->oftree);
reset_cpu(0);
}