Building U-Boot image with predefined environment

Discussion about U-Boot and the kernel.

Building U-Boot image with predefined environment

Postby trh178 » Thu Jul 05, 2012 1:08 pm

I am taking over a project originally done by somebody else and not documented at all. I am not very familiar with U-Boot in general, so I am effectively starting from scratch.

My current issue is this: I have a U-Boot image that I can load onto my board that, upon start, says it is autobooting and then immediately prompts the user for 'ethaddr'. After you give it an ethaddr, it will get an IP via dhcp and, using tftp, get the rest of the environment/kernel/filesystem from a local server. I cannot use this image anymore though. I had to make a slight change to the config file for U-Boot.

I have successfully rebuilt U-boot and flashed it onto the board. When it boots now though, it says it will autoboot in 3 seconds (instead of 1 previously), and then it fails autoboot because of a bad magic number and drops me into the UBoot> prompt. It does not prompt me for an 'ethaddr'. This leads me to believe that the previous image was built with a very basic predefined environment (e.g. 'do this if you dont have an ethaddr set, or else if you do then get an ip via dhcp, etc...). I know that after I get an IP address the board uses tftp to load the full environment because, along with a kernel.img and a filesystem.img, there is also a bootscript.img on the tftp server.

My lack of knowledge led me to only one solution. The first image that works right now must have been built with a basic environment script included? Is this possible? and if so, how do I do this? It seems like if I can get my NEW image to act as the old one on startup, then once it HAS an ip address, the full environment can be loaded via tftp like before.

Thanks ahead of time for the help,

-Todd
trh178
 
Posts: 2
Joined: Thu Jul 05, 2012 12:51 pm

Re: Building U-Boot image with predefined environment

Postby WarheadsSE » Thu Jul 05, 2012 1:55 pm

There are ways, but:
- Device?
- uBoot Version?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Building U-Boot image with predefined environment

Postby trh178 » Thu Jul 05, 2012 3:11 pm

Device:
- The processor on the board is a TI DaVinci DM6441. The reason for the changes and rebuild was a switch of NAND chips (the first one went end of life). So just in case that matters too, the old chip was a Samsung K9F1208R0C and the new chip is a Micron MT29F1G08ABBDAH4-IT:D

U-Boot Version:
- This is actually another piece of the puzzle I dont understand. From the SVN logs, it would appear that I am building from the proper directory (there are a few version of uboot downloaded on the host machine apparently). However, the OLD image (the one we have been using, with the NAND chip that went end of life) reports its U-Boot version as "U-Boot 2008.10-00389-g2145188-dirty (Oct 15 2009 - 10:01:07)". The new image I built (after making the changes for the new NAND chip; supposedly from the same directory as the first) reports its version as just "U-Boot 1.3.1 (Jul 02 2012 - 12:36:24)".
trh178
 
Posts: 2
Joined: Thu Jul 05, 2012 12:51 pm


Return to U-Boot/Kernel

Who is online

Users browsing this forum: No registered users and 4 guests