Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-28 Thread Robert Millan
On Thu, Sep 27, 2007 at 05:44:29PM +0200, Peter Stuge wrote: > On Thu, Sep 27, 2007 at 04:20:28PM +0200, Robert Millan wrote: > > I just wrote a small utility to set the appropiate bytes in > > linuxbios.rom. > > > > Any comments? > > I prefer the xxd trick. Note that I am exclusively working on

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-27 Thread Peter Stuge
On Thu, Sep 27, 2007 at 04:20:28PM +0200, Robert Millan wrote: > I just wrote a small utility to set the appropiate bytes in > linuxbios.rom. > > Any comments? I prefer the xxd trick. Note that I am exclusively working on systems where (I can make sure) xxd is available. //Peter -- linuxbios

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-27 Thread Robert Millan
On Wed, Sep 26, 2007 at 05:07:45PM -0400, Ward Vandewege wrote: > > I would like a way to change the MAC address for a rom image with some tool - > ideally as an option to flashrom, I guess. Keep in mind that there can be > multiple addresses on a board! I just wrote a small utility to set the ap

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-27 Thread Carl-Daniel Hailfinger
On 26.09.2007 23:07, Ward Vandewege wrote: > On Wed, Sep 26, 2007 at 05:02:33PM -0400, Tom Sylla wrote: >> On 9/26/07, Robert Millan <[EMAIL PROTECTED]> wrote: >>> unsigned long mac_pos; >>> mac_pos = 0xffd0; // refer to romstrap.inc and >>> romstrap.lds >>>

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-26 Thread Robert Millan
On Wed, Sep 26, 2007 at 05:25:07PM -0400, Tom Sylla wrote: > Mailed to soon, xxd does patching directly: > --- > Patch the date in the file xxd.1 >% echo '029: 3574 68' | xxd -r - xxd.1 >% xxd -s 0x28 -l 12 -c 12 xxd.1 >028: 3235 7468 204d 6179 2031 3939 25th May 19

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-26 Thread yhlu
> I would like a way to change the MAC address for a rom image with some tool - > ideally as an option to flashrom, I guess. Keep in mind that there can be > multiple addresses on a board! 1. use flashrom with exclude range to keep the old mac... 2. add some script to read out and mac, and flash l

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-26 Thread Tom Sylla
Mailed to soon, xxd does patching directly: --- Patch the date in the file xxd.1 % echo '029: 3574 68' | xxd -r - xxd.1 % xxd -s 0x28 -l 12 -c 12 xxd.1 028: 3235 7468 204d 6179 2031 3939 25th May 199 --- On 9/26/07, Ward Vandewege <[EMAIL PROTECTED]> wrote: > On Wed,

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-26 Thread Tom Sylla
On 9/26/07, Ward Vandewege <[EMAIL PROTECTED]> wrote: > I would like a way to change the MAC address for a rom image with some tool - > ideally as an option to flashrom, I guess. Keep in mind that there can be > multiple addresses on a board! There are many ways to do this in Linux-land. xxd->sed-

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-26 Thread Ward Vandewege
On Wed, Sep 26, 2007 at 05:02:33PM -0400, Tom Sylla wrote: > On 9/26/07, Robert Millan <[EMAIL PROTECTED]> wrote: > > unsigned long mac_pos; > > mac_pos = 0xffd0; // refer to romstrap.inc and > > romstrap.lds > > mac_l = readl(mac_pos) + nic_inde

Re: [LinuxBIOS] retrieving MAC from romstrap

2007-09-26 Thread Tom Sylla
On 9/26/07, Robert Millan <[EMAIL PROTECTED]> wrote: > unsigned long mac_pos; > mac_pos = 0xffd0; // refer to romstrap.inc and > romstrap.lds > mac_l = readl(mac_pos) + nic_index; > mac_h = readl(mac_pos + 4); > > and can't unders

[LinuxBIOS] retrieving MAC from romstrap

2007-09-26 Thread Robert Millan
Hi! I just run through this piece of code in southbridge/nvidia/ck804/ck804_nic.c, unsigned long mac_pos; mac_pos = 0xffd0; // refer to romstrap.inc and romstrap.lds mac_l = readl(mac_pos) + nic_index; mac_h = readl(mac_pos + 4)