
In message 200709261025129335711@163.com you wrote:
I have tested the autoscr command and found that autoscr can't execute script in u-boot 1.2.0. The steps follow here:
- Generate autos.img
- echo "printenv serverip" >>test.txt
Note that you *append* to "test.txt" here, so you probably already have garbage in that file... ?
- mkimage
[frisky@FC6 test]$ mkimage -A ppc -O linux -T script -C none -a 0 -e 0 -n "auto script example" -d test.txt autos.img && rm -rf /tftpboot/coreblade/autos.img && cp autos.img /tftpboot/coreblade/ Image Name: auto script example Created: Wed Sep 26 10:17:46 2007 Image Type: PowerPC Linux Script (uncompressed) Data Size: 27 Bytes = 0.03 kB = 0.00 MB Load Address: 0x00000000 Entry Point: 0x00000000 Contents: Image 0: 19 Bytes = 0 kB = 0 MB
This looks wrong to me.
If you execute the commands above with an empty/nonexisting file "test.txt", the result should be:
-> ls -l test.txt -rw-rw-r-- 1 wd wd 18 Sep 26 08:44 test.txt
i.e. the file should be 18 bytes, not 19 as in your case.
It seems you already had one byte of garbage in "test.txt"
- Run it!!
coreblade => autoscr 200000 ## Executing script at 00200000 " not definedrverip
- But I can see the serverip defined.
coreblade => printe serverip serverip=10.3.8.66
I don't know what's the problem. Could you please help me? Thank you very much!
This works fine for me:
=> md 200000 00200000: 27051956 321bc087 46f9ffe1 0000001a '..V2...F....... 00200010: 00000000 00000000 e68800bd 05070600 ................ 00200020: 6175746f 20736372 69707420 6578616d auto script exam 00200030: 706c6500 00000000 00000000 00000000 ple............. 00200040: 00000012 00000000 7072696e 74656e76 ........printenv 00200050: 20736572 76657269 700a0000 00000000 serverip....... 00200060: 00000000 00000000 00000000 00000000 ................ 00200070: 00000000 00000000 00000000 00000000 ................ 00200080: 00000000 00000000 00000000 00000000 ................ ... => imi 200000
## Checking Image at 00200000 ... Image Name: auto script example Image Type: PowerPC Linux Script (uncompressed) Data Size: 26 Bytes = 0 kB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK => autoscr 200000 ## Executing script at 00200000 serverip=192.168.1.1 =>
I thing what you see is a GIGO effect (garbage in, garbage out)...
Best regards,
Wolfgang Denk