Message ID | 1318894433-9038-3-git-send-email-yanok@emcraft.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
On Mon, Oct 17, 2011 at 4:33 PM, Ilya Yanok <yanok@emcraft.com> wrote: > Don't hardcode u-boot.bin size for the case where mkimage signature is > missing, use CONFIG_SYS_NAND_U_BOOT_SIZE for this. > > Signed-off-by: Ilya Yanok <yanok@emcraft.com> I don't like this since it means we need to always define this variable when well behaved situations will have shipped u-boot.img anyhow. Or is there really a good reason to fall back to u-boot.bin?
Hi Tom, On 18.10.2011 03:43, Tom Rini wrote: >> Don't hardcode u-boot.bin size for the case where mkimage signature is >> missing, use CONFIG_SYS_NAND_U_BOOT_SIZE for this. >> >> Signed-off-by: Ilya Yanok <yanok@emcraft.com> > > I don't like this since it means we need to always define this > variable when well behaved situations will have shipped u-boot.img > anyhow. Or is there really a good reason > to fall back to u-boot.bin? No, I don't think so. I got your point. Still I think hardcoding the size value is not very good solution either. Maybe we can add something like #ifndef CONFIG_SYS_NAND_U_BOOT_SIZE #define CONFIG_SYS_NAND_U_BOOT_SIZE (200 * 1024) /* 200kB - default */ #endif ? Regards, Ilya.
Hi Tom, All, On 18.10.2011 03:43, Tom Rini wrote: >> Don't hardcode u-boot.bin size for the case where mkimage signature is >> missing, use CONFIG_SYS_NAND_U_BOOT_SIZE for this. >> >> Signed-off-by: Ilya Yanok <yanok@emcraft.com> So what about this patch? Should I drop it? Regards, Ilya.
On Mon, Oct 31, 2011 at 5:38 AM, Ilya Yanok <yanok@emcraft.com> wrote: > Hi Tom, All, > > On 18.10.2011 03:43, Tom Rini wrote: >>> Don't hardcode u-boot.bin size for the case where mkimage signature is >>> missing, use CONFIG_SYS_NAND_U_BOOT_SIZE for this. >>> >>> Signed-off-by: Ilya Yanok <yanok@emcraft.com> > > So what about this patch? Should I drop it? That would be my vote, but I don't have a MAINTAINER hat anywhere here ;)
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index c76fea6..f28411b 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -81,8 +81,7 @@ void spl_parse_image_header(const struct image_header *header) printf("mkimage signature not found - ih_magic = %x\n", header->ih_magic); puts("Assuming u-boot.bin ..\n"); - /* Let's assume U-Boot will not be more than 200 KB */ - spl_image.size = 200 * 1024; + spl_image.size = CONFIG_SYS_NAND_U_BOOT_SIZE; spl_image.entry_point = CONFIG_SYS_TEXT_BASE; spl_image.load_addr = CONFIG_SYS_TEXT_BASE; spl_image.os = IH_OS_U_BOOT;
Don't hardcode u-boot.bin size for the case where mkimage signature is missing, use CONFIG_SYS_NAND_U_BOOT_SIZE for this. Signed-off-by: Ilya Yanok <yanok@emcraft.com> --- arch/arm/cpu/armv7/omap-common/spl.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)