Building my own linux stamp from scratch, will not boot linux

219 views
Skip to first unread message

Donna

unread,
Oct 3, 2011, 3:47:48 AM10/3/11
to linuxstamp
Hey anyone, I am new to this group. I just finished building my own
linux stamp board, very few mods. i used the linux stamp 1 design with
just some minor changes that were described in this group.

The good news is I have it working up to a point. It passes the memory
test in the darrell's loader. Also, the ethernet connection is
working. So I used the tftp to download the uImage_fs to ram and tried
to boot it. No luck. I have also tried various other permutations of
this (loading the images into flash etc) with the same result.

Can anyone spot what I am doing wrong? I have not set up NFS but it
does not seem like it is getting that far anyhow.

Any help would be greatly appreciated.


Darrell's loader - Thanks to the u-boot project
Version 1.0. Build Jul 29 2007 18:48:42
RAM:32MB

1: Upload Darrell's loader to Dataflash
2: Upload u-boot to Dataflash
3: Upload Kernel to Dataflash
4: Start u-boot
5: Upload Filesystem image
6: Memory test
DataFlash:AT45DB642
Dataflash read successful: Starting U-boot


U-Boot 1.1.6 (Oct 22 2007 - 10:35:14)

DRAM: 32 MB
Atmel: Flash: 0 kB
DataFlash:AT45DB642
Nb pages: 8192
Page Size: 1056
Size= 8650752 bytes
Logical address: 0xC0000000
Area 0: C0000000 to C000317F (RO) Darrell loader
Area 1: C0003180 to C001F73F (RO) U-boot
Area 2: C001F740 to C002183F Environment
Area 3: C0021840 to C01ACFFF Kernel
Area 4: C01AD000 to C083FFFF (RO) Filesystem
In: serial
Out: serial
Err: serial
I am checking if it is connected
Hit any key to stop autoboot: 0
ecb_at91> printenv
bootcmd=bootm C0021840
bootdelay=2
baudrate=115200
ethaddr=00:00:00:00:00:5b
rootpath="/home/at91/rootfs"
netmask=255.255.255.0
loadaddr=0x20200000
ipaddr=192.168.1.2
serverip=192.168.1.5
bootfile=uImage
bootargs=mem=32M root=/dev/mmcblk0p1 console=ttyS0,115200n8
rootdelay=1
stdin=serial
stdout=serial
stderr=serial

Environment size: 317/8188 bytes
ecb_at91> setenv bootargs mem=32M root=fe01 fstype=ext3
console=ttyS0,115200n8 rootdelay=1
ecb_at91> tftpboot 20800000 uImage_fs
I am checking if it is connected
TFTP from server 192.168.1.5; our IP address is 192.168.1.2
Filename 'uImage_fs'.
Load address: 0x20800000
Loading:
#################################################################

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#################################################################
#####
done
Bytes transferred = 5347332 (519804 hex)
ecb_at91> bootm 20800000
## Booting image at 20800000 ...
Image Name: Linux-2.6.24.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5347268 Bytes = 5.1 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...

Miguel Wisintainer

unread,
Oct 3, 2011, 10:30:15 AM10/3/11
to linux...@googlegroups.com
If someone is interested...i did a VGA + PS2 interface do LINUX STAMP
http://www.basic4ever.com/pdf/VgaManual.pdf
Miguel
 

Paul Thomas

unread,
Oct 3, 2011, 10:34:35 AM10/3/11
to linux...@googlegroups.com
Yeah, that should work. Did you try the other uImage_X files? You
should at least get some initial debugging stuff telling you what's
going on unless something is going very wrong very early in the kernel
init, but a working u-boot should test most of the hardware.

I think your very close.

thanks,
Paul

> --
> You received this message because you are subscribed to the Google Groups "linuxstamp" group.
> To post to this group, send email to linux...@googlegroups.com.
> To unsubscribe from this group, send email to linuxstamp+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linuxstamp?hl=en.
>
>

Michael

unread,
Oct 3, 2011, 10:53:42 AM10/3/11
to linuxstamp
How confident are you that the Linux image itself is built correctly
for this target? I have seen this symptom when the Machine ID of the
Linux image does not match the one passed to the Linux kernel by the
loader (i.e. Linux thinks it is being loaded into the wrong target
environment).

- Michael

Paul Thomas

unread,
Oct 3, 2011, 11:30:54 AM10/3/11
to linux...@googlegroups.com
I've seen that too, but there is normally a message saying as much.
It's worth checking, were you using the u-boot from the Linuxstamp ftp
site?

thanks,
Paul

Donna

unread,
Oct 3, 2011, 5:05:17 PM10/3/11
to linuxstamp
Paul and Michael,

Thank you for the response, it does feel like an am getting close :)
I am a complete newb when it comes to embedded linux, but hey, the
best way to learn is to just jump in right ?

Anyhow, I got the loader.bin, u-boot.bin and uImage and uImage_fs from
the http://linuxstamp.budgetdedicated.com/ ftp site that was mentioned
int he http://www.opencircuits.com/Linuxstamp site.

I have not tried building a kernel yet, my thinking was I wanted to
see if I could get the board to boot first. I tried tftping a number
of the images from that budgetdedicated ftp site but all did the same
thing and just hang right after it says "Uncompressing Linux... "
couple of times it said data abort, resetting cpu after that.

One thing I was wondering about is when I run mkimage -l on the uImage
file I get this:
Image Name: Linux-2.6.25.6
Created: Wed Jul 23 23:31:01 2008
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1962420 Bytes = 1916.43 kB = 1.87 MB
Load Address: 0x20008000
Entry Point: 0x20008000

it says "ARM Linux Kernel Image (uncompressed)" but I get that message
"Uncompressing Linux... ". Is it possible it thinks the image is
compressed and tries to uncompress when it should not or something?

Maybe that bootarg is no good ? have you booted with that uImage_fs?
It seems like the bootarg for that should be something like
bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw

but maybe there also needs to be a initrd

Again, I do not know what I am doing. I really appreciate the help !
> > For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.- Hide quoted text -
>
> - Show quoted text -

Donna

unread,
Oct 4, 2011, 12:28:34 AM10/4/11
to linuxstamp
OK, I get it, that is just a flag that says if the content is
compressed or not an if it is it calls gunzip. So, I am stumped.


On Oct 3, 2:05 pm, Donna <donna.pol...@gmail.com> wrote:
> Paul and Michael,
>
> Thank you for the response, it does feel like an am getting close :)
> I am a complete newb when it comes to embedded linux, but hey, the
> best way to learn is to just jump in right ?
>
> Anyhow, I got the loader.bin, u-boot.bin and uImage and uImage_fs from
> thehttp://linuxstamp.budgetdedicated.com/ftp site that was mentioned
> > > For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -

Donna

unread,
Oct 4, 2011, 3:10:09 AM10/4/11
to linuxstamp
On thing I noticed is that I had copied the commands from the
http://www.opencircuits.com/Linuxstamp web site but they do not match
up I dont think, it showed
tftpboot 20800000 uImage
bootm 20800000

But I think it should be
tftpboot 20008000 uImage
bootm 20008000

I tried it and got this:

ecb_at91> printenv
bootcmd=bootm C0021840
bootdelay=2
baudrate=115200
ethaddr=00:00:00:00:00:5b
rootpath="/home/at91/rootfs"
netmask=255.255.255.0
loadaddr=0x20200000
ipaddr=192.168.1.2
serverip=192.168.1.5
bootfile=uImage
stdin=serial
stdout=serial
stderr=serial
bootargs=mem=32M root=/dev/mmcblk0p1 console=ttyS0,115200n8
rootdelay=5

Environment size: 317/8188 bytes
ecb_at91> tftpboot 20008000 uImage_20090315
I am checking if it is connected
TFTP from server 192.168.1.5; our IP address is 192.168.1.2
Filename 'uImage_20090315'.
Load address: 0x20008000
Loading:
#################################################################

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

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

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

#################################################################
################################
done
Bytes transferred = 1826360 (1bde38 hex)
ecb_at91> bootm 20008000
## Booting image at 20008000 ...
Image Name: Linux-2.6.28.3
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1826296 Bytes = 1.7 MB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
XIP Kernel Image ... OK

Starting kernel ...

undefined instruction
Resetting CPU ...

Мал Скрылёв

unread,
Oct 4, 2011, 4:05:22 AM10/4/11
to linux...@googlegroups.com
2011/10/3 Donna <donna....@gmail.com>:
...


How you've compiled the linux kernel. pls. give the compilation string ///


--
Малъ Зануда, Скрылёвъ сынъ

Flavio Castro Alves Filho

unread,
Oct 4, 2011, 10:36:21 AM10/4/11
to linux...@googlegroups.com
XIP Kernel?

Maybe that's it, isn't it? It is not supposed to be a XIP Kernel, I think.

Best regards,

Flavio

2011/10/4 Мал Скрылёв <3ah...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "linuxstamp" group.
> To post to this group, send email to linux...@googlegroups.com.
> To unsubscribe from this group, send email to linuxstamp+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/linuxstamp?hl=en.
>
>

--
Flavio de Castro Alves Filho

flavio...@gmail.com
LinkedIn profile: www.linkedin.com/in/flaviocastroalves

Paul Thomas

unread,
Oct 4, 2011, 12:41:19 PM10/4/11
to linux...@googlegroups.com
Yeah, that's probably It.

Try just the u-boot image on the ftp site instead of one you've built.

thanks,
Paul

Donna

unread,
Oct 4, 2011, 4:59:18 PM10/4/11
to linuxstamp
I was not compiling, I was just using one that I downloaded off that
budgetdedicated ftp site, uImage, uImage_fs, and a couple of those I
tried out.

On Oct 4, 1:05 am, Мал Скрылёв <3ah...@gmail.com> wrote:
> 2011/10/3 Donna <donna.pol...@gmail.com>:

Donna

unread,
Oct 4, 2011, 4:59:49 PM10/4/11
to linuxstamp
ya, I guess that means execute in place, that was an uncompressed
kernel I tried.

On Oct 4, 7:36 am, Flavio Castro Alves Filho <flavio.al...@gmail.com>
wrote:
> XIP Kernel?
>
> Maybe that's it, isn't it? It is not supposed to be a XIP Kernel, I think.
>
> Best regards,
>
> Flavio
>
> 2011/10/4 Мал Скрылёв <3ah...@gmail.com>:
>
>
>
>
>
> > 2011/10/3 Donna <donna.pol...@gmail.com>:
> > ...
>
> > How you've compiled the linux kernel. pls. give the compilation string ///
>
> > --
> > Малъ Зануда, Скрылёвъ сынъ
>
> > --
> > You received this message because you are subscribed to the Google Groups "linuxstamp" group.
> > To post to this group, send email to linux...@googlegroups.com.
> > To unsubscribe from this group, send email to linuxstamp+...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.
>
> --
> Flavio de Castro Alves Filho
>
> flavio.al...@gmail.com
> LinkedIn profile:www.linkedin.com/in/flaviocastroalves- Hide quoted text -

Donna

unread,
Oct 4, 2011, 5:05:36 PM10/4/11
to linuxstamp
Paul,

I tried all the uImages I could find on that ftp site, none worked. I
was just doing the tftpboot 20800000 uImage; bootm 20800000 commands
but I have not set up the NFS, do you have to have nfs on for it to
work? I was thinking that it should boot with tftpboot 20800000
uImage_fs; bootm 20800000 since that one has a fs, but maybe you need
to have the ram disk address specified?

I am going to try to get the NFS working tonight and see if that
helps. I can not think of a hardware reason why u-boot would be
working and it still wont boot, uboot runs in sdram I think? so that
must be working right, and the Ethernet port is working since the tftp
is working, the debug port is obviously working. I also tried
monitoring the USART0 port thinking that was the ttyS0 and might be
the console.

hmmm....

On Oct 4, 9:41 am, Paul Thomas <pthomas8...@gmail.com> wrote:
> Yeah, that's probably It.
>
> Try just the u-boot image on the ftp site instead of one you've built.
>
> thanks,
> Paul
>
> On Tue, Oct 4, 2011 at 7:36 AM, Flavio Castro Alves Filho
>
>
>
> <flavio.al...@gmail.com> wrote:
> > XIP Kernel?
>
> > Maybe that's it, isn't it? It is not supposed to be a XIP Kernel, I think.
>
> > Best regards,
>
> > Flavio
>
> > 2011/10/4 Мал Скрылёв <3ah...@gmail.com>:
> >> 2011/10/3 Donna <donna.pol...@gmail.com>:
> >> ...
>
> >> How you've compiled the linux kernel. pls. give the compilation string ///
>
> >> --
> >> Малъ Зануда, Скрылёвъ сынъ
>
> >> --
> >> You received this message because you are subscribed to the Google Groups "linuxstamp" group.
> >> To post to this group, send email to linux...@googlegroups.com.
> >> To unsubscribe from this group, send email to linuxstamp+...@googlegroups.com.
> >> For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.
>
> > --
> > Flavio de Castro Alves Filho
>
> > flavio.al...@gmail.com
> > LinkedIn profile:www.linkedin.com/in/flaviocastroalves
>
> > --
> > You received this message because you are subscribed to the Google Groups "linuxstamp" group.
> > To post to this group, send email to linux...@googlegroups.com.
> > To unsubscribe from this group, send email to linuxstamp+...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.- Hide quoted text -

Paul Thomas

unread,
Oct 4, 2011, 5:11:08 PM10/4/11
to linux...@googlegroups.com
The kenel isn't the problem u-boot is the problem I think.

-Paul

Donna

unread,
Oct 4, 2011, 10:37:49 PM10/4/11
to linuxstamp
Well, let the drums roll and the trumpets blair, it works !!!

So the problem turned out to be hardware related after all, what a
dope I am, I left off a resistor. The pull up resistor on the NTRST
pin, which is the reset pin for the JTAG port. My theory here is that
the uboot came up because I think it does not kick on the PLL, I think
the kernel does that, so maybe when the kernel did that the vcore
dropped and put it into jtag mode?

But putting that resistor in cleared it right up, the resistor is on
the back of my board so, easy to miss (or at least that is going to be
my excuse).

THANK YOU, THANK YOU, THANK YOU to the group, you guys are great. I
will monitor the group as I continue my quest here. Maybe my learnings
can be paid forward :)
> >> > For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.-Hide quoted text -

Donna

unread,
Oct 5, 2011, 1:03:51 AM10/5/11
to linuxstamp
One last thing, I think also that part of it was that vcore was not
stable enough because I skimped and used a 22uf to save space ont he
1.8V supply, I relented and managed to squeeze a 100uf on in it's
place, that helps too.
> > >> > For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.-Hidequoted text -
>
> > >> - Show quoted text -
>
> > > --
> > > You received this message because you are subscribed to the Google Groups "linuxstamp" group.
> > > To post to this group, send email to linux...@googlegroups.com.
> > > To unsubscribe from this group, send email to linuxstamp+...@googlegroups.com.
> > > For more options, visit this group athttp://groups.google.com/group/linuxstamp?hl=en.-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages