Skip to content

Conversation

@mnishiguchi
Copy link
Contributor

@mnishiguchi mnishiguchi commented Apr 20, 2025

Description

Add scripts/flash_livebook.sh, a lightweight shell wrapper that automates the entire process of fetching, provisioning, and flashing the latest Nerves Livebook firmware onto an SD card. It validates prerequisites (bash, curl, fwup), provides a -h|--help usage guide, and cleans up its temporary download directory on exit.

Motivation

Getting started with Nerves Livebook currently requires manually downloading the correct .fw for your MIX_TARGET, entering provisioning options, and burning the image via fwup or Etcher. This script consolidates those steps into a single, self‑documented command, lowering the barrier for newcomers and speeding up iterative demos.

Usage

# Fully interactive run:
./scripts/flash_livebook.sh

# Pre‑set provisioning to skip prompts:
export MIX_TARGET=rpi4
export NERVES_WIFI_SSID="MySSID"
export NERVES_WIFI_PASSPHRASE="MyPass"
export NERVES_SERIAL_NUMBER="pi-42"
./scripts/flash_livebook.sh

By exporting those variables, you skip the corresponding prompts—only SD‑card detection and final confirmation remain interactive.

image

image

@lawik
Copy link
Collaborator

lawik commented Apr 22, 2025

This looks really nice :)

The script will download the latest `.fw`, provision it, wait for your card,
and invoke `sudo fwup …` for you.

> #### Single‑command installer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think this section should come first? It seems easier than cloning the repository for a first time user just trying to evaluate the project.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you updated it. I didn't mean first overall, but before the detailed way of downloading and running the script. I think that the prerequisites still need to be before it, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants