GoFlex Home: can't set MAC, fw_printenv not working

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

GoFlex Home: can't set MAC, fw_printenv not working

Postby ishep » Wed Feb 01, 2012 4:33 pm

I'm a first-timer; just installed ALARM on my brand new 2TB GoFlex Home, after seeing how useless the stock firmware was! I followed the instructions at http://archlinuxarm.org/platforms/armv5/seagate-goflex-home to the letter, which did the job nicely, with one exception...

The last step says "Finally reboot and the system will change to its permanent MAC address and be ready for general use", but mine hasn't! Reading around, I've found this can be changed using fw_setenv, which I understand I should be able to do from the UBIT prompt by running /sbin/ubit_start in ALARM.

When I do that, despite having rebooted several times (including power-off at the switch), I get:
$this->bbcode_second_pass_code('', 'Entering UBIT environment
Current cached ethaddr value: 00:10:75:xx:xx:xx
You need to reboot once to let U-Boot set its default environment
before you update the ethaddr setting with this cached value.
UBIT v0.6 by peaslaker 2010.11-00125-ga21bcca')

I also tried /sbin/ubit_reboot, in case that did anything differently, but everything is the same after rebooting again.

If I try entering ethaddr 00:10:75:xx:xx:xx again at the ubit0-6 prompt, I get:
$this->bbcode_second_pass_code('', 'No valid U-Boot environment exists.
You need to reboot once to let U-Boot set its default environment
before the ethaddr setting can be updated, either directly or
with a cached value.

Cached ethaddr value set to: 00:10:75:xx:xx:xx')

...and if I try fw_printenv, I get
$this->bbcode_second_pass_code('', '
Too few good blocks within range
')

I feel like the answer must be staring me in the face and I'm just not getting it! Can anyone kindly shed any light on what might be wrong or what I can try?

Thanks,
Ian
ishep
 
Posts: 5
Joined: Wed Feb 01, 2012 11:40 am

Re: GoFlex Home: can't set MAC, fw_printenv not working

Postby ishep » Mon Feb 06, 2012 9:03 am

Anyone? Asking at doozan.com as well, but getting the silent treatment there too :(
ishep
 
Posts: 5
Joined: Wed Feb 01, 2012 11:40 am

Re: GoFlex Home: can't set MAC, fw_printenv not working

Postby fatrat » Thu Feb 16, 2012 12:03 am

I ran into the same problem as you. I went through a lot of crap before I figured out a way to get it to work right.

I used netconsole to connect to U-Boot. Instructions are on the "Advanced" tab of the instructions page you used. I was not able to get this to work in Windows or in a Linux virtual machine. Maybe with a bit more effort it would work. Anyway, I got it to work using the OSX instructions on my old iBook.

Once the unit is powered on, u-boot comes on and shows a count-down before attempting to boot. I typed random numbers and pressed enter until it aborted boot-up and gave me a Marvell>> prompt. In some cases, it would not see me typing and would try to boot anyway. Whenever that happened, I power-cycled and tried again.

Once at the Marvell>> prompt, I was able to issue commands. The following command changes the MAC address. Replace UU:VV:WW:XX:YY:ZZ with your actual MAC address.

$this->bbcode_second_pass_code('', 'Marvell>> setenv ethaddr UU:VV:WW:XX:YY:ZZ')

However, as soon as you do this, the network interface to the device dies. The value isn't actually saved until you perform the "saveenv" command. I figured out that if you just inline the commands, it works. This way it interprets both commands even if you lose your connection to it.

This should work:
$this->bbcode_second_pass_code('', 'Marvell>> setenv ethaddr UU:VV:WW:XX:YY:ZZ ; saveenv')

Before I figured this out though, I tried this... http://www.armadeus.com/wiki/index.php?title=Ethernet_MAC_address as follows:

$this->bbcode_second_pass_code('', 'Marvell>> setenv ethaddr FF:FF:FF:FF:FF:FF
Marvell>> saveenv
Marvell>> ping 1')

This did not cause it to lock up so I thought I was on the right track. The apparent side-effect of this is that it causes the device to generate a new MAC address every time it boots up (since the stored address is invalid). This is much worse than just having an incorrect MAC address that is static!

Anyway, I would not recommend trying that last bit of code. I believe the setenv/saveenv solution will work. Although, maybe it worked for me only because I set the MAC address to FF:FF:FF:FF:FF:FF first. I haven't tested it again.

Please let me know if this works for you and the steps that you needed to take. If you have trouble, I would be more than happy to help. Also, apologies if this response is somewhat incoherent. It's been a long day. :)
Last edited by fatrat on Mon Mar 26, 2012 7:56 pm, edited 1 time in total.
fatrat
 
Posts: 2
Joined: Wed Feb 15, 2012 11:32 pm

Re: GoFlex Home: can't set MAC, fw_printenv not working

Postby maihoaomv » Thu Mar 01, 2012 3:31 am

fatrat
I have (did have) the same problem. I know for sure I entered the correct MAC address. Before I started this project I ssh into the GoFlex and ran ifconfig then cut and pasted the output into notepad to be sure that I got it correct.
Anyway to make a long story short your instructions worked perfectly on the first try and from a Linux virtual machine running in VMWare Player on a win 7 laptop (yea VMWare!!).

I also ran into another problem with the instructions at http://archlinuxarm.org/platforms/armv5 ... oflex-home. I forgot to setup the GoFlex to allow internet access, otherwise packages can't be downloaded to the GoFlex. I had to download the files to the hard drive on the laptop then sftp them from the hard drive to the GoFlex. Thank goodness that worked otherwise I would have had a useless brick on my hands. It's up and working perfectly now. Just got to install stuff and configure it to work the way I want.

I do have a question. Is the change permanent in the hardware or is it just a trick done in the environment to fool it into believing that is the correct mac address?

thank you for your post.

John
maihoaomv
 
Posts: 16
Joined: Thu Mar 01, 2012 2:46 am

Re: GoFlex Home: can't set MAC, fw_printenv not working

Postby fatrat » Sat Mar 17, 2012 11:09 am

John,

Sorry it took me so long to respond. I haven't been following the forum lately.

I do not believe that the MAC address is ever permanently stored in hardware. It is generally stored as a semi-permanent value in the firmware. In this case, the firmware we are using is u-boot. U-boot starts the Linux kernel and tells it what MAC address to use. So setting the MAC address in u-boot is as permanent as it's going to get. You can also set the MAC address temporarily in Linux using ifconfig.

I have to say I am not very happy with the build of u-boot that the arch linux tutorial has us install. Problems like this and lack of GPT support (for drives >2TB) make it a pain to use. I had to do a nasty hybrid MBR+GPT configuration to get all 3TB out of my drive.

Unfortunately I really don't understand u-boot well enough to fix it. Installing a different build scares me because another build may not have the same netconsole defaults. Without a real serial port, I might get locked out. I haven't even been able to find all of the sources to build it from scratch. I guess we just have to deal with it for now.

Greg
fatrat
 
Posts: 2
Joined: Wed Feb 15, 2012 11:32 pm

Re: GoFlex Home: can't set MAC, fw_printenv not working

Postby ishep » Thu Apr 26, 2012 10:06 pm

Thanks for the replies. It seems the root cause of the problems was a wrong chip_delay value for the NAND in uBoot (see http://forum.doozan.com/read.php?2,7451,7497#msg-7497). This was corrected in a recent kernel update; I've since updated my GFH and rebooted and all the error messages in dMesg had gone.

I then did $this->bbcode_second_pass_code('', 'sudo ubit_start') to get to the ubit prompt, which told me the "correct" MAC that I had previously tried to set was still cached but still not set. All I did was issue another $this->bbcode_second_pass_code('', 'ethaddr AA:BB:CC:DD:EE:FF') command, and it changed immediately. Rebooted again to check, all is good :)
ishep
 
Posts: 5
Joined: Wed Feb 01, 2012 11:40 am


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 2 guests