I thought I'd open a discussion on flashing Edison using the flashall script available as part of the downloadable image for Edison.
I'm not talking about the OTA upgrade, I'm just talking about the flashall method, which can be used to recover a bricked device, to change partition sizes, or, indeed, to put on different Operating Systems such as ubilinux (Debian).
What I've found so far:
I'm not saying this is the only way, but it's the way that works for me.
However, there are a few gocha's in getting Linux working. If you want to do a recovery option with the flashall script, it uses a tool called xfdtk-downloader-solo, which is part of the xFSTK package from sourceforge.net. It's not installable via apt-get, etc, you usually need to build for source.
The fllashall script also uses dfu-util, but that's easily obtainable, as you can use apt-get to install it.
So, for those folks that don't have a Linux machine lying around, I thought I might make it a little easier by suggesting the creation of USB live-boot of a suitable Ubuntu, and attach a pre-compiled version of xFSTK to this post so people don't have to compile xFSTK from source. The rest can be done on the live-boot it'self.
All going well, you should now be able to completely flash (including recovery option) your Edison.
So the next time you want to flash, you can simply boot up the USB key, get the new image, and flash from there. And Keep that USB key safe for the next time
The .deb file attached is a pre-build package of the unmodified source of version 1.7.2 from sourceforge here. If it's not OK to attach this, let me know and I'll remove it, but think that it's OK.
It's for Ubuntu 14.04 32-bit.
Just sharing my experience:
I'm using Ubuntu 14.04.1 LTS 64-bit to flash the default yocto build and also your ubilinux. I don't have problem running it. BTW, I don't even need xfstk when using flashall.sh from download page for yocto build (I need to install xfstk, when running flashall.sh from your ubilinux). I got my Edison the day before, so only play one day with it. It come with old firmware so I update the firmware (try both copying to folder, then "reboot ota", and also the flashall.sh script, both work fine). Then I decided I need debian than plain yocto, so tried ubilinux. flashall.sh barked than I need xfstk, that when I start installing xfstk on my 64-bit ubuntu box. Is there any chance your flashall.sh is older than the one on download page? The download page doesn't said anything about version (request), but the file I use was "edison-image-ww36-14.zip"
(I'm back to the plain yocto build right now, since ubilinux not work with bluetooth yet)
Could you elaborate your problem, when you said no luck with 64-bit ubuntu?
If you stay with the Yocto image, you probably never need to run the recovery option with flashall. Because there's a different partitioning scheme with ubilinux, the '-b' option is required, which repartitions the emmc and calls flash-ifwi in the script. This flash-ifwi function uses either phoneflashtool or xfstk-dldr-solo, depending on what's installed. So when I'm running the -b option, I don't have phoneflashtool (and couldn't find it on the net), so I'm left with the option of installing xfstk (i.e. building from source)
xFSTK only seems to build on 32-bit ubuntu, as it explicitly requires linking against a 32-bit version of libusb.a. xFSTK refuses to build on a 64-bit OS for me.
So as long as you stick with Yocto, you don't need to use -b or -recovery option, therefore you don't need xfstk.
The flashall.sh I'm using in the ubilinux build is the same one as from the Yocto 36.14 image.
Okay, that explain the xfstk requisity (I'm too lazy to look inside flashall.sh script).
As for linking and running 32-bit library on 64-bit OS, I think you can try to use 32-bit library version on 64-bit OS (apt-get install libusb-dev:i386, perhaps).
But I checked libusb.a on my 64-bit ubuntu box, only 64-bit version installed, and I don't have trouble compiling xfstk on that box.
Intel getting started documentation about flashing on Windows, currently doesn't mention flashall.bat (only Linux and Mac version). So I am under impression it still experimental.
Funny if the script explicitly excludes OSX, as the documentation mention it as alternative flashing method. (someone as lazy as I am is maintaining the site?)
Just for info (at the time I post this):
Release Note doc is for W37.
While software download is W36.
I think then next software release (W37) is on horizon.
It might not completely related, but new feature on release note said dfu-util for windows for ex.
installed the ubiLinux today using your ready xfstk deb file, works fine - thanks again!
I installed it on two Edisons. One needs weirdly about 60 mins to flash the rootfs, the other needs the advertised 5 mins.
It writes the access times for each file on the rootfs - not good for mmc. I changed it in fstab (noatime).
"rsyslog" and "logrotate" - also two candidates i don't need on such a handy system all of the time.
And for my needs i additionally mounted /tmp, /var/tmp and /var/log as tmpfs.
But now i made a terrible mistake in the "post-up" procedure of the network interface.
Edison hangs there during bootup and i can't login anymore (no wlan and no serial access). Seems like i have to install all again.
I'm very glad to get all the advantages of Debian for the Edison with this - really nice.
I think you are experiencing the same issue experienced by faceplant on the ubilinux topic:
Please have a look at the second page of the ubilinux thread where I explain how to fix the continuous reboot issue when your WiFi is not in range (or the configuration is not correct).
thanks but it was another issue. I prefer setting the time immediately during bootup. So i set a command for "up-post" in network interfaces. I had a mistake there and this command never returned. So i never got a login prompt - bootup hangs (forever). Solved it by flashing the rootfs again and i had a backup to rsync all my personal changes back.
Check out /thread/56219?sr=stream this post for information on how to tweak the flashall.sh script so you don't need xFSTK in order to flash images that have different partition sizes than the default Yocto image.
Hi David, here it is:/dev/root / auto defaults,noatime,discard 1 1proc /proc proc defaults 0 0devpts /dev/pts devpts mode=0620,gid=5 0 0debugfs /sys/kernel/debugdebugfsauto 0 0tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0tmpfs /tmp tmpfs defaults,noatime 0 0tmpfs /var/log tmpfs defaults,noatime 0 0tmpfs /var/tmp tmpfs defaults,noatime 0 0tmpfs /var/volatile tmpfs defaults,noatime 0 0/dev/mmcblk0p10 /home autodefaults,noatime 1 1
Does "discard" on the rootfs make sense ?
Fixed my totally bricked Edison. It would not start the boot, it stopped at : *** Ready to receive application ***, and it did not show up as a file device so flashall.sh --recover is the only remedy. I tried building xfstk for 64 bit Ubuntu but never got it to work.
I did hit an error when I did "dpkg -i xfstk-downloader-_0.0.0_all.deb" but it was apparently only in documentation files and i recovered my Edison with no problems.
Same for me with Ubuntu 14.0 I am having mine working.But the latest image downoads brings issues and the .flashall.sh no longer works for me.previous builds do.Intel should take this into consideration.
I am now building the xFSTK tool as they have suggested to help me boot my device with new Image
My name is Martin Ortuño from Mexico, I am new in the community and linux in general. I bought my Edison a few months ago, and for many reasons I forgot my password to root, so I tried to flash it using the edison set up application for Mac (and with the Windows App was the same), but there was no positive results, it never finished flashing. Then I tried to use the flash all method in my Mac too, but again this errors appeared:
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/libusb-1.0/libusb.h
already exists. You may want to remove it:
To force the link and overwrite all conflicting files:
brew link --overwrite libusb
To list all files that would be deleted:
brew link --overwrite --dry-run libusb
Possible conflicting files are:
/usr/local/lib/libusb-1.0.dylib -> /usr/local/lib/libusb-1.0.0.dylib
And yes trying to flash all was useless:
dfu-util: Device has DFU interface, but has no DFU functional descriptor
dyld: lazy symbol binding failed: Symbol not found: _libusb_get_port_numbers
Referenced from: /usr/local/bin/dfu-util
Expected in: /usr/local/lib/libusb-1.0.0.dylib
dyld: Symbol not found: _libusb_get_port_numbers
Referenced from: /usr/local/bin/dfu-util
Expected in: /usr/local/lib/libusb-1.0.0.dylib
The people from tech support helped me to find my last option, this post, and yes I am trying to follow this instructions. But being honest I am a linux newbe, so no luck for me, because I am having troubles using the command:
dpkg -i xfstk-downloader-_0.0.0_all.deb
Right after I use it, this error appear:
ubuntu@ubuntu:~$ sudo dpkg -i xfstk-downloader_1.7.2_all.deb
Selecting previously unselected package xfstk-downloader.
(Reading database ... 191101 files and directories currently installed.)
Preparing to unpack xfstk-downloader_1.7.2_all.deb ...
Unpacking xfstk-downloader (0.0.0) ...
dpkg: dependency problems prevent configuration of xfstk-downloader:
xfstk-downloader depends on libusb-dev; however:
Package libusb-dev is not installed.
xfstk-downloader depends on libxml2-dev; however:
Package libxml2-dev is not installed.
dpkg: error processing package xfstk-downloader (--install):
dependency problems - leaving unconfigured
Processing triggers for doc-base (0.10.7) ...
Processing 33 changed doc-base files, 1 added doc-base file...
Error in `/usr/share/doc-base/xfstk-downloader', line 20: all `Format' sections are invalid.
Note: `install-docs --verbose --check file_name' may give more details about the above error.
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Errors were encountered while processing:
Do I have to install the both packages, libusb-dev and libxml2-dev, before the installation? and which version?
Thank you for your help