* MX28 Put u-boot on SPI NOR @ 2013-08-02 14:45 Mårten Wikman 2013-08-02 16:34 ` Otavio Salvador 0 siblings, 1 reply; 13+ messages in thread From: Mårten Wikman @ 2013-08-02 14:45 UTC (permalink / raw) To: meta-freescale [-- Attachment #1: Type: text/plain, Size: 514 bytes --] Hello, I have compiled u-boot-imx and edited so it's using ENV_IS_IN_SPI_FLASH. If I dd u-boot.sd to SD-CARD and boot u-boot finds my SPI NOR and saves env there, however I would like to be able to boot from SPI NOR instead of SD-CARD. What file should I write to SPI NOR? I have tried with u-boot.sb to 0x0 on SPI NOR but all I get as output is H0x80501003. I'm using a Micron N25Q128 memory and have also tried with Winbond W25Q128. Can anyone point me in any direction so I get this problem solved? [-- Attachment #2: Type: text/html, Size: 983 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-02 14:45 MX28 Put u-boot on SPI NOR Mårten Wikman @ 2013-08-02 16:34 ` Otavio Salvador 2013-08-02 16:57 ` Mårten Wikman 0 siblings, 1 reply; 13+ messages in thread From: Otavio Salvador @ 2013-08-02 16:34 UTC (permalink / raw) To: Mårten Wikman; +Cc: meta-freescale@yoctoproject.org On Fri, Aug 2, 2013 at 11:45 AM, Mårten Wikman <marten.wikman@novia.fi> wrote: > I have compiled u-boot-imx and edited so it's using ENV_IS_IN_SPI_FLASH. If > I dd u-boot.sd to SD-CARD and boot u-boot finds my SPI NOR and saves env > there, however I would like to be able to boot from SPI NOR instead of > SD-CARD. > What file should I write to SPI NOR? I have tried with u-boot.sb to 0x0 on > SPI NOR but all I get as output is H0x80501003. I'm using a Micron N25Q128 > memory and have also tried with Winbond W25Q128. Can anyone point me in any > direction so I get this problem solved? It needs checking in datasheet but I think it is u-boot.bin directly. -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://projetos.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-02 16:34 ` Otavio Salvador @ 2013-08-02 16:57 ` Mårten Wikman 2013-08-03 19:21 ` Marek Vasut 0 siblings, 1 reply; 13+ messages in thread From: Mårten Wikman @ 2013-08-02 16:57 UTC (permalink / raw) To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 1235 bytes --] But then it's just u-boot without any bootstream? Is it really possible that mx28 will boot without it? I can't find much information about how to boot from spi nor on the internet. SD CARD boot and NAND boot are well documented in u-boot source code. 2013/8/2 Otavio Salvador <otavio@ossystems.com.br> > On Fri, Aug 2, 2013 at 11:45 AM, Mårten Wikman <marten.wikman@novia.fi> > wrote: > > I have compiled u-boot-imx and edited so it's using ENV_IS_IN_SPI_FLASH. > If > > I dd u-boot.sd to SD-CARD and boot u-boot finds my SPI NOR and saves > env > > there, however I would like to be able to boot from SPI NOR instead of > > SD-CARD. > > What file should I write to SPI NOR? I have tried with u-boot.sb to 0x0 > on > > SPI NOR but all I get as output is H0x80501003. I'm using a Micron > N25Q128 > > memory and have also tried with Winbond W25Q128. Can anyone point me in > any > > direction so I get this problem solved? > > It needs checking in datasheet but I think it is u-boot.bin directly. > > -- > Otavio Salvador O.S. Systems > http://www.ossystems.com.br http://projetos.ossystems.com.br > Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 > [-- Attachment #2: Type: text/html, Size: 2041 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-02 16:57 ` Mårten Wikman @ 2013-08-03 19:21 ` Marek Vasut 2013-08-03 19:34 ` Otavio Salvador 0 siblings, 1 reply; 13+ messages in thread From: Marek Vasut @ 2013-08-03 19:21 UTC (permalink / raw) To: Mårten Wikman; +Cc: meta-freescale, Otavio Salvador Dear Mårten Wikman, > But then it's just u-boot without any bootstream? Is it really possible > that mx28 will boot without it? I can't find much information about how to > boot from spi nor on the internet. SD CARD boot and NAND boot are well > documented in u-boot source code. Write u-boot.sb directly to the SPI NOR to offset 0x0 . Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-03 19:21 ` Marek Vasut @ 2013-08-03 19:34 ` Otavio Salvador 2013-08-03 22:33 ` Marek Vasut 0 siblings, 1 reply; 13+ messages in thread From: Otavio Salvador @ 2013-08-03 19:34 UTC (permalink / raw) To: Marek Vasut; +Cc: meta-freescale@yoctoproject.org On Sat, Aug 3, 2013 at 4:21 PM, Marek Vasut <marex@denx.de> wrote: > Dear Mårten Wikman, > >> But then it's just u-boot without any bootstream? Is it really possible >> that mx28 will boot without it? I can't find much information about how to >> boot from spi nor on the internet. SD CARD boot and NAND boot are well >> documented in u-boot source code. > > Write u-boot.sb directly to the SPI NOR to offset 0x0 . He did this already, as said in his first e-mail. It seems he is getting H0x80501003. I don't have the MX28 error code list here (just MX23) do you know the meaning of this error code offhand? -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://projetos.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-03 19:34 ` Otavio Salvador @ 2013-08-03 22:33 ` Marek Vasut 2013-08-04 9:49 ` Mårten Wikman 0 siblings, 1 reply; 13+ messages in thread From: Marek Vasut @ 2013-08-03 22:33 UTC (permalink / raw) To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org Dear Otavio Salvador, > On Sat, Aug 3, 2013 at 4:21 PM, Marek Vasut <marex@denx.de> wrote: > > Dear Mårten Wikman, > > > >> But then it's just u-boot without any bootstream? Is it really possible > >> that mx28 will boot without it? I can't find much information about how > >> to boot from spi nor on the internet. SD CARD boot and NAND boot are > >> well documented in u-boot source code. > > > > Write u-boot.sb directly to the SPI NOR to offset 0x0 . > > He did this already, as said in his first e-mail. It seems he is > getting H0x80501003. > > I don't have the MX28 error code list here (just MX23) do you know the > meaning of this error code offhand? #define ERROR_ROM_LDR_SIGNATURE (ERROR_ROM_GROUP | ERROR_ROM_LOADER_GROUP | 0x3) 0x80501003 The file signature or file version is incorrect. The file in the NOR flash is corrupted. How do you write the file into the NOR flash ? I think the filesize might beed to be 32-byte aligned when writing. Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-03 22:33 ` Marek Vasut @ 2013-08-04 9:49 ` Mårten Wikman 2013-08-04 11:14 ` Marek Vasut 0 siblings, 1 reply; 13+ messages in thread From: Mårten Wikman @ 2013-08-04 9:49 UTC (permalink / raw) To: Marek Vasut; +Cc: meta-freescale@yoctoproject.org, Otavio Salvador [-- Attachment #1: Type: text/plain, Size: 1283 bytes --] I did write it with u-boots sf write command, I have also tried to use mtd-utils in linux. Are there any special parameters I need to add to use 32-byte aligned? 2013/8/4 Marek Vasut <marex@denx.de> > Dear Otavio Salvador, > > > On Sat, Aug 3, 2013 at 4:21 PM, Marek Vasut <marex@denx.de> wrote: > > > Dear Mårten Wikman, > > > > > >> But then it's just u-boot without any bootstream? Is it really > possible > > >> that mx28 will boot without it? I can't find much information about > how > > >> to boot from spi nor on the internet. SD CARD boot and NAND boot are > > >> well documented in u-boot source code. > > > > > > Write u-boot.sb directly to the SPI NOR to offset 0x0 . > > > > He did this already, as said in his first e-mail. It seems he is > > getting H0x80501003. > > > > I don't have the MX28 error code list here (just MX23) do you know the > > meaning of this error code offhand? > > #define ERROR_ROM_LDR_SIGNATURE (ERROR_ROM_GROUP | ERROR_ROM_LOADER_GROUP > | 0x3) > 0x80501003 The file signature or file version is incorrect. > > The file in the NOR flash is corrupted. How do you write the file into the > NOR > flash ? I think the filesize might beed to be 32-byte aligned when writing. > > Best regards, > Marek Vasut > [-- Attachment #2: Type: text/html, Size: 1763 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-04 9:49 ` Mårten Wikman @ 2013-08-04 11:14 ` Marek Vasut 2013-08-04 13:08 ` Mårten Wikman 0 siblings, 1 reply; 13+ messages in thread From: Marek Vasut @ 2013-08-04 11:14 UTC (permalink / raw) To: Mårten Wikman; +Cc: meta-freescale@yoctoproject.org, Otavio Salvador Dear Mårten Wikman, > I did write it with u-boots sf write command, I have also tried to use > mtd-utils in linux. Are there any special parameters I need to add to use > 32-byte aligned? IIRC the SF block should handle the alignment already. Otherwise, just align the amount of data you write by hand ( think of rounding it up to closes multiple of 32 ). Btw one more thing that might have gone awry. Did you erase the SPI flash before writing? These should do the job. Load the u-boot.sb to 0x42000000, then do: sf erase 0x0 0x80000 sf write 0x42000000 0 0x80000 The 0x80000 size should be enough for every possible u-boot.sb containing only the u-boot . If that works, we can look for further cause of this problem. If this doesn't work, then there might even be a hardware problem. What device are you working with in any case? Is that a custom board or some EVK? > > 2013/8/4 Marek Vasut <marex@denx.de> > > > Dear Otavio Salvador, > > > > > On Sat, Aug 3, 2013 at 4:21 PM, Marek Vasut <marex@denx.de> wrote: > > > > Dear Mårten Wikman, > > > > > > > >> But then it's just u-boot without any bootstream? Is it really > > > > possible > > > > > >> that mx28 will boot without it? I can't find much information about > > > > how > > > > > >> to boot from spi nor on the internet. SD CARD boot and NAND boot are > > > >> well documented in u-boot source code. > > > > > > > > Write u-boot.sb directly to the SPI NOR to offset 0x0 . > > > > > > He did this already, as said in his first e-mail. It seems he is > > > getting H0x80501003. > > > > > > I don't have the MX28 error code list here (just MX23) do you know the > > > meaning of this error code offhand? > > > > #define ERROR_ROM_LDR_SIGNATURE (ERROR_ROM_GROUP | ERROR_ROM_LOADER_GROUP > > > > | 0x3) > > > > 0x80501003 The file signature or file version is incorrect. > > > > The file in the NOR flash is corrupted. How do you write the file into > > the NOR > > flash ? I think the filesize might beed to be 32-byte aligned when > > writing. > > > > Best regards, > > Marek Vasut Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-04 11:14 ` Marek Vasut @ 2013-08-04 13:08 ` Mårten Wikman 2013-08-04 13:15 ` Marek Vasut 0 siblings, 1 reply; 13+ messages in thread From: Mårten Wikman @ 2013-08-04 13:08 UTC (permalink / raw) To: Marek Vasut; +Cc: meta-freescale@yoctoproject.org, Otavio Salvador [-- Attachment #1: Type: text/plain, Size: 2642 bytes --] I did not erase memory before I typed write, maybe this is where it's fails. I'm using MX28EVK and I have added DNP resistors from schematics, without them I could not get SPI NOR to work in linux. I'm going to test this tomorrow morning and I will keep you updated, hopefully this solves it. 2013/8/4 Marek Vasut <marex@denx.de> > Dear Mårten Wikman, > > > I did write it with u-boots sf write command, I have also tried to use > > mtd-utils in linux. Are there any special parameters I need to add to use > > 32-byte aligned? > > IIRC the SF block should handle the alignment already. Otherwise, just > align the > amount of data you write by hand ( think of rounding it up to closes > multiple of > 32 ). > > Btw one more thing that might have gone awry. Did you erase the SPI flash > before > writing? These should do the job. Load the u-boot.sb to 0x42000000, then > do: > > sf erase 0x0 0x80000 > sf write 0x42000000 0 0x80000 > > The 0x80000 size should be enough for every possible u-boot.sb containing > only > the u-boot . If that works, we can look for further cause of this problem. > If > this doesn't work, then there might even be a hardware problem. > > What device are you working with in any case? Is that a custom board or > some > EVK? > > > > > 2013/8/4 Marek Vasut <marex@denx.de> > > > > > Dear Otavio Salvador, > > > > > > > On Sat, Aug 3, 2013 at 4:21 PM, Marek Vasut <marex@denx.de> wrote: > > > > > Dear Mårten Wikman, > > > > > > > > > >> But then it's just u-boot without any bootstream? Is it really > > > > > > possible > > > > > > > >> that mx28 will boot without it? I can't find much information > about > > > > > > how > > > > > > > >> to boot from spi nor on the internet. SD CARD boot and NAND boot > are > > > > >> well documented in u-boot source code. > > > > > > > > > > Write u-boot.sb directly to the SPI NOR to offset 0x0 . > > > > > > > > He did this already, as said in his first e-mail. It seems he is > > > > getting H0x80501003. > > > > > > > > I don't have the MX28 error code list here (just MX23) do you know > the > > > > meaning of this error code offhand? > > > > > > #define ERROR_ROM_LDR_SIGNATURE (ERROR_ROM_GROUP | > ERROR_ROM_LOADER_GROUP > > > > > > | 0x3) > > > > > > 0x80501003 The file signature or file version is incorrect. > > > > > > The file in the NOR flash is corrupted. How do you write the file into > > > the NOR > > > flash ? I think the filesize might beed to be 32-byte aligned when > > > writing. > > > > > > Best regards, > > > Marek Vasut > > Best regards, > Marek Vasut > [-- Attachment #2: Type: text/html, Size: 3610 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-04 13:08 ` Mårten Wikman @ 2013-08-04 13:15 ` Marek Vasut 2013-08-05 18:32 ` Mårten Wikman 0 siblings, 1 reply; 13+ messages in thread From: Marek Vasut @ 2013-08-04 13:15 UTC (permalink / raw) To: Mårten Wikman; +Cc: meta-freescale@yoctoproject.org, Otavio Salvador Dear Mårten Wikman, I dunno about the Yocto ML, but usually you don't want to be top-posting in the ML. > I did not erase memory before I typed write, maybe this is where it's > fails. Yes, that is likely. You can also use ' sf update ', which is less abbrasive for the flash (it first reads the SF, then does erase+write cycle only if the block changed). But for the first installation of u-boot, use erase + write manually to make sure everything is written correctly. > I'm using MX28EVK and I have added DNP resistors from schematics, without > them I could not get SPI NOR to work in linux. I'm going to test this > tomorrow morning and I will keep you updated, hopefully this solves it. OK. Make sure that you can even write the SF correctly in the first place. [...] Best regards, Marek Vasut ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-04 13:15 ` Marek Vasut @ 2013-08-05 18:32 ` Mårten Wikman 2013-08-05 18:40 ` Fabio Estevam 0 siblings, 1 reply; 13+ messages in thread From: Mårten Wikman @ 2013-08-05 18:32 UTC (permalink / raw) To: Marek Vasut; +Cc: meta-freescale@yoctoproject.org, Otavio Salvador > I dunno about the Yocto ML, but usually you don't want to be top-posting in the > ML. Sorry about that and thanks for pointing it out so I can start to behave as expected when posting in ML. > Yes, that is likely. You can also use ' sf update ', which is less abbrasive for > the flash (it first reads the SF, then does erase+write cycle only if the block > changed). But for the first installation of u-boot, use erase + write manually > to make sure everything is written correctly. This solved the problem for me, thank you very much for the help, I'm now able to boot u-boot and linux from SPI NOR memory! ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-05 18:32 ` Mårten Wikman @ 2013-08-05 18:40 ` Fabio Estevam 2013-08-05 19:46 ` Mårten Wikman 0 siblings, 1 reply; 13+ messages in thread From: Fabio Estevam @ 2013-08-05 18:40 UTC (permalink / raw) To: Mårten Wikman Cc: Marek Vasut, meta-freescale@yoctoproject.org, Otavio Salvador Hi Mårten, On Mon, Aug 5, 2013 at 3:32 PM, Mårten Wikman <marten.wikman@novia.fi> wrote: > This solved the problem for me, thank you very much for the help, I'm > now able to boot u-boot and linux from SPI NOR memory! Glad to know it works. Could you please add some text into the README files explaining the detailed steps you followed to boot from SPI on mx28? The relevant files in U-boot source code are: doc/README.mxs and board/freescale/mx28evk/README This would be very helpful for other people trying to accomplish the same thing. Then you could generate a patch and submit it to the u-boot list. Thanks, Fabio Estevam ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: MX28 Put u-boot on SPI NOR 2013-08-05 18:40 ` Fabio Estevam @ 2013-08-05 19:46 ` Mårten Wikman 0 siblings, 0 replies; 13+ messages in thread From: Mårten Wikman @ 2013-08-05 19:46 UTC (permalink / raw) To: Fabio Estevam Cc: Marek Vasut, meta-freescale@yoctoproject.org, Otavio Salvador > Could you please add some text into the README files explaining the > detailed steps you followed to boot from SPI on mx28? > > The relevant files in U-boot source code are: > > doc/README.mxs > > and > > board/freescale/mx28evk/README > > This would be very helpful for other people trying to accomplish the same thing. > > Then you could generate a patch and submit it to the u-boot list. Absolutely, I will do this later this week. ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-08-05 19:46 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-08-02 14:45 MX28 Put u-boot on SPI NOR Mårten Wikman 2013-08-02 16:34 ` Otavio Salvador 2013-08-02 16:57 ` Mårten Wikman 2013-08-03 19:21 ` Marek Vasut 2013-08-03 19:34 ` Otavio Salvador 2013-08-03 22:33 ` Marek Vasut 2013-08-04 9:49 ` Mårten Wikman 2013-08-04 11:14 ` Marek Vasut 2013-08-04 13:08 ` Mårten Wikman 2013-08-04 13:15 ` Marek Vasut 2013-08-05 18:32 ` Mårten Wikman 2013-08-05 18:40 ` Fabio Estevam 2013-08-05 19:46 ` Mårten Wikman
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.