Go Down

Topic: [Solved] Upgrade to Yun to 1.5.3 - Bad Data CRC (Read 3623 times) previous topic - next topic

mrshadow

Apr 25, 2015, 07:01 pm Last Edit: Apr 29, 2015, 02:18 am by mrshadow Reason: Solved!
I have followed the directions and used the Zipped Image file here. ( Extracted BIN file named openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade and was: 15.4 MB (16,193,256 bytes) )

I left the Yun to do it's thing for about 10 minutes, I came back, and tried to click on http://arduino.local with no response.  Tried unplugging and plugging it back in with no WLAN LED showing at all now.

There appeared to be some issues with Windows 7 installing the driver for this a few times, and at one point, Windows 7 thought it was a Teensy! (I have one, previously installed teensyduino).

Anyway, I was able to finally program it with YunSerialTerminal and I now have this output:

## Booting image at 9fea0000 ...
  Image Name:   MIPS OpenWrt Linux-3.3.8
  Created:      2014-11-14   8:00:46 UTC
  Image Type:   MIPS Linux Kernel Image (lzma compressed)
  Data Size:    1185448 Bytes =  1.1 MB
  Load Address: 80060000
  Entry Point:  80060000
  Verifying Checksum at 0x9fea0040 ...Bad Data CRC
ar7240>

I see from this earlier post that seems to suggest that only running unsupported steps to reflash UBoot is the only answer.

Are there any other options?


Edit: I'm going to again run through the reset procedures for all 3 processors and see what happens.

jessemonroy650

::::SNIP::::

Edit: I'm going to again run through the reset procedures for all 3 processors and see what happens.
@mrshadow,

FYI: it is not well documented, but some of the reset procedures take from 2 to 8 minutes. The 30+ second reset should work for you. Make sure to use the YunSerialTerminal for your own sanity. ;)

NOTE: it is in the IDE under Files->Examples->Bridge->YunSerialTerminal

Jesse

mrshadow

From here:

Quote
To restore your WiFi configuration you have to press and hold the WLAN RST button for 5 seconds. When you press the button the WLAN blue LED will start to blink and will keep still blinking when you release the button after 5 seconds indicating that the WiFi restore procedure has been recorded. The second function of the WLAN RST button is to restore the linux image to the default factory image. To restore the linux environment you must press the button for 30 seconds.
I cannot get the results for either the 5 second hold-down or the 30 second hold-down of the WLAN RST button.

Reading other posts, it appears to me that I don't need to reflash U-Boot since I'm getting the prompt.  Whether I have to reflash Linux, I'm not sure, but I definitely need to reflash OpenWRT.

ShapeShifter

I cannot get the results for either the 5 second hold-down or the 30 second hold-down of the WLAN RST button.
The code to handle either long button press runs once Linux has fully booted. There has been some discussion whether uboot also implements that functionality - it would appear that you have proven that it doesn't.

Quote
Reading other posts, it appears to me that I don't need to reflash U-Boot since I'm getting the prompt.  Whether I have to reflash Linux, I'm not sure, but I definitely need to reflash OpenWRT.
I think you are correct.

Linux and OpenWRT are one and the same. I think you meant to say "Kernel" instead of "Linux." From your error message, it would appear that the Kernel (which is stored separately from the rest of the OpenWRT file system) is corrupted. You might get away with just reflashing the Kernel, but be aware that the Kernel and the OpenWRT image are a closely matched set: if you use a Kernel that is a different version from the OpenWRT image that is already loaded on the Yun, there could be problems.

It's probably safest to reflash both the Kernel and OpenWRT images, but skip uboot.

jessemonroy650

The code to handle either long button press runs once Linux has fully booted. There has been some discussion whether uboot also implements that functionality - it would appear that you have proven that it doesn't.
I think you are correct.

::::SNIP::::

@ShapeShifter,
it appears that the reset instruction are deficient. I'll work on a rewrite as soon as I get sometime. I forget that part about "having the Linux fully booted". In the meantime, I'll update my FAQ.

Jesse

mrshadow

After reading, I've determined if I mess this us, I could end up with a brick.  I'm pretty confident I don't really have a "warranty" of any kind, and it would be more of a pain to try and claim any warranty, than shell over $75 to buy another YUN, if this were to happen.

I feel comfortable attempting the reflash of the Kernel and the OpenWRT image.  With that said, I'd rather go in with all the information I can get.  I downloaded the base set, and I'm going to skip flashing UBOOT, since it's there.  

I see some really big size differences between the files ( Dates are in MM/DD/YYYY format, Sizes in KB, 'Source' column is either the Base Image or the SysUpgrade:


SourceNameDate ModifiedSize
Base Imageopenwrt-ar71xx-generic-yun-16M-kernel.bin11/14/2014 03:001,216 KB
Base Imageopenwrt-ar71xx-generic-yun-16M-rootfs-squashfs.bin11/14/2014 03:007,680 KB
SysUpgradeopenwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade.bin3/23/2015 20:4315,814 KB


Why is the SysUpgrade so much bigger?  Is the "Base Image" really the minimum, and the SysUpgrade represents all the extras?

It likely does not matter, but in the event it does in the future, I'm doing this on Windows 7 (64-bit) (yes, I know. The Ubuntu box is being re-built. :) )

ShapeShifter

After reading, I've determined if I mess this us, I could end up with a brick.
I'm not so sure about that. If you reflash uboot, and make a mistake, you can easily have a brick.

But if you mess up flashing the Kernel or OpenWRT images, you'll be at pretty much the same place as you are now: a non-booting system, but with a working uboot that lets you try to reflash yet again.

I can't explain the different image sizes. I would expect the sys upgrade image to be a bit larger than the plain OpenWRT image, as I'm sure it also includes the Kernel image. But that leaves the sys upgrade image almost twice as big.

I note that they have different dates: the larger sys upgrade image is 4 months newer. Is it a different version? With more features?

Or maybe the individual images are compressed differently than the sys upgrade image?

mrshadow

I sat down and reflashed by Yun.

YunSerialTerminal is loaded, obviously, but just to make sure.

Try #1:
Successful reflash of kernel and OpenWRT.
Used WiFi-served webpage to do the SysUpgrade.
Bad Data CRC

Try #2
Successful reflash of kernel and OpenWRT.
From the Linux Command prompt through the serial port: /sbin/sysupgrade [imagefile - its a long name]
Ran as expected from the output on the page.
Bad Data CRC

- Assumption now is the binary image on the microSD is bad.
- Re-download from the website.
- Extract it using 7-Zip (not built-in Windows ZIP file - read a few places for other systems that WinZip can corrupt things.
- Delete the old image.
- Copy the new one over.  Wait 10 minutes JUST to be safe.  Properly unmount and remove the microSD card from the reader.

Try #3
Reflash of the kernel and OpenWRT failed.  Got a "Kernel Panic - no init"

Try #4
Reflash of the kernel and OpenWRT failed.  Got a "Kernel Panic - no init"

Try #5
Successful reflash of kernel and OpenWRT.
From the linux command prompt, confirm the microSD card has been mounted.
Just tried this again to verify the size, and the microSD card is NOT visible.
Rebooting.
Image is visible, total bytes are 16193256.   This matches the reported bytes as the size (not size-on-disk) in Windows.
Waiting a few minutes to see if the microSD card "disappears".  I'll update again if I can reproduce that.

Three Questions:

1) How can I accurately determine the checksum of the .bin sysupgrade file that is on my microSD?  I see no recognizable commands on the /bin or /sbin of the Linux side.
2) Is a 16GB UHS-1 rated microSD card capable of working in this device?
3) The microSD is currently formatted with "vfat", and my understanding that means the underlying is either FAT16 or FAT32.  What is the correct format for the SysUpgrade microSD card?

mrshadow

SUCCESS!

I reformatted my SD card with the SD Formatter.  Selected "Full (erase)" and "Format Size Adjustment" to "ON".

NOTE: I used this card straight out of the package.

Angelo9999

I sat down and reflashed by Yun.

YunSerialTerminal is loaded, obviously, but just to make sure.

Try #1:
Successful reflash of kernel and OpenWRT.
Used WiFi-served webpage to do the SysUpgrade.
Bad Data CRC

Try #2
Successful reflash of kernel and OpenWRT.
From the Linux Command prompt through the serial port: /sbin/sysupgrade [imagefile - its a long name]
Ran as expected from the output on the page.
Bad Data CRC
I'm missing something. How can you access to the webpage or the serial port command line if your Yun is not booting?

mrshadow

Out-of-the-box I was able to get to the page.  Flashing it broke it.

Went through and did the kernel reflash and the OpenWRT reflash (the smaller two files) and I was again able to get back to the web page.

It was only applying the SysUpgrade through the WebPage (or command line) from the .zip file that was stored on the badly formatted SD card.

Go Up