From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv7 6/7] igep00x0: UBIize
Date: Mon, 25 Jan 2016 07:39:10 +0100 [thread overview]
Message-ID: <56A5C30E.5070401@denx.de> (raw)
In-Reply-To: <CAFqH_52+yF7JYS7rOUB+SDGwzGd6u9h_A+wcFADheHPGgdcjrw@mail.gmail.com>
Hello Enric, Ladislav,
Am 22.01.2016 um 23:35 schrieb Enric Balletbo Serra:
> Hi Ladis,
>
> Many thanks for your work on this, see some comments below ...
Sorry, pull request is sent with this patch, see:
http://lists.denx.de/pipermail/u-boot/2016-January/239855.html
@Ladislav: Please send changes in a follow up patch, thanks!
> 2016-01-21 7:07 GMT+01:00 Heiko Schocher <hs@denx.de>:
>> Hello Ladislav,
>>
>> Am 17.01.2016 um 04:16 schrieb Ladislav Michl:
>>>
>>> Convert IGEP board to use UBI volumes for U-Boot, its environment and
>>> kernel. With exception of first four sectors read by SoC boot
>>> ROM whole NAND is UBI managed. As code is too big now, drop
>>> CONFIG_SPL_EXT_SUPPORT to make it fit.
>>>
>>> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
>>> ---
>>> include/configs/omap3_igep00x0.h | 80
>>> ++++++++++++++++++++++------------------
>>> 1 file changed, 45 insertions(+), 35 deletions(-)
>>
>>
>> Reviewed-by: Heiko Schocher <hs@denx.de>
>>
>> bye,
>> Heiko
>>
>>>
>>> diff --git a/include/configs/omap3_igep00x0.h
>>> b/include/configs/omap3_igep00x0.h
>>> index 5da6cfd..9afbcbe 100644
>>> --- a/include/configs/omap3_igep00x0.h
>>> +++ b/include/configs/omap3_igep00x0.h
>>> @@ -74,6 +74,8 @@
>>> #define CONFIG_CMD_CACHE
>>> #ifdef CONFIG_BOOT_ONENAND
>>> #define CONFIG_CMD_ONENAND /* ONENAND support */
>>> +#else
>>> +#define CONFIG_CMD_UBI
>>> #endif
>>> #define CONFIG_CMD_DHCP
>>> #define CONFIG_CMD_PING
>>> @@ -86,6 +88,10 @@
>>> "stdout=serial\0" \
>>> "stderr=serial\0"
>>>
>>> +#define ENV_MTD_SETTINGS \
>>> + "mtdids=nand0=gpmc-nand.0\0" \
>>> + "mtdparts=mtdparts=gpmc-nand.0:512k(SPL),-(UBI)\0"
>>> +
>
> I think this should be protected by CONFIG_BOOT_NAND, if is defined
> CONFIG_BOOT_ONENAND the ENV_MTD_SETTINGS are wrong.
Good point ...
> Also, as we're changing the memory map, I'd like to change the
> reserved space for SPL to 2M instead of 512k, so we cover all NAND
> block sizes from (64KB to 512KB)
I do not understand this, but I have no details about the hw ...
>>> #define MEM_LAYOUT_SETTINGS \
>>> DEFAULT_LINUX_BOOT_ENV \
>>> "scriptaddr=0x87E00000\0" \
>>> @@ -96,36 +102,15 @@
>>>
>>> #include <config_distro_bootcmd.h>
>>>
>>> -
>>> #define CONFIG_EXTRA_ENV_SETTINGS \
>>> ENV_DEVICE_SETTINGS \
>>> + ENV_MTD_SETTINGS \
>>> MEM_LAYOUT_SETTINGS \
>>> BOOTENV
>>>
>>> #endif
>>>
>>> /*
>>> - * FLASH and environment organization
>>> - */
>>> -
>>> -#ifdef CONFIG_BOOT_ONENAND
>>> -#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
>>> -
>>> -#define ONENAND_ENV_OFFSET 0x260000 /* environment starts
>>> here */
>>> -
>>> -#define CONFIG_ENV_IS_IN_ONENAND 1
>>> -#define CONFIG_ENV_SIZE (512 << 10) /* Total Size
>>> Environment */
>>> -#define CONFIG_ENV_ADDR ONENAND_ENV_OFFSET
>>> -#endif
>>> -
>>> -#ifdef CONFIG_NAND
>>> -#define CONFIG_ENV_OFFSET 0x260000 /* environment starts
>>> here */
>>> -#define CONFIG_ENV_IS_IN_NAND 1
>>> -#define CONFIG_ENV_SIZE (512 << 10) /* Total Size
>>> Environment */
>>> -#define CONFIG_ENV_ADDR NAND_ENV_OFFSET
>>> -#endif
>>> -
>>> -/*
>>> * SMSC911x Ethernet
>>> */
>>> #if defined(CONFIG_CMD_NET)
>>> @@ -134,19 +119,50 @@
>>> #define CONFIG_SMC911X_BASE 0x2C000000
>>> #endif /* (CONFIG_CMD_NET) */
>>>
>>> +/*
>>> + * FLASH and environment organization
>>> + */
>>> +#ifdef CONFIG_NAND
>>> +#define CONFIG_SPL_UBI 1
>>> +#define CONFIG_SPL_UBI_MAX_VOL_LEBS 256
>>> +#define CONFIG_SPL_UBI_MAX_PEB_SIZE (256*1024)
>>> +#define CONFIG_SPL_UBI_MAX_PEBS 4096
>>> +#define CONFIG_SPL_UBI_VOL_IDS 8
>>> +#define CONFIG_SPL_UBI_LOAD_MONITOR_ID 0
>>> +#define CONFIG_SPL_UBI_LOAD_KERNEL_ID 3
>>> +#define CONFIG_SPL_UBI_LOAD_ARGS_ID 4
>>> +#define CONFIG_SPL_UBI_PEB_OFFSET 4
>>> +#define CONFIG_SPL_UBI_VID_OFFSET 512
>>> +#define CONFIG_SPL_UBI_LEB_START 2048
>>> +#define CONFIG_SPL_UBI_INFO_ADDR 0x88080000
>>> +
>>> +#define CONFIG_ENV_IS_IN_UBI 1
>>> +#define CONFIG_ENV_UBI_PART "UBI"
>>> +#define CONFIG_ENV_UBI_VOLUME "config"
>>> +#define CONFIG_ENV_UBI_VOLUME_REDUND "config_r"
>>> +#define CONFIG_UBI_SILENCE_MSG 1
>>> +#define CONFIG_UBIFS_SILENCE_MSG 1
>>> +#else
>>> +#define CONFIG_ENV_IS_NOWHERE
>>> +#endif
>>> +#define CONFIG_ENV_SIZE (32*1024)
>>> +
>>> +#define CONFIG_RBTREE
>>> +#define CONFIG_MTD_PARTITIONS
>>> +#define MTDIDS_DEFAULT "nand0=gpmc-nand.0"
>>> +#define MTDPARTS_DEFAULT
>>> "mtdparts=gpmc-nand.0:512k(SPL),-(UBI)"
>>> +
>
> Same comment as above.
>
>>> /* OneNAND boot config */
>>> #ifdef CONFIG_BOOT_ONENAND
>>> #define CONFIG_SPL_ONENAND_SUPPORT
>>> -#define CONFIG_SYS_ONENAND_U_BOOT_OFFS 0x80000
>>> #define CONFIG_SYS_ONENAND_PAGE_SIZE 2048
>>> -#define CONFIG_SPL_ONENAND_LOAD_ADDR 0x80000
>>> -#define CONFIG_SPL_ONENAND_LOAD_SIZE \
>>> - (512 * 1024 - CONFIG_SPL_ONENAND_LOAD_ADDR)
>>> -
>>> +#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
>>> +#define CONFIG_SYS_ONENAND_U_BOOT_OFFS 0x80000
>>> #endif
>>>
>>> /* NAND boot config */
>>> #ifdef CONFIG_NAND
>>> +#define CONFIG_SPL_NAND_SUPPORT
>>> #define CONFIG_SYS_NAND_BUSWIDTH_16BIT
>>> #define CONFIG_SYS_NAND_5_ADDR_CYCLE
>>> #define CONFIG_SYS_NAND_PAGE_COUNT 64
>>> @@ -166,14 +182,8 @@
>>> #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
>>> #define CONFIG_NAND_OMAP_GPMC
>>> #define CONFIG_BCH
>>> -
>>> -#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
>>> -/* NAND: SPL falcon mode configs */
>>> -#ifdef CONFIG_SPL_OS_BOOT
>>> -#define CONFIG_CMD_SPL_NAND_OFS 0x240000
>>> -#define CONFIG_SYS_NAND_SPL_KERNEL_OFFS 0x280000
>>> -#define CONFIG_CMD_SPL_WRITE_SIZE 0x2000
>>> -#endif
>>> #endif
>>>
>>> +#undef CONFIG_SPL_EXT_SUPPORT
>>> +
>>> #endif /* __IGEP00X0_H */
>>>
>>
>
> About the new layout you propose the following, right?
>
> volume 0 is u-boot.img, 1 and 2 env, 3 kernel, 4 FDT, 5 rootfs (ubifs)
>
> It's not possible load the kernel and the FDT from the rootfs directly, right?
That would be nice, but for this we need UBIFS support in SPL.
Patches are welcome ;-)
> BTW, I created the 5 volumes and copied the files to every volume but
> I get following errors, do you know what I am missing?
>
> U-Boot SPL 2016.01-00358-g4efe05f (Jan 22 2016 - 17:16:04)
> Trying to boot from NAND
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 3
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 3
> UBI warning: Failed
> Loading Linux failed, falling back to U-Boot.
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 0
> UBI warning: LEB 0 of 1 is missing
> UBI warning: Failed to load volume 0
> UBI warning: Failed
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###
>
> Thanks,
> Enric
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2016-01-25 6:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-17 3:09 [U-Boot] [PATCHv4 0/7] spl: Lightweight UBI and UBI fastmap support Ladislav Michl
2016-01-17 3:11 ` [U-Boot] [PATCHv4 1/7] mtd: Sort subsystem directories aplhabeticaly in Makefile Ladislav Michl
2016-01-21 6:04 ` Heiko Schocher
2016-01-17 3:12 ` [U-Boot] [PATCHv4 2/7] nand_spl_simple: Add a simple NAND read function Ladislav Michl
2016-01-21 6:05 ` Heiko Schocher
2016-01-17 3:13 ` [U-Boot] [PATCHv4 3/7] spl: Lightweight UBI and UBI fastmap support Ladislav Michl
2016-01-17 3:13 ` [U-Boot] [PATCHv4 4/7] spl: support loading from UBI volumes Ladislav Michl
2016-01-21 6:06 ` Heiko Schocher
2016-01-17 3:15 ` [U-Boot] [PATCHv5 5/7] spl: zImage support in Falcon mode Ladislav Michl
2016-01-21 6:07 ` Heiko Schocher
2016-01-17 3:16 ` [U-Boot] [PATCHv7 6/7] igep00x0: UBIize Ladislav Michl
2016-01-21 6:07 ` Heiko Schocher
2016-01-22 22:35 ` Enric Balletbo Serra
2016-01-24 13:44 ` Ladislav Michl
2016-01-25 6:39 ` Heiko Schocher [this message]
2016-01-25 7:26 ` Enric Balletbo Serra
2016-01-25 8:13 ` Heiko Schocher
2016-01-25 15:56 ` Ladislav Michl
2016-01-25 16:56 ` Enric Balletbo Serra
2016-04-13 5:19 ` Heiko Schocher
2016-04-13 11:39 ` Enric Balletbo Serra
2016-04-19 10:15 ` Enric Balletbo Serra
2016-06-04 20:48 ` [U-Boot] [RFC] runtime mtdparts_default; was: " Ladislav Michl
2016-01-25 15:13 ` [U-Boot] [PATCHv7 6/7] " Tom Rini
2016-01-25 15:35 ` Heiko Schocher
2016-01-17 3:16 ` [U-Boot] [PATCHv4 7/7] igep00x0: Falcon mode Ladislav Michl
2016-01-21 6:08 ` Heiko Schocher
2016-01-22 22:38 ` Enric Balletbo Serra
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=56A5C30E.5070401@denx.de \
--to=hs@denx.de \
--cc=u-boot@lists.denx.de \
/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