mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 05/14] ARM: bootm: Use kernel handler to start barebox image
Date: Fri, 22 Jan 2016 08:32:23 +0100	[thread overview]
Message-ID: <1453447952-30818-6-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1453447952-30818-1-git-send-email-s.hauer@pengutronix.de>

barebox can be called with the kernel calling convention, so
we can reuse the handler instead of creating a barebox specific
handler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/lib/bootm.c | 30 +-----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 0855907..010b668 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -355,37 +355,9 @@ static struct image_handler zimage_handler = {
 	.filetype = filetype_arm_zimage,
 };
 
-static int do_bootm_barebox(struct image_data *data)
-{
-	void *barebox;
-
-	barebox = read_file(data->os_file, NULL);
-	if (!barebox)
-		return -EINVAL;
-
-	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");
-	}
-
-	start_linux(barebox, 0, 0, 0, data->oftree);
-
-	restart_machine();
-}
-
 static struct image_handler barebox_handler = {
 	.name = "ARM barebox",
-	.bootm = do_bootm_barebox,
+	.bootm = do_bootm_linux,
 	.filetype = filetype_arm_barebox,
 };
 
-- 
2.7.0.rc3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2016-01-22  7:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22  7:32 [PATCH v4] FIT support Sascha Hauer
2016-01-22  7:32 ` [PATCH 01/14] ARM: zImage: add missing free() in appended device tree code Sascha Hauer
2016-01-22  7:32 ` [PATCH 02/14] bootm: Do not call uimage_close twice Sascha Hauer
2016-01-22  7:32 ` [PATCH 03/14] bootm: introduce bootm_get_os_size Sascha Hauer
2016-01-22  7:32 ` [PATCH 04/14] bootm: use names instead of numbers for image parts Sascha Hauer
2016-01-22  7:32 ` Sascha Hauer [this message]
2016-01-22  7:32 ` [PATCH 06/14] bootm: Push dryrun to handlers Sascha Hauer
2016-01-22  7:32 ` [PATCH 07/14] bootm: move initrd code together Sascha Hauer
2016-01-22  7:32 ` [PATCH 08/14] bootm: move oftree " Sascha Hauer
2016-01-22  7:32 ` [PATCH 09/14] bootm: Initialize bootm_data defaults in single place Sascha Hauer
2016-01-22  7:32 ` [PATCH 10/14] crypto: add digest_alloc_by_algo() Sascha Hauer
2016-01-22  7:32 ` [PATCH 11/14] crypto: add RSA support Sascha Hauer
2016-01-22  7:32 ` [PATCH 12/14] bootm: make verifying/hashing configurable Sascha Hauer
2016-01-22  7:32 ` [PATCH 13/14] bootm: add initial FIT support Sascha Hauer
2016-01-22  7:32 ` [PATCH 14/14] bootm: Add option to force booting signed images Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453447952-30818-6-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox