mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Re: Boot using SPI-NOR device
       [not found] <OF2C7718AB.DA224B8D-ONC1257E7C.002375F3-C1257E7C.0023CCF2@beijer.se>
@ 2015-07-08 12:32 ` Sascha Hauer
       [not found] ` <OF33093548.0EB61029-ONC1257E7C.004A9EB9-C1257E7C.004A9EBC@beijer.se>
  1 sibling, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-07-08 12:32 UTC (permalink / raw)
  To: joacim.zetterling; +Cc: barebox

On Wed, Jul 08, 2015 at 08:31:02AM +0200, joacim.zetterling@westermo.se wrote:
>    Hi
> 
>    I have some problem booting a linux from a spi-nor device (Spansion,
>    s25fl512s). There is no trouble booting up barebox from the first
>    partition.
>    When I debugged our system (ARM based) I find out that when we probe the
>    file system, we get -22 as a result code from a memmap(s->fd, PROT_READ)
>    function call.
>    With further investigations I see that memmap is set to 0 with no ops is
>    defined, witch probably means that I do not have any memory mapped spi.
> 
>    I add my partitions like this
>     addpart -n /dev/s25fl512s
>    2048k(barebox),24M(primary),24M(reserved),2048k(config),4096k(barebox-environment)
> 
>    And my dts section for the spi looks like this
>     ...
>     ...
>     spi: spi@10600 {
>       spi-flash@0 {
>          #address-cells = <1>;
>          #size-cells = <1>;
>          compatible = "s25fl512s", "nor-jedec";
>          spi-max-frequency = <20000000>;
>          reg = <0>; /* Chip select 0 */
>      };
>    };
>    ...
>    ...
> 
>    I also have all the configurations for spi, mtd and env in place.
>    And I have no issues reading/writing/erasing the spi flash.
> 
>    My simple question is. How do I enable memory mapped spi-nor support in
>    barebox?

That's not possible because spi-nor is never memory mapped. The good
news is that you won't need this. What exactly are you doing to get the
memmap error? Are you trying to use the 'go' command to start something
from spi-nor? Use bootm instead.

Regards,
 Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Boot using SPI-NOR device
       [not found] ` <OF33093548.0EB61029-ONC1257E7C.004A9EB9-C1257E7C.004A9EBC@beijer.se>
@ 2015-07-09  6:52   ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2015-07-09  6:52 UTC (permalink / raw)
  To: joacim.zetterling; +Cc: barebox

On Wed, Jul 08, 2015 at 03:35:03PM +0200, joacim.zetterling@westermo.se wrote:
>    I try to boot linux from a spi-flash with squashfs.
>    by doing the following (discard the debug printouts ;-))
> 
>    barebox:/ mkdir -p /mnt/bootfs
>    barebox:/ mount -t squash -o sha1 /dev/s25fl512s.primary /mnt/bootfs

squash? barebox does not have squashfs support. You must have some out
of tree patches to which I can't say anything. How about posting these,
then we can maybe see what's going wrong.

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-09  6:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <OF2C7718AB.DA224B8D-ONC1257E7C.002375F3-C1257E7C.0023CCF2@beijer.se>
2015-07-08 12:32 ` Boot using SPI-NOR device Sascha Hauer
     [not found] ` <OF33093548.0EB61029-ONC1257E7C.004A9EB9-C1257E7C.004A9EBC@beijer.se>
2015-07-09  6:52   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox