mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [for master PATCH 0/4] Bootm uImage initrd fix
@ 2012-08-13  6:54 Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57 ` [PATCH 1/4] arm/bootm: fix initrd_start init Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13 18:38 ` [for master PATCH 0/4] Bootm uImage initrd fix Sascha Hauer
  0 siblings, 2 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-13  6:54 UTC (permalink / raw)
  To: barebox

Hi,

please pull
The following changes since commit 58713d32746d49ad39ba17658fe82f1b98b80b2e:

  commands: memset: fix help message (2012-08-09 08:44:38 +0200)

are available in the git repository at:

  git://git.jcrosoft.org/barebox.git tags/bootm_fix

for you to fetch changes up to d9cefaed51917da5121443715cb9a14c237f9b9b:

  uimage_laod: fix ramdisk support (2012-08-13 14:48:16 +0800)

----------------------------------------------------------------
bootm: uImage initrd fix support

Fix multiple issues:
 - arm: loadaddr hardcode to 0x0 if valid
 - uncompress the ramdisk (U-Boot do not do so)
 - image_sdram_flush: wrong start address when expending the resource
 - bootm: load the initrd to ram where this is done at arch level

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (4):
      arm/bootm: fix initrd_start init
      bootm: do not load the initrd in the common code
      uimage_sdram_flush: fix resource start
      uimage_laod: fix ramdisk support

 arch/arm/lib/bootm.c |    4 +++-
 commands/bootm.c     |    8 --------
 common/uimage.c      |    6 ++++--
 3 files changed, 7 insertions(+), 11 deletions(-)

Best Regards,
J.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] arm/bootm: fix initrd_start init
  2012-08-13  6:54 [for master PATCH 0/4] Bootm uImage initrd fix Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-13  6:57 ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57   ` [PATCH 2/4] bootm: do not load the initrd in the common code Jean-Christophe PLAGNIOL-VILLARD
                     ` (2 more replies)
  2012-08-13 18:38 ` [for master PATCH 0/4] Bootm uImage initrd fix Sascha Hauer
  1 sibling, 3 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-13  6:57 UTC (permalink / raw)
  To: barebox

initrd_start need to be init to data->initrd_address and updated only if the
addr is invalid.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/lib/bootm.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a8840fe..c5b76ea 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -58,7 +58,9 @@ static int __do_bootm_linux(struct image_data *data, int swap)
 
 	kernel = data->os_res->start + data->os_entry;
 
-	if (data->initrd_file && data->initrd_address == UIMAGE_INVALID_ADDRESS) {
+	initrd_start = data->initrd_address;
+
+	if (data->initrd_file && initrd_start == UIMAGE_INVALID_ADDRESS) {
 		initrd_start = data->os_res->start + SZ_8M;
 
 		if (bootm_verbose(data)) {
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/4] bootm: do not load the initrd in the common code
  2012-08-13  6:57 ` [PATCH 1/4] arm/bootm: fix initrd_start init Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-13  6:57   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57   ` [PATCH 3/4] uimage_sdram_flush: fix resource start Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57   ` [PATCH 4/4] uimage_laod: fix ramdisk support Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-13  6:57 UTC (permalink / raw)
  To: barebox

This need to be handled by the arch bootm as the address can be invalid and
provided at arch level.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 commands/bootm.c |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/commands/bootm.c b/commands/bootm.c
index 3c47ab5..5f858e8 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -126,14 +126,6 @@ static int bootm_open_initrd_uimage(struct image_data *data)
 	if (data->initrd_address == UIMAGE_SOME_ADDRESS)
 		data->initrd_address = data->initrd->header.ih_load;
 
-	if (data->initrd_address != UIMAGE_INVALID_ADDRESS) {
-		data->initrd_res = uimage_load_to_sdram(data->initrd,
-				data->initrd_num,
-				data->initrd_address);
-		if (!data->initrd_res)
-			return -ENOMEM;
-	}
-
 	return 0;
 }
 
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 3/4] uimage_sdram_flush: fix resource start
  2012-08-13  6:57 ` [PATCH 1/4] arm/bootm: fix initrd_start init Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57   ` [PATCH 2/4] bootm: do not load the initrd in the common code Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-13  6:57   ` Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57   ` [PATCH 4/4] uimage_laod: fix ramdisk support Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-13  6:57 UTC (permalink / raw)
  To: barebox

The start is the start of the previous resource nor the size of it.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/uimage.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/uimage.c b/common/uimage.c
index 43878b5..735b64e 100644
--- a/common/uimage.c
+++ b/common/uimage.c
@@ -355,8 +355,9 @@ static struct resource *uimage_resource;
 static int uimage_sdram_flush(void *buf, unsigned int len)
 {
 	if (uimage_size + len > resource_size(uimage_resource)) {
-		resource_size_t start = resource_size(uimage_resource);
+		resource_size_t start = uimage_resource->start;
 		resource_size_t size = resource_size(uimage_resource) + len;
+
 		release_sdram_region(uimage_resource);
 
 		uimage_resource = request_sdram_region("uimage",
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 4/4] uimage_laod: fix ramdisk support
  2012-08-13  6:57 ` [PATCH 1/4] arm/bootm: fix initrd_start init Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57   ` [PATCH 2/4] bootm: do not load the initrd in the common code Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57   ` [PATCH 3/4] uimage_sdram_flush: fix resource start Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-13  6:57   ` Jean-Christophe PLAGNIOL-VILLARD
  2 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-08-13  6:57 UTC (permalink / raw)
  To: barebox

ramdisk U-Boot expect to ignore the compression type

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 common/uimage.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/uimage.c b/common/uimage.c
index 735b64e..442a7f0 100644
--- a/common/uimage.c
+++ b/common/uimage.c
@@ -334,7 +334,8 @@ int uimage_load(struct uimage_handle *handle, unsigned int image_no,
 	if (ret < 0)
 		return ret;
 
-	if (hdr->ih_comp == IH_COMP_NONE)
+	/* if ramdisk U-Boot expect to ignore the compression type */
+	if (hdr->ih_comp == IH_COMP_NONE || hdr->ih_type == IH_TYPE_RAMDISK)
 		uncompress_fn = uncompress_copy;
 	else
 		uncompress_fn = uncompress;
-- 
1.7.10.4


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [for master PATCH 0/4] Bootm uImage initrd fix
  2012-08-13  6:54 [for master PATCH 0/4] Bootm uImage initrd fix Jean-Christophe PLAGNIOL-VILLARD
  2012-08-13  6:57 ` [PATCH 1/4] arm/bootm: fix initrd_start init Jean-Christophe PLAGNIOL-VILLARD
@ 2012-08-13 18:38 ` Sascha Hauer
  1 sibling, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-08-13 18:38 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox

On Mon, Aug 13, 2012 at 08:54:48AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Hi,
> 
> please pull
> The following changes since commit 58713d32746d49ad39ba17658fe82f1b98b80b2e:
> 
>   commands: memset: fix help message (2012-08-09 08:44:38 +0200)
> 
> are available in the git repository at:
> 
>   git://git.jcrosoft.org/barebox.git tags/bootm_fix

Pulled, thanks

Sascha

> 
> for you to fetch changes up to d9cefaed51917da5121443715cb9a14c237f9b9b:
> 
>   uimage_laod: fix ramdisk support (2012-08-13 14:48:16 +0800)
> 
> ----------------------------------------------------------------
> bootm: uImage initrd fix support
> 
> Fix multiple issues:
>  - arm: loadaddr hardcode to 0x0 if valid
>  - uncompress the ramdisk (U-Boot do not do so)
>  - image_sdram_flush: wrong start address when expending the resource
>  - bootm: load the initrd to ram where this is done at arch level
> 
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> 
> ----------------------------------------------------------------
> Jean-Christophe PLAGNIOL-VILLARD (4):
>       arm/bootm: fix initrd_start init
>       bootm: do not load the initrd in the common code
>       uimage_sdram_flush: fix resource start
>       uimage_laod: fix ramdisk support
> 
>  arch/arm/lib/bootm.c |    4 +++-
>  commands/bootm.c     |    8 --------
>  common/uimage.c      |    6 ++++--
>  3 files changed, 7 insertions(+), 11 deletions(-)
> 
> Best Regards,
> J.
> 
> _______________________________________________
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-13 18:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-13  6:54 [for master PATCH 0/4] Bootm uImage initrd fix Jean-Christophe PLAGNIOL-VILLARD
2012-08-13  6:57 ` [PATCH 1/4] arm/bootm: fix initrd_start init Jean-Christophe PLAGNIOL-VILLARD
2012-08-13  6:57   ` [PATCH 2/4] bootm: do not load the initrd in the common code Jean-Christophe PLAGNIOL-VILLARD
2012-08-13  6:57   ` [PATCH 3/4] uimage_sdram_flush: fix resource start Jean-Christophe PLAGNIOL-VILLARD
2012-08-13  6:57   ` [PATCH 4/4] uimage_laod: fix ramdisk support Jean-Christophe PLAGNIOL-VILLARD
2012-08-13 18:38 ` [for master PATCH 0/4] Bootm uImage initrd fix Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox