All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Hornung <mhornung.linux@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] i.MX35PDK: Starting U-Boot from serial NOR-Flash
Date: Fri, 3 Aug 2012 10:03:00 +0200	[thread overview]
Message-ID: <CAMPAExXM4Quy+CLeMpR-JtzUrt26ruVpyg-43Vcu_srJxyK_6A@mail.gmail.com> (raw)
In-Reply-To: <CAOMZO5DnTEgohYfUZ+qFvPoCt6Noj4JPvh4fY2Sqc0_geAjq7g@mail.gmail.com>

Hi Fabio,

>>
>
> Didn't you also had to remove the init_sdram call in lowlevel_init.S ?
>

No, I didn't change it since it seems not to make any difference. Hope
we're talking about the same, I changed the following and it did not
make any difference whether it was commented or not:

+++ b/board/freescale/mx35pdk/lowlevel_init.S

 init_sdram_start:
        /*init_sdram*/
-       setup_sdram
+/*     setup_sdram */


>>
>> Then I did the following change:
>>
>> +++ b/board/freescale/mx35pdk/mx35pdk.c
>>
>>         size1 = get_ram_size((void *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE);
>> -       size2 = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);
>> +        size2 = 0;
>> +       /*size2 = get_ram_size((void *)PHYS_SDRAM_2, PHYS_SDRAM_2_SIZE);*/
>
> I think we should not touch this.
>

Hey, but it works (halfways) :-)


>> Could you please give me some hits what to do next?
>
> Can you please try to remove  #define CONFIG_ENV_IS_IN_FLASH and insert:
>
> #define CONFIG_SYS_NO_FLASH
>
> #define CONFIG_ENV_OFFSET      (6 * 64 * 1024)
> #define CONFIG_ENV_SIZE        (8 * 1024)
> #define CONFIG_ENV_IS_IN_MMC
> #define CONFIG_SYS_MMC_ENV_DEV

A first quick try ended up with the following (I'll try harder today:

In file included from cmd_bootm.c:81:0:
/home/hmi/source/bootloader/u-boot/include/mtd/cfi_flash.h:174:22:
error: unknown type name 'flash_info_t'
/home/hmi/source/bootloader/u-boot/include/mtd/cfi_flash.h:174:43:
error: unknown type name 'flash_sect_t'
cmd_bootm.c:82:1: error: unknown type name 'flash_info_t'
cmd_bootm.c: In function 'do_imls':
cmd_bootm.c:1164:2: error: unknown type name 'flash_info_t'
cmd_bootm.c:1171:11: error: request for member 'flash_id' in something
not a structure or union
cmd_bootm.c:1171:25: error: 'FLASH_UNKNOWN' undeclared (first use in
this function)
cmd_bootm.c:1171:25: note: each undeclared identifier is reported only
once for each function it appears in
cmd_bootm.c:1173:23: error: request for member 'sector_count' in
something not a structure or union
cmd_bootm.c:1175:22: error: request for member 'start' in something
not a structure or union
make[1]: *** [cmd_bootm.o] Error 1
make[1]: Leaving directory `/home/hmi/source/bootloader/u-boot/common'
make: *** [common/libcommon.o] Error 2


The changes I made are as follows:


+++ b/include/configs/mx35pdk.h

+/*
 #define CONFIG_ENV_SECT_SIZE   (128 * 1024)
 #define CONFIG_ENV_SIZE                CONFIG_ENV_SECT_SIZE
+*/

-#define CONFIG_ENV_IS_IN_FLASH
+/* #define CONFIG_ENV_IS_IN_FLASH */
+#define CONFIG_SYS_NO_FLASH
+#define CONFIG_ENV_OFFSET      (6 * 64 * 1024)
+#define CONFIG_ENV_SIZE        (8 * 1024)
+#define CONFIG_ENV_IS_IN_MMC
+#define CONFIG_SYS_MMC_ENV_DEV


Then I tried a second run with commented #define CONFIG_SYS_NO_FLASH:

+/* #define CONFIG_SYS_NO_FLASH */


This ended up with the following:


no-stack-protector -Wno-format-nonliteral -Wno-format-security
-fstack-usage     -o env_mmc.o env_mmc.c -c
env_mmc.c: In function 'write_env':
env_mmc.c:90:55: error: expected expression before ',' token
env_mmc.c: In function 'saveenv':
env_mmc.c:101:9: error: too few arguments to function 'find_mmc_device'
/home/hmi/source/bootloader/u-boot/include/mmc.h:269:13: note: declared here
env_mmc.c:115:57: error: expected expression before ')' token
env_mmc.c: In function 'read_env':
env_mmc.c:134:54: error: expected expression before ',' token
env_mmc.c: In function 'env_relocate_spec':
env_mmc.c:144:9: error: too few arguments to function 'find_mmc_device'
/home/hmi/source/bootloader/u-boot/include/mmc.h:269:13: note: declared here
make[1]: *** [env_mmc.o] Error 1
make[1]: Leaving directory `/home/hmi/source/bootloader/u-boot-hmi/common'
make: *** [common/libcommon.o] Error 2


I am running Ubuntu 12.04 and ELDK 5.2.1 by the way. U-boot version is
latest from http://git.denx.de/u-boot.git


>
> Cced Stefano in case he has any suggestions.
>

Thank you very much for your help, Fabio and Stefano.

> Regards,
>
> Fabio Estevam


With best regards

Michael Hornung

  parent reply	other threads:[~2012-08-03  8:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 13:29 [U-Boot] i.MX35PDK: Starting U-Boot from serial NOR-Flash Hornung, Michael
2012-07-04 17:31 ` Fabio Estevam
2012-07-04 17:35   ` Fabio Estevam
     [not found]   ` <334319B2EBE0B144BAE1402B79D82DC5D31358D8@srvpegasus>
2012-07-05 18:06     ` Fabio Estevam
2012-07-09 13:11   ` Hornung, Michael
     [not found]   ` <334319B2EBE0B144BAE1402B79D82DC5D31358DF@srvpegasus>
2012-07-09 19:45     ` Fabio Estevam
2012-07-10 19:08       ` Hornung, Michael
2012-07-26 20:32         ` Fabio Estevam
2012-07-31 13:47           ` Michael Hornung
2012-08-02  9:00             ` Michael Hornung
2012-08-02 12:55               ` Fabio Estevam
2012-08-02 13:07                 ` Stefano Babic
2012-08-03  8:03                 ` Michael Hornung [this message]
2012-08-03  9:30                   ` Stefano Babic
2012-07-05  9:16 Hornung, Michael

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=CAMPAExXM4Quy+CLeMpR-JtzUrt26ruVpyg-43Vcu_srJxyK_6A@mail.gmail.com \
    --to=mhornung.linux@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.