Home  >  Edison  >  Building

Disaster recovery

initrd

From U-Boot you can run do_rescue. This will take you into the initrd in the boot partition on the emmc (/dev/mmcblk0p7) and drop you into a shell. Here you will have available the packages:

  • busybox
  • e2fsprogs
  • btrfs-tools
  • parted

These tools should allow you to fixup a broken root file system.

Flashall (old image)

If at any point you messed up the Edison or want to go back to the factory state, you need to flash the original image. The image actually consists of several parts, i.e. u-boot (boot loader), ifwi (intel firmware binaries), kernel and root file system. It should not be necessary except after you did Recovery (see below), but just in case of emergency you can download an Edison 2.1 image here.

  1. Ungzip the file

  2. Run sudo ./flashall.sh

Recovery

As described above, u-boot can update itself. However, if u-boot itself is broken (you built a non-functioning image) interrupted flashing, or whatever, it won’t boot, and consequently won’t be able to re-flash it self.

Fortunately, u-boot is loaded by the PSH KERNEL (microkernel), and this can flash a new u-boot. For this the flashall script needs to be run with an option:

    sudo ./flashall.sh --recovery

The script will be requiring another tool, xFSTK for which you can download the sources here: https://github.com/edison-fw/xFSTK. This builds at least on Ubuntu 20.04 and 20.10.

To install on Ubuntu:

    sudo dpkg -i xfstk-downloader-1.8.5.ubuntu20.04-amd64.deb

After, installing flashall recovery should work.

xFSTK

xFSTK can also be build directly from meta-intel-edison using the following command:

bitbake xfstk-native -caddto_recipe_sysroot

This will build the native version in a reproducible way, and place it in the sysroot. To run it:

oe-run-native xfstk-native xfstk-dldr-solo