[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Changing ethernet MAC for production (speeding up the process)
hoefle marco wrote:
> Hi Michal,
>>> Imagine if we need 100 or even more :-)
>>>
>>>
>>> The idea would be to get the u-boot image + u-boot configuration on the
>>> board via xmd/JTAG and the rest via tftp. If possible everything should
>>> be automated.
>> yes, it is possible to do it. Passing MAC via command line to board from u-boot
>> and u-boot stores mac in variables.
>> There is also way when you store mac in any (spi/i2c/normal)flash and your bootloader/kernel
>> will read this value from this place.
>>
>> All options are possible.
>> You have to connect every board to your PC, JTAG + serial, eth if is avaliable(just for speedup)
>> and load u-boot, kernel, fs, setting to your board, everything what you need and after "beep"
>> un-plug and plug new board.
>> It is recommended to do running tests of course.
>>
> Hello Michal,
> the system is partitioned that way:
> mtdblock0 : FPGA config data
> mtdblock1 : U-Boot
> mtdblock2 : U-Boot env
> mtdblock3 : config (I am wondering what config data is stored in there)
> mtdblock4 : image
> mtdblock5 : jffs2 data
>
>
> looking at mtdblock2:
> # cat /dev/mtdblock2
> ��sJbaudrate=115200ethaddr=00:00:AF:FE:00:02clobstart=0xa0000000netstart...
>
> So I thought I could use this u-boot environment data as a "golden
> image". Thus I copied its content to my PC and edited ethaddr with a hex
> editor.
> Afterward I copied the environment data with xmd back to the flash.
> Booting the board results in a CRC error:
>
> ETHERNET: MAC:00:00:AF:FE:00:02
>
> *** Warning - bad CRC, using default environment
>
> u-boot seems to have a "backup" environment compiled into by the
> petalogix tools.
u-boot store default environment which were setup in compilation time.
Look at denx site there you can find how to upgrade u-boot variables from linux
and maybe some useful utilities.
>
> I suppose I need to find out how the CRC is composed or even better how
> the whole environment partition needs to be generated.
> When ethaddr and macaddr are set correctly the ethernet lite driver
> should use the "new" mac address, right?
It seems to me very complicated to do and I haven't seen a reason why to do it
this way.
If you want to be really sure that nothing happen with you flash/u-boot variables
you have to change that environment which are in u-boot yourself. For this
you could be able to use any hex editor because there shouldn't be a crc.
Just find a location in u-boot and change before running.
If you like your idea just change variable - which should works well too -
you can use script which setup it through serial interface and save variables
to flash. And as I wrote in my previous email you can run all checking mechanism to
be sure that your custom hw has no any hw problem. Do it automatically is only one
way how to do it. I am using/testing/developing one automated testing framework for
it and works really well.
Cheers,
Michal
>
> Cheers,
> Marco
>
>>>
>>>
>>> ___________________________
>>> microblaze-uclinux mailing list
>>> microblaze-uclinux@xxxxxxxxxxxxxx
>>> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
>>> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>>>
>>>
>
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>
>
--
Michal Simek, Ing. (M.Eng)
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/