Making Debian filesystem for Sim.One - issues

8 views
Skip to first unread message

Aragorn

unread,
Apr 24, 2010, 11:17:46 AM4/24/10
to sim1
Hello all,

First off, I'm new to the Sim.One, only getting it yesterday, but I
thought I would try to build my own filesystem for the Sim.One, and I
am using the wiki process (DebianRootFS) to do so, but have run into a
problem.

All went moderately well until the 'complete the installation'
section. For some reason, the Sim.One is not booting from the USB
key; in fact it doesn't appear to even be trying to do so. It
successfully downloads the uImage (pulled from the files section, I
have not made my own kernel yet), says the bytes are transferred, then
takes me back to the single user mode (back to the SIM.ONE> prompt).

There are a few things that did not go as expected with the wiki
post. When creating the devices, many of the devices have a '/' at
the beginning of the path, and since the filesystem being made is on
the USB key, I thought that was just an error in the article. The
other issue was when I executed the following line in the single user
mode when preparing to boot the new filesystem: set bootcmd tftp
c0200000; bootm

I receive the following error:
## Booting image at 02000000 ...

Bad Magic Number

I am guessing that is really the problem, but I don't know what to do
about it. I am familiar with Linux, but not as much on an embedded
device, or at this level. Any help or suggestions would be
appreciated!

Thanks
Paul





--
Subscription settings: http://groups.google.com/group/sim1/subscribe?hl=en

Martin Guy

unread,
Apr 25, 2010, 4:22:31 AM4/25/10
to si...@googlegroups.com
Hi

On 4/24/10, Aragorn <praeto...@gmail.com> wrote:
> takes me back to the single user mode (back to the SIM.ONE> prompt).

That's the U-Boot prompt. Single-user mode is something different,
when you have bootes linux but have not started the system daemons and
just have one shell running.

> When creating the devices, many of the devices have a '/' at
> the beginning of the path

Thanks! Fixed now.

> set bootcmd tftp c0200000; bootm
>
> I receive the following error:
> ## Booting image at 02000000 ...

the ; terminates the "set" command, so the effect is to set the
bootcmd variable and then run bootm, which boots from the default
address. You need

set bootcmd "tftp c0200000; bootm"

I've fixed that too in the wiki

> Bad Magic Number
Because it's jumped to some empty memory at 02000000

Thanks for your feedback and corrections.
If you'd like to help improve the wiki up to date, please ask sergio
to add you to the list of contributors.

M

Aragorn

unread,
Apr 25, 2010, 1:06:53 PM4/25/10
to sim1
Martin,

Thank you for your reply!

I figured single user mode was something else... but wasn't positive,
since after those steps I was in the same place.

Thank you for the altered line... I'll give that a shot when I get
the opportunity to do so, hopefully today yet or tomorrow.

Sergio did give me access (thanks Sergio!) I want to go through and
add some of the things that I run into through the process, if that is
ok with everyone.

Thanks
Paul

On Apr 25, 3:22 am, Martin Guy <martinw...@gmail.com> wrote:
> Hi

Aragorn

unread,
Apr 25, 2010, 3:21:35 PM4/25/10
to sim1
Hello again,

What would I need to do in order to get it to boot to the SD card
again?

Thanks
Paul

Martin Guy

unread,
Apr 26, 2010, 10:41:51 AM4/26/10
to si...@googlegroups.com
On 4/25/10, Aragorn <praeto...@gmail.com> wrote:
> Sergio did give me access (thanks Sergio!) I want to go through and
> add some of the things that I run into through the process, if that is
> ok with everyone.

That depends what you add :)
No, seriously though, that would be great.

> What would I need to do in order to get it to boot to the SD card
> again?

It's documented here
https://code.google.com/p/sim1/wiki/RootBoot

Martin Guy

unread,
Apr 26, 2010, 11:38:01 AM4/26/10
to si...@googlegroups.com
> > What would I need to do in order to get it to boot to the SD card
> > again?
>
> It's documented here
> https://code.google.com/p/sim1/wiki/RootBoot

I should say that with the 2.6.24.7 Cirrus driver, transfers to/from
SD card are not 100% reliable - see the Issues section of the google
code project.

A new driver for linux-2.6.34 is being developed in these days, which
is much better:
372 kB/sec instead of 256, 50% CPU usage instead of 100% and it seems
to be reliable.

There is a (long!) discussion of it and some first attempts at the
code in the linux-arm-kernel mailing list archived at
http://lists.infradead.org/pipermail/linux-arm-kernel/ - search for
"Cirrus EP93xx SPI controller" in March 2010 and April 2010.
It's status is too complex to describe at present - when it gets to a
final version I'll add the necessary patches for linux-2.6.34 and the
board config for the Sim.One and post a new article here. We hpe to
get it finished in time to be included in the mainline kernel in
2.6.35

Incidentally, the Sim.One is included as a supported linux platform in
2.6.34, which is currently at the "release candidate" stage and should
be fulle released in the next few weeks.

Praetorian

unread,
Apr 30, 2010, 4:50:40 PM4/30/10
to si...@googlegroups.com
Hello Martin,

I am finally getting the chance to mess with the Sim.One some more...  and, well, still not working.

I changed the bootcmd line as you suggested, but I get a different error now:
---
SIM.ONE> set bootcmd "tftp c02000000; bootm"

Unknown command 'bootm"' - try 'help'

SIM.ONE>
---

If I change it to a single quote, it accepts it, but still will not boot.
---

SIM.ONE> boot

TFTP from server 192.168.99.32; our IP address is 192.168.99.57

Filename 'uImage'.

Load address: 0x2000000

Loading: #################################################################

     #################################################################

     #################################################################

     #################################################################

     #################################################################

     #################################################################

     ####

done

Bytes transferred = 2017088 (1ec740 hex)


## Booting image at 02000000 ...

Bad Magic Number

SIM.ONE>
---

I have also downloaded the kernel again to make sure it wasn't a download issue.

I tried the commands that are documented on the link to boot the root filesystem before, and it does not work either.  It still downloads the uImage, and produces a Bad Magic Number instead of actually hitting the SD card.  I am guessing that the bootcmd has to be changed as well, since it is still looking at the tftp server, but changing it to boot gives me a "'bootd' recursion detected" message, and setting it blank doesn't work (it does nothing at all). 

The results of printenv are below for your reference (from my attempt after clearing the bootcmd variable).  I am sure it is something I am missing...

SIM.ONE> printenv

bootdelay=2

baudrate=57600

ethaddr=01:02:93:12:15:07

mtdparts=mtdparts=edb93xx-nor0:768k@0(Firmware),2048k@0xc0000(Kernel),-@0x2c0000(Root-FS)

tftp=0xc0200000 uImage;bootm

server=192.168.99.32

mtdids=nor0=edb93xx-nor0

partition=nor0,0

mtddevnum=0

mtddevname=Firmware

bootfile=uImage

stdin=serial

stdout=serial

stderr=serial

bootargs=console=ttyAM0 root=/dev/mmcblk0p1 rootwait

filesize=1ec740

fileaddr=2000000

gatewayip=192.168.3.1

netmask=255.255.255.0

ipaddr=192.168.99.57

serverip=192.168.99.32


Environment size: 498/131067 bytes

SIM.ONE>

Any suggestions?  :)

Thanks
Paul

Martin Guy

unread,
Apr 30, 2010, 6:11:18 PM4/30/10
to si...@googlegroups.com
On 4/30/10, Praetorian <praeto...@gmail.com> wrote:
> I changed the bootcmd line as you suggested, but I get a different error
> now:
> ---
> SIM.ONE> set bootcmd "tftp c02000000; bootm"
>
> Unknown command 'bootm"' - try 'help'
>
> SIM.ONE>
> ---
>
> If I change it to a single quote, it accepts it, but still will not boot.

Ah, thanks for the correction. I've fixed that in the wiki too now!

> SIM.ONE> boot
>
> TFTP from server 192.168.99.32; our IP address is 192.168.99.57
>
> Filename 'uImage'.
>
> Load address: 0x2000000

There is no RAM at 02000000 so it is booting into a vacuum :)
it needs to go to c0200000

> ## Booting image at 02000000 ...
>
> Bad Magic Number

> SIM.ONE> set bootcmd "tftp c02000000; bootm"

> I tried the commands that are documented on the link to boot the root
> filesystem before, and it does not work either. It still downloads the
> uImage, and produces a Bad Magic Number instead of actually hitting the SD
> card.

It's not booting linux kernel at all, so the SD card is further down
the road from there.
The "Bad magic number" means that the memory it's trying to execute
does not contain an executable image format - in this case there is
not even any RAM there!

> SIM.ONE> printenv

You have no bootcmd, which is what the "boot" command executes, and is
also what is done for an automatic boot.

> tftp=0xc0200000 uImage;bootm

this looks bogus, but is probably harmless.

> fileaddr=2000000

I think this is set by the tftp and used by bootm, rather than
defining where to load the image to. I guess if you had a kernel image
in ROM it would become useful.

Ok, I've got it. You have c02000000 instead of c0200000 so the 'c'
digit is overflowing leaving 02000000

M
Reply all
Reply to author
Forward
0 new messages