Yesterday I accidentally clicked on the stage2.eeprom link in the webgui and canceled the download. When I did that, I got a "webserver exception" on the terminal and then I could no longer boot into the widgets. I could get into the bootloader, but nothing else. When I would try to boot stage2, the ybox would just turn off and not come back on. I clicked on the stage2.eeprom link again and downloaded it completely and now everything works like it did before.
What exactly happened here?
"stage2" problem
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 91
- Joined: Fri Jul 11, 2008 9:39 am
Re: "stage2" problem
You cancelled a firmware upload before it was finished. It had written some, but not all, of the firmware, so whenever program flow went to the inconsistent part, the instruction found there was either invalid or made no sense in context. In other words, it crashed.klaser wrote:What exactly happened here?
Reflashing stage2 removed that problem by writing a complete and consistent firmware image.
This is a common problem when flashing an image into anything. If you've ever flashed a PC motherboard BIOS, it's the same deal, and there were probably warnings galore in the documentation of the flash utility. Don't abort firmware uploads in progress. It is worse to have a partial "correct" image than a complete wrong one.
Last edited by lou on Sun Jul 20, 2008 12:51 pm, edited 1 time in total.
-
- Posts: 91
- Joined: Fri Jul 11, 2008 9:39 am
I don't know this platform in particular. What is the intended function of that button? If its function is to upload the stage 2 loader into FLASH/EEPROM, then, yes, writing would be happening under the covers.klaser wrote:I was not writing anything. Unless that's how that feature works, there was no writing going on.
In the parlance I use, uploading is host to device, and downloading is device to host.
- darco
- Posts: 118
- Joined: Wed Jun 04, 2008 7:54 pm
The stage two button is for booting into stage two.
Clicking on the stage2.eeprom from your web browser should start downloading the stage2 firmware from your ybox2 to your computer.
It sounds like somehow your stage2 image got corrupted. This isn't a big deal though, because it is easy enough to fix with CURL.
Instructions for how to refresh the stage2 firmware can be at the top of this file: http://svn.deepdarc.com/code/ybox2/trun ... oader.spin.
Simply upload the infowidget binary and you should be fine.
------------------------
EDIT
I misread the original post.
That is really weird behavior. Downloading Stage2 doesn't do write anything to the EEPROM. I'm not exactly sure what happened. Not really the answer you were looking for, but I just wanted to address it.
Clicking on the stage2.eeprom from your web browser should start downloading the stage2 firmware from your ybox2 to your computer.
It sounds like somehow your stage2 image got corrupted. This isn't a big deal though, because it is easy enough to fix with CURL.
Instructions for how to refresh the stage2 firmware can be at the top of this file: http://svn.deepdarc.com/code/ybox2/trun ... oader.spin.
Simply upload the infowidget binary and you should be fine.
------------------------
EDIT
I misread the original post.
That is really weird behavior. Downloading Stage2 doesn't do write anything to the EEPROM. I'm not exactly sure what happened. Not really the answer you were looking for, but I just wanted to address it.
Last edited by darco on Sun Jul 20, 2008 2:20 pm, edited 1 time in total.
- klaser
- Posts: 8
- Joined: Mon Jul 14, 2008 1:55 pm
I think I may have a bigger problem. I can't seem to change any of the settings and whenever I try to upload a new widget, it doesn't write anything. It tells me it has written some number of bytes and it is done, but when I reboot it again it just goes back to the info widget and when I try to save new settings the webserver portion stops responding and requires a reboot.
- darco
- Posts: 118
- Joined: Wed Jun 04, 2008 7:54 pm
Try a reset:
Other than that... Can you show me the exact command line you are using?
Another way to debug these things would be for you to temporarily open a port on your router to the ybox2 and let me have a look at the device myself remotely. (If you want to do this, it would be best to send me the link in a private message)
Code: Select all
TO RESET: Hold down the button while booting. Keep holding it
down until the system reboots. You will hear a lot of warning chirps,
but make sure you hold down the button until it reboots! After it reboots
let go. Your ybox2 has been reset. This will erase every setting except
for the MAC address, UUID, and LED configuration. If you forget the
password, this is what you need to do.
Another way to debug these things would be for you to temporarily open a port on your router to the ybox2 and let me have a look at the device myself remotely. (If you want to do this, it would be best to send me the link in a private message)
- darco
- Posts: 118
- Joined: Wed Jun 04, 2008 7:54 pm
I just wanted to update anyone else who was following this...
Klaser and I connected via google talk, and I was able to log into his ybox2 remotely and verify that it was indeed misbehaving. It would appear to have accepted new stage2 firmware, but then mysteriously boot into the previous stage2 firmware. (more specifically, the eeprom wasn't being updated)
The reason for this is that pin7 (write protect) on the EEPROM is not being explicitly pulled low. Now according to the datasheet this pin will be internally pulled low if left unconnected... but apparently this isn't always the case.
Adding a haywire from pin7 (the only unconnected pin on the EEPROM) to a pin on the other side of the chip (which are all connected to VSS) fixed his problems.
I would recommend everyone doing the same at some point, especially before upgrading the bootloader if you don't have a prop-plug.
Klaser and I connected via google talk, and I was able to log into his ybox2 remotely and verify that it was indeed misbehaving. It would appear to have accepted new stage2 firmware, but then mysteriously boot into the previous stage2 firmware. (more specifically, the eeprom wasn't being updated)
The reason for this is that pin7 (write protect) on the EEPROM is not being explicitly pulled low. Now according to the datasheet this pin will be internally pulled low if left unconnected... but apparently this isn't always the case.
Adding a haywire from pin7 (the only unconnected pin on the EEPROM) to a pin on the other side of the chip (which are all connected to VSS) fixed his problems.
I would recommend everyone doing the same at some point, especially before upgrading the bootloader if you don't have a prop-plug.
Please be positive and constructive with your questions and comments.