2008-04-01 10:26:26     add envrironments in u-boot source

Document created by Aaronwu Employee on Sep 17, 2013
Version 1Show Document
  • View in full screen mode

2008-04-01 10:26:26     add envrironments in u-boot source

Hadi Boulfelfel (FRANCE)

Message: 53457    Hi,

 

I'm trying to add some environments to my u-boot (1.1.6 2008R1) but in the source and then build it, can you tell me how to do it please?

 

regards,

Hadi

TranslateQuoteReplyEditDelete

 

 

2008-04-01 11:07:49     Re: add envrironments in u-boot source

Mike Frysinger (UNITED STATES)

Message: 53465    please consult the toplevel README.  it documents CONFIG_EXTRA_ENV_SETTINGS which goes into your board config.

QuoteReplyEditDelete

 

 

2008-04-01 11:38:09     Re: add envrironments in u-boot source

Hadi Boulfelfel (FRANCE)

Message: 53467    thank you Mike, but its doesn't add anything to my .ldr file.

i changed it like this:

 

#define CONFIG_EXTRA_ENV_SETTINGS \

    "bootkernel=bootm\0"\

    NETWORK_ENV_SETTINGS \

    "bootkernel=bootm\0"

    /*"flashboot=bootm 0x20100000\0"*/

 

and i get:

 

bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

bootcmd=run bootkernel

bootdelay=5

baudrate=57600

loads_echo=1

ipaddr=192.168.0.15

serverip=192.168.0.20

autoload=no

rootpath=/romfs

gatewayip=192.168.0.1

netmask=255.255.255.0

loadaddr=0x1000000

ubootfile=u-boot.ldr

update=tftp $(loadaddr) $(ubootfile);eeprom write $(loadaddr) 0x0 $(filesize)

addip=set bootargs $(bootargs) ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask):

$(hostname):eth0:off

ramargs=set bootargs root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600

ramboot=tftp $(loadaddr) uImage;run ramargs;run addip;bootm

nfsargs=set bootargs root=/dev/nfs rw nfsroot=$(serverip):$(rootpath),tcp,nfsver

s=3

nfsboot=tftp $(loadaddr) vmImage;run nfsargs;run addip;bootm

flashboot=bootm 0x20100000

ethaddr=1A:0B:F9:BB:8B:8A

stdin=serial

stdout=serial

stderr=serial

 

without my "bootkernel" environment, but i still have the "flashboot " which i made in comment.

 

i know that there are some configs in environment.c and env_common.c but  i don't know how to change them.

TranslateQuoteReplyEditDelete

 

 

2008-04-01 11:58:45     Re: add envrironments in u-boot source

Mike Frysinger (UNITED STATES)

Message: 53470    do a `make clean` first

QuoteReplyEditDelete

 

 

2008-04-01 12:06:45     Re: add envrironments in u-boot source

Hadi Boulfelfel (FRANCE)

Message: 53471    think you mike you are really expert, you know where to find to prob.

 

i want to suggest something;  can we get an hierarchy of the u-boot source in order to have an idea of where to go when we want to do something specific? just like a map!!

 

thank you again.

hadi

TranslateQuoteReplyEditDelete

 

 

2008-04-01 12:20:24     Re: add envrironments in u-boot source

Mike Frysinger (UNITED STATES)

Message: 53472    as you saying that fixed things for you ?

 

i'll see about mapping out the source tree ... but generally speaking, all the changes go into your board config or board directory, and all the documentation is in the toplevel README

QuoteReplyEditDelete

 

 

2008-04-01 12:46:59     Re: add envrironments in u-boot source

Hadi Boulfelfel (FRANCE)

Message: 53474    yes it works now all perfect, thank you Mike

TranslateQuoteReplyEditDelete

 

 

2008-04-01 14:21:40     Re: add envrironments in u-boot source

Mike Frysinger (UNITED STATES)

Message: 53477    actually, there is a map of the source tree already in the toplevel README

 

what more were you looking for ?

QuoteReplyEditDelete

 

 

2008-04-02 10:28:17     Re: add envrironments in u-boot source

Hadi Boulfelfel (FRANCE)

Message: 53543    Hi,

 

I'm looking for a map which shows where u-boot begins where it tests and when and where it looks for drivers...... For exemple i'm using a custom BF537 board with an SPI Flash (16MB) and no parallel Flash. I want to stock a MAC address on my SPI flash and configure u-boot source so it looks for my MAC in the flash and load it , and the same for µClinux. How can I do that? so if i know the process of booting u-boot i'll go to the right file and change it. but because i don't know what u-boot ask when it boots i can't change touch any file without your help.

 

Thank you,

TranslateQuoteReplyEditDelete

 

 

2008-04-02 10:50:01     Re: add envrironments in u-boot source

Mike Frysinger (UNITED STATES)

Message: 53546    the wiki covers the files that are specific to boards:

http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot

 

you would stick the code to read your MAC address in your boards file.  consult the other BF537 boards to see how they do it.

 

same goes for Linux.

QuoteReplyEditDelete

 

 

2008-04-02 11:04:33     Re: add envrironments in u-boot source

Hadi Boulfelfel (FRANCE)

Message: 53552    I juts read : http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:porting

 

ok i understand that i must change code in  "board_c_file" but how to read SPI flash with eeprom read function or any other method?

 

Thanks

TranslateQuoteReplyEditDelete

 

 

2008-04-02 11:45:17     Re: add envrironments in u-boot source

Mike Frysinger (UNITED STATES)

Message: 53556    you will have to dig into the respective drivers to figure out how to call the function in question

 

the eeprom interface is very simple ... you can see the functions in the spi_flash.c driver

QuoteReplyEditDelete

 

 

2008-04-02 12:44:03     Re: add envrironments in u-boot source

Hadi Boulfelfel (FRANCE)

Message: 53557    ok thank you Mike, i'll check this file and tell you

Attachments

    Outcomes