mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/1] arm: bootm: zImage allow to use the concataned oftree
Date: Thu, 12 Apr 2012 12:03:55 +0200	[thread overview]
Message-ID: <20120412100355.GX3852@pengutronix.de> (raw)
In-Reply-To: <1334135588-26117-1-git-send-email-plagnioj@jcrosoft.com>

On Wed, Apr 11, 2012 at 11:13:08AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> This will allow to update it with fixup.
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

This looks like a followup to the previous patch, but it does not apply
neither with or without this patch.

Sascha

> ---
>  arch/arm/lib/bootm.c |   19 ++++++++++++-------
>  1 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
> index 813927a..213f136 100644
> --- a/arch/arm/lib/bootm.c
> +++ b/arch/arm/lib/bootm.c
> @@ -14,6 +14,7 @@
>  #include <sizes.h>
>  #include <libbb.h>
>  #include <magicvar.h>
> +#include <libfdt.h>
>  
>  #include <asm/byteorder.h>
>  #include <asm/setup.h>
> @@ -127,8 +128,6 @@ struct zimage_header {
>  static int do_bootz_linux_fdt(int fd, struct image_data *data)
>  {
>  	struct fdt_header __header, *header;
> -	struct resource *r = data->os_res;
> -	struct resource *of_res = data->os_res;
>  	void *oftree;
>  	int ret;
>  
> @@ -144,14 +143,12 @@ static int do_bootz_linux_fdt(int fd, struct image_data *data)
>  
>  	end = be32_to_cpu(header->totalsize);
>  
> -	of_res = request_sdram_region("oftree", r->start + r->size, end);
> -	if (!of_res) {
> -		perror("zImage: oftree request_sdram_region");
> +	oftree = malloc(end + 0x8000);
> +	if (!oftree) {
> +		perror("zImage: oftree malloc");
>  		return -ENOMEM;
>  	}
>  
> -	oftree = (void*)of_res->start;
> -
>  	memcpy(oftree, header, sizeof(*header));
>  
>  	end -= sizeof(*header);
> @@ -164,6 +161,14 @@ static int do_bootz_linux_fdt(int fd, struct image_data *data)
>  		return -EIO;
>  	}
>  
> +	fdt_open_into(oftree, oftree, end + 0x8000);
> +
> +	ret = of_fix_tree(oftree);
> +	if (ret)
> +		return ret;
> +
> +	data->oftree = oftree;
> +
>  	pr_info("zImage: concatenated oftree detected\n");
>  
>  	return 0;
> -- 
> 1.7.9.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2012-04-12 10:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  6:38 [PATCH v2] arm: fix zImage support when a oftree is concatenated Jean-Christophe PLAGNIOL-VILLARD
2012-04-11  8:12 ` Sascha Hauer
2012-04-11  8:20   ` Jean-Christophe PLAGNIOL-VILLARD
2012-04-11  9:13 ` [PATCH 1/1] arm: bootm: zImage allow to use the concataned oftree Jean-Christophe PLAGNIOL-VILLARD
2012-04-12 10:03   ` Sascha Hauer [this message]
2012-04-12 11:35     ` Jean-Christophe PLAGNIOL-VILLARD

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=20120412100355.GX3852@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /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