-
Notifications
You must be signed in to change notification settings - Fork 78
The Complete Linux CLI Guide
I wrote this document after having to setup and flash a FN using a Macbook M1 in a remote location- and failing. The VSC install of PIO and the ESP32 platform is just way too slow and error-prone. This is how to do it all in Linux from the shell. I do install Sublime Text to used as a text editor because I enjoy having that to quickly edit files- it's not as slow as VSC.
v 1.1 - Feb. 2024 v 1.0 - Sept. 2023
Suitable for any UNIX style system- just update for your local packages and paths!
- Have a UNIX style system. This has specific examples in Ubuntu, but works for any UNIX style system as long as you adjust
- If you have nothing but an older laptop: download and copy Ubuntu LTS onto a USB stick
- boot laptop and install full Ubuntu Desktop
sudo apt update && sudo apt upgrade
sudo adduser `whoami` dialout
newgrp dialout
sudo snap install sublime-text --classic
sudo apt install git curl python3.10-venv -y
sudo update-alternatives --config editor
[choose wisely]
[reboot]
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libpython3-dev
sudo apt-get install python3-venv
sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt install libmbedtls-dev
Then continue on....
With the UNIX system setup and reasonably and minimally configured it's time to install the PIO build system. It's all python. PIO should always be installed in your home directory.
- Pull down the PIO installer from PlatformIO
cd ~
curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
- run the installer
python3 ./get-platformio.py
[a bunch of things will install....]
- Ensure the pio command is in your PATH
export PATH=$PATH:~/.platformio/penv/bin
- Now use the PIO command to install our 'platform' i.e. the ESP32 chip which is on the FujiNet
pio platform install espressif32
[more things will install]
If you add this line to the end of your .bashrc you'll always have pio around:
export PATH=$PATH:~/.platformio/penv/bin
Now we have PIO installed grab the FujiNet main firmware repo- and the apps repo for some fun later on...
I keep all my github repos in a sub-folder called 'code' as you see below. Feel free to use whatever folder structure you are comfortable with. Note: The PIO installation should always be from your home directory top-level, the FujiNet code repo can be anywhere.
mkdir code
cd code
git clone https://github.com/FujiNetWIFI/fujinet-firmware.git
git clone https://github.com/FujiNetWIFI/fujinet-apps.git
cd fujinet-firmware/
cp platformio-sample.ini platformio.ini
-
edit platformio.ini and choose at least one platform to build
-
Mac Note - change the serial device in platformio.ini to something like:
/dev/cu.usbserial-XX (the XX may be unique to your system)
./build.sh -h
- shows help
./build.sh -b
- just builds - good for a test of everything we've installed so far
./build.sh -fum
- builds and flashes the firmware, the image (the webUI) and then monitors the USB port for debug output
- The FujiNet should show the flash updating, it should reboot and then try to find a wifi connection.
./build.sh -s fujinet-atari-v1
[a local .ini will be created based on the platform.ini file]
./build.sh -a
[lots of output as all platforms are built]
- build.sh -a -- this will build every single platform we can build for, check that it built ok and give you a summary in a file called build-results.txt in the root of the fujinet-firmware directory.
It looks something like this:
$ cat build-results.txt
Start Time: 2024-02-18 12:42:25 - ----- Starting Build the World for Fujinet
2024-02-18 12:45:14 - Built fujiapple-rev0
File 'firmware.bin' found------------------------------------------------
2024-02-18 12:47:17 - Built fujimac-rev0
File 'firmware.bin' found------------------------------------------------
2024-02-18 12:49:54 - Built fujinet-adam-v1
File 'firmware.bin' found------------------------------------------------
2024-02-18 12:52:56 - Built fujinet-atari-v1
File 'firmware.bin' found------------------------------------------------
2024-02-18 12:55:45 - Built fujinet-coco-lolin-d32-dw
File 'firmware.bin' found------------------------------------------------
2024-02-18 12:58:07 - Built fujinet-cx16
File 'firmware.bin' found------------------------------------------------
...
[more platforms]
If you cannot setup wifi via CONFIG manually you need to create a fnconfig.ini file on a SD card using your modern laptop and setup your local wifi credentials by hand.
A sample fnconfig is here to copy and use:
Copyright 2024 Contributors to the FujiNetWIFI project.
Join us on Discord: https://discord.gg/7MfFTvD
- Home
- What is FujiNet?
- The Definition of Done
- Board bring up for FujiNet Platform.IO code
- The Complete Linux CLI Guide
- The Complete macOS CLI Guide
- Development Env for Apps
- FujiNet-Development-Guidelines
- System Quickstarts
- FujiNet Flasher
- Setting up a TNFS Server
- FujiNet Configuration File: fnconfig.ini
- AppKey Registry - SIO Command $DC Open App Key
- CP-M Support
- BBS
- Official Hardware Versions
- Prototype Board Revisions
- FujiNet Development Guidelines
- Atari Programming
- Apple Programming
- C64 Programming
- ADAM Programming
- Testing Plan
- Hacker List
- FujiNet VirtualMachine