Skip to contentSkip to conversation

AM335x NAND boot on next

DISCUSSION Teresa Remmet 2 participants 4 messages Dec 17, 2018 – Dec 18, 2018

lore
Share & tools
lore
#0 lore raw

Hello Sascha,

I watend to test the gpmc driver changes for our am335x boards using latest next. I noticed that booting from nand is not working correct any more. The MLO can not correctly obtain the image size of the barebox image.

barebox 2018.11.0-00199-g5a1a5ed2537d #1549 Mon Dec 17 10:46:01 CET 2018

Board: Phytec phyCORE AM335x
nand: ONFI flash detected
nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron MT29F4G08ABADAH4), 512Mi
B, page size: 2048, OOB size: 64
booting from NAND
failed to get image size
trying to load image from backup partition.
failed to get image size
booting failed

bisected this down to:
5a1a5ed2537d7d12f851f3778707681d6c08d6e8 is the first bad commit commit 5a1a5ed2537d7d12f851f3778707681d6c08d6e8
Author: Sascha Hauer <[email protected]>
Date:   Tue Oct 9 15:28:12 2018 +0200

    ARM: images: use piggydata

I guess the get_image_size(void *head) of arch/arm/mach-omap/xload.c needs rework. Any hint how to fix this?
SD-Card booting works. As tested with bbb.

Regards,
Teresa

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

Hi Teresa,

Quoted 6 lines · Teresa Remmet

Hello Sascha,

I watend to test the gpmc driver changes for our am335x boards using latest next. I noticed that booting from nand is not working correct any more. The MLO can not correctly obtain the image size of the barebox image.

Ups, right. Try the following.

While you are testing this board anyway could you see if the NAND generally still works on AM33xx? There are sitting some changes to the NAND driver in next.

Sascha

-----------------------8<-----------------------------

From 197806965fe26a444d40791fde5acff7eb4cd805 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Mon, 17 Dec 2018 12:09:23 +0100
Subject: [PATCH] Images: Add image size to built images

This brings back the image size written into the built images which got lost in the conversion to using piggydata in the PBL images.

Fixes 5a1a5ed253 ("ARM: images: use piggydata")
---
 images/Makefile | 1 +
 1 file changed, 1 insertion(+)
images/Makefile +1 -0
index 4c6d486f08..41509aa957 100644
@@ -66,6 +66,7 @@ $(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o FORCE
 
 $(obj)/%.pblb: $(obj)/%.pbl FORCE
 	$(call if_changed,objcopy_bin,$(*F))
+	$(Q)$(objtree)/scripts/fix_size -f $@
 
 $(obj)/%.s: $(obj)/% FORCE
 	$(call if_changed,disasm)
Signature · 12 lines
2.19.1

-- 
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

Hello Sascha,

Am Montag, den 17.12.2018, 12:14 +0100 schrieb Sascha Hauer:

Quoted 6 lines

Hi Teresa,

Quoted 3 lines · Teresa Remmet

Hello Sascha,

Quoted 7 lines
Quoted 6 lines

I watend to test the gpmc driver changes for our am335x boards using
latest next. I noticed that booting from nand is not working correct
any more. The MLO can not correctly obtain the image size of the barebox image.

Ups, right. Try the following.

Yes, this helps. Thanks.

Quoted 5 lines

While you are testing this board anyway could you see if the NAND generally still works on AM33xx? There are sitting some changes to the
NAND driver in next.

I'll have a look at it. Noticed also two other things with the AM35xx patch stack. I will send patches for this.

Teresa

Quoted 33 lines

Sascha

-----------------------8<-----------------------------

From 197806965fe26a444d40791fde5acff7eb4cd805 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Mon, 17 Dec 2018 12:09:23 +0100
Subject: [PATCH] Images: Add image size to built images

This brings back the image size written into the built images which got
lost in the conversion to using piggydata in the PBL images.

Fixes 5a1a5ed253 ("ARM: images: use piggydata")

---
 images/Makefile | 1 +

 1 file changed, 1 insertion(+)
images/Makefile +0 -0
index 4c6d486f08..41509aa957 100644
@@ -66,6 +66,7 @@ $(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common)

$(obj)/piggy.o FORCE

 $(obj)/%.pblb: $(obj)/%.pbl FORCE
  $(call if_changed,objcopy_bin,$(*F))

images/Makefile +1 -0
+	$(Q)$(objtree)/scripts/fix_size -f $@
Quoted 6 lines


 $(obj)/%.s: $(obj)/% FORCE
  $(call if_changed,disasm)
--
2.19.1

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Tested-by Teresa Remmet
#3 lore raw
Quoted 15 lines · Teresa Remmet

Hello Sascha,

Am Montag, den 17.12.2018, 12:14 +0100 schrieb Sascha Hauer:

Quoted 12 lines

Hi Teresa,

Quoted 9 lines · Teresa Remmet

Hello Sascha,

I watend to test the gpmc driver changes for our am335x boards using
latest next. I noticed that booting from nand is not working correct
any more. The MLO can not correctly obtain the image size of the barebox image.

Quoted 3 lines
Quoted 1 line

Ups, right. Try the following.

Yes, this helps. Thanks.

Ok, I'll take this as a

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox