TOP
SSV SOFTWARE SYSTEMS REGISTER  REGISTER
Log in to check your private messages  Log in to check your private messages
START FAQ SEARCH MITGLIEDER PROFILE  Log in 
SSV-Forum
U-BOOT Clarifications & Linux version 2.4.27-vrs1-ssv1

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9200
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
wildpossum



Joined: 14 Aug 2006
Posts: 10
Location: Sydney AUSTRALIA

PostPosted: 10.06.2007, 05:34    Post subject: U-BOOT Clarifications & Linux version 2.4.27-vrs1-ssv1 Reply with quote

Hi All. I am somewhat new to this forum.

I have problem(s) in trying to setup development desk(s) with DNP9200's & DHCP, tftp, boop and nfs connectivity.

U-Boot 1.1.2 (Dec 14 2005 - 13:12:14)
U-Boot code: 21F00000 -> 21F1666C BSS: -> 21F1AC44
RAM Configuration:
Bank #0: 20000000 32 MB
Flash: 16 MB
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0


Q1> I do "setenv serverip=192.168.3.9", "saveenv" and the serial console reports that changes where done, but as you can see not all environment variables are reported, no even the one just modified. Why is this so? I would have expected "printenv" to display all environmental variables to the user.

Example; is I re-do a "printenv" command and I don't see anything about serverip describtion at all. I have tied this on three DNP9200 boards (all same build/fireware releases) but unfortunately the same effect.

Now "printenv" doesn't reply with any settings for serverip on any boards.

U-Boot> setenv serverip=192.168.3.9
U-Boot> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash...\done
Protected 1 sectors

Environment size: 209/4092 bytes

U-Boot> printenv
bootdelay=3
baudrate=115200
netmask=255.255.255.0
bootfile="img-dnp9200"
bootargs=console=ttyS0,115200 root=/dev/ram
bootcmd=bootm 0x10040000
ethaddr=02:80:ad:20:b4:ed
stdin=serial
stdout=serial
stderr=serial

U-Boot> nfs
***ERROR: 'serverip' is not set.

I don't know if the following flash info helps, but here it is anyhow:

U-Boot> imls
Image at 10040000:
Image Name: LINUXIMAGE-DNP9200-SSV20051209
Image Type: ARM Linux Multi-File Image (uncompressed)
Data Size: 2603468 Bytes = 2.5 MB
Load Address: 20008000
Entry Point: 20008000
Contents:
Image 0: 1053292 Bytes = 1 MB
Image 1: 1550164 Bytes = 1.5 MB
Verifying Checksum ... OK

U-Boot> iminfo
## Checking Image at 21000000 ...
Bad Magic Number

Note the above Bad Magic Number - I suspect that this is a correct response as it is not the start of a elf program etc. - Is my understanding correct?

You will note that other setenv's (are not displayed by post 'printenv" either).
I have tried cold booting but this doesn't change any "printenv" output dialog.
I have looked at the uboot source without seeing why this should be so.
Any know problems here? Any suggestions ?

I have been able to set each DNP9200's "ipaddress" my using "/sbin/ipaddree" and would very much appreciate if you could post a copy of its source-code so that I (and others) could build utilites to modify other on-the-fly uboot variables.

-------------

Q2> Given:

U-Boot> protect
Usage:
protect - enable or disable FLASH write protection

What is the correct parameter to pass to the U-Boot CLI?

I have tried "protect enable","protect 0" &
"protect disable", "protect 1", all don't seem to be acceptable by the CLI.

Is this a known issue?

What could I have done incorrectly?

-------------

Q3> I am trying to get all the DNP9200's targets running off my multi-nic server (networks 192.168.X.0 where X = [0..3]). Dhcpd and nfsserver are operational and have been tested with a laptop to ensure conformance. However, I am unable to get any of the DNP9200 to remotely boot the /tfpt/img-dnp9200. I suspect that and answer to my Q1 is the issue, but just thought I would ask if there are any other known issues (I have searched the forums - but my German language is very elementary - Apologies).

So course trying to do "nfs" give the return error:

This is getting really frustrating.

-------------

NB: I am using the newly released (May 2007) Pentice Hall book "Embedded Linux Primer" by Christopher Halliman - ISBN-0131679848 which is a really good book IMHO.
I have been a Linux small time developer for some 8+ years. I especially like the books in-depth discussion on MTD. Something I have not had much to do with over the years, but now need a strong understanding of.


Thanks for your time.

Crying or Very sad
_________________
Cheers. Grahame
Back to top
View user's profile Send private message
ssc



Joined: 05 May 2006
Posts: 36

PostPosted: 11.06.2007, 13:14    Post subject: Reply with quote

Hello Grahame,

let me try to answer your questions and end your frustration.
First of all there's an excellent online manual for the u-boot bootloader at:
http://www.denx.de/wiki/view/DULG/Manual

Although it is written for a different platform it might clear up some issues and explain the syntax of the u-boot commandline interface.

Quote:
Q1> I do "setenv serverip=192.168.3.9", "saveenv" and the serial console reports that changes where done, but as you can see not all environment variables are reported, no even the one just modified. Why is this so? I would have expected "printenv" to display all environmental variables to the user.


You have to type:
Code:

U-Boot> setenv serverip 192.168.3.9
U-Boot> saveenv

Afterwards printenv command should print everything correctly.

Quote:

U-Boot> iminfo
## Checking Image at 21000000 ...
Bad Magic Number

Note the above Bad Magic Number - I suspect that this is a correct response as it is not the start of a elf program etc. - Is my understanding correct?

No!
You tried to check a none existing image in ram (have a look at the memory location iminfo tries to check for an image at 0x21000000).
Try the iminfo command after having downloaded an image from a tftp server into ram.
Then it will give you the same result as imls does.

Quote:

I have been able to set each DNP9200's "ipaddress" my using "/sbin/ipaddree" and would very much appreciate if you could post a copy of its source-code so that I (and others) could build utilites to modify other on-the-fly uboot variables.

Of course we will give you the source code of ipaddree. Just send me an e-mail with subject ipaddree to:
ssc@ist1.de
But let me point out something about the function of ipaddree in general.
The linux system and u-boot use different storage locations for their IP adresses.
Ipaddree is designed to work within linux and uses a part of flash memory that is not compatible to the u-boot configuration block.
We decided to do so, because we tried to keep it simple.
U-boot uses a CRC check method for the configuration block, to make sure everything is fine.
If you modify this block with another piece of software (ipaddree) without using the u-boot internal CRC check the configuration will be unusable.

Quote:

Q2> Given:

U-Boot> protect
Usage:
protect - enable or disable FLASH write protection

What is the correct parameter to pass to the U-Boot CLI?

Have a look in the online manual mentioned above!
To make it easy you might use:

Code:

U-Boot> protect off all


Quote:

Q3> I am trying to get all the DNP9200's targets running off my multi-nic server (networks 192.168.X.0 where X = [0..3]). Dhcpd and nfsserver are operational and have been tested with a laptop to ensure conformance. However, I am unable to get any of the DNP9200 to remotely boot the /tfpt/img-dnp9200. I suspect that and answer to my Q1 is the issue, but just thought I would ask if there are any other known issues (I have searched the forums - but my German language is very elementary - Apologies).

I personaly never tried using a NFS server for booting.
We only tested remote booting using a tftp command script and a tftp-server running on the host system. This will work!

Best Regards,

ssc
Back to top
View user's profile Send private message
wildpossum



Joined: 14 Aug 2006
Posts: 10
Location: Sydney AUSTRALIA

PostPosted: 13.06.2007, 03:59    Post subject: U-Boot Clarifications. Reply with quote

Thanks for your detailed reply SSC Very Happy

The only environmental variable I don't seem to be able to save in flash is "ipaddr".
It keeps being overwritten by something else so it is NULL and when I do a "tftpboot" it always reply that "ipaddr" is not set. I can live with this as it is only a little annoying, but it would make auto-tftpboot much more easier if it was save correctly in flash.

"tftboot" works wonderfully. No problems.
I am able to upload the latest kernel and "bootm" correctly.

On "nfsboot" it is another issue, not working 100% yet but I need to do more investigations. Even though I have been able to check and confirm my dhcpd & dhcpd.config setup is working well via a laptop, DNP9200 has issues which are not apparent unfortunately. The reason each DNP9200 has a different LAN, is so developer(s)/student(s) can play to their heart content without me being concerned that they may upset other internal net(s)/system(s).

Any further suggestions would be most appreciated.

Thanks.
Grahame

Code:

option domain-name "wildpossum.org";
option domain-name-servers 192.168.1.1, 203.0.178.191;
option routers 192.168.1.1;
option ntp-servers ntp.mq.edu.au;
option lpr-servers 192.168.1.2;
ddns-update-style interim;
allow bootp;
ignore client-updates;
default-lease-time 14400;

subnet  192.168.1.0 netmask 255.255.255.0 {
  option broadcast-address 192.168.1.255;
  range 192.168.1.10 192.168.1.200;
  default-lease-time 14400;
  max-lease-time 172800;
  group {
    host embedded1 {
      option root-path "/tftp/";
      hardware ethernet 02:80:AD:20:B4:ED;
      fixed-address 192.168.1.20;
      filename "img-dnp9200";
    }
  }
}

subnet  192.168.2.0 netmask 255.255.255.0 {
  option broadcast-address 192.168.2.255;
  range 192.168.2.10 192.168.2.230;
  default-lease-time 14400;
  max-lease-time 172800;
  group {
    host embedded2 {
      option root-path "/tftp/";
      hardware ethernet 02:80:AD:20:B4:E2;
      fixed-address 192.168.2.20;
      filename "img-dnp9200";
    }
  }
}

subnet  192.168.3.0 netmask 255.255.255.0 {
  option broadcast-address 192.168.3.255;
  range 192.168.3.10 192.168.3.230;
  default-lease-time 14400;
  max-lease-time 172800;
  group {
    host embedded3 {
      option root-path "/tftp/";
      hardware ethernet 02:80:AD:20:B4:E0;
      fixed-address 192.168.3.20;
      filename "img-dnp9200";
    }
  }
}

subnet  192.168.170.0 netmask 255.255.255.0 {
  option broadcast-address 192.168.170.255;
  range 192.168.170.2 192.168.170.230;
  default-lease-time 14400;
  max-lease-time 172800;
  group {
    host embedded4 {
      option root-path "/tftp/";
      hardware ethernet 02:80:AD:20:B4:A2;
      fixed-address 192.168.170.20;
      filename "img-dnp9200";
    }
  }
}

subnet  172.16.45.0 netmask 255.255.255.0 {
  option broadcast-address 172.16.45.255;
  range 172.16.45.1 172.16.45.200;
  default-lease-time 14400;
  max-lease-time 172800;
  group {
    host embedded5 {
      option root-path "/tftp/";
      hardware ethernet 02:80:AD:20:B4:2D;
      fixed-address 172.16.45.20;
      filename "img-dnp9200";
    }
  }
}



_________________
Cheers. Grahame
Back to top
View user's profile Send private message
ssc



Joined: 05 May 2006
Posts: 36

PostPosted: 13.06.2007, 11:59    Post subject: Reply with quote

Hi Grahame,

unfortunately i got no useful suggestion for the nfs stuff at the moment, but let me help you with the u-boot settings:

Quote:

The only environmental variable I don't seem to be able to save in flash is "ipaddr".
It keeps being overwritten by something else so it is NULL and when I do a "tftpboot" it always reply that "ipaddr" is not set. I can live with this as it is only a little annoying, but it would make auto-tftpboot much more easier if it was save correctly in flash.


normally it won't be overwritten !?
Try this:
Code:

U-Boot> setenv ipaddr 192.168.3.9
U-Boot> saveenv


Just leave out the equals sign when you set a variable.
Nearly everthing could be stored as variable, though some names are reserved (e.g. ipaddr) and are used inside u-boot for special functions.

Check this out:
Code:

U-Boot> setenv grahame rocks
U-Boot> print

To reset (&delete) the variable:
Code:

U-Boot> setenv grahame
U-Boot> print


To make it permanent use saveenv command.

Regards,

ssc
Back to top
View user's profile Send private message
wildpossum



Joined: 14 Aug 2006
Posts: 10
Location: Sydney AUSTRALIA

PostPosted: 13.06.2007, 13:20    Post subject: U-BOOT Clarifications & Linux version 2.4.27-vrs1-ssv1 Reply with quote

OK, I have found what the issue was with my dhcpd.conf.

You can't have both a fixed IP address and a Host name for the same sub-group - It is an exclusive OR issue. Removing either but not both from the dhcpd.conf sub-group fixes the issue which I thought (unwisely) was a DNP9200 & u-boot dhcpcd handling issue.

I am not at my workstation currently, so I'll look at the "saveenv" issue tomorrow and NFS further tomorrow.

Thanks again from Australia. Laughing
_________________
Cheers. Grahame
Back to top
View user's profile Send private message
wildpossum



Joined: 14 Aug 2006
Posts: 10
Location: Sydney AUSTRALIA

PostPosted: 14.06.2007, 12:12    Post subject: U-BOOT Clarifications & Linux version 2.4.27-vrs1-ssv1 Reply with quote

All is OK with the setenv on u-boot now. Thanks.
_________________
Cheers. Grahame
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9200 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV SOFTWARE SYSTEMS

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2024 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015