This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
How to Create an Official PicoCalc SD Card
The purpose of this wiki is to document the partitioning and creation process of the official PicoCalc SD card.
⚠ Warning: This process involves disk partitioning and formatting, which may result in data loss if performed incorrectly. Do not proceed unless you have sufficient experience with Linux system administration.
We are not responsible for any data loss or damage caused by improper use of these instructions. Proceed at your own risk.
Script
#!/bin/bash
DEVICE="/dev/$1"if[ -z "$DEVICE"];thenecho"No disk"exit1fiif[ ! -b "$DEVICE"];thenecho"$DEVICE not existed"exit1fiecho"Warn: $DEVICE will be destroyed and all data on this disk will be lost,Do you want to continue?"read -p "Confirm?(y/n) " confirm
if["$confirm" !="y"];thenecho"Canceled"exit1fiecho"Begin partition..."# use parted to create msdos partition tableecho"Create msdos partition table..."
parted "$DEVICE" mklabel msdos
TOTAL_SIZE=$(lsblk -bno SIZE "$DEVICE")SIZE_MB=$(( TOTAL_SIZE /1024/1024))PART1_SIZE=$(( SIZE_MB -32))echo"Create first partition in size ${PART1_SIZE}MB, FAT32..."
parted "$DEVICE" mkpart primary fat32 1MiB ${PART1_SIZE}MiB
sleep 2echo"Format first partition FAT32..."
mkfs.fat -F32 -v -I "${DEVICE}1"echo"Create second partition in size 32MB..."
parted "$DEVICE" mkpart primary ${PART1_SIZE}MiB 100%
echo"All done:"
fdisk -l "$DEVICE"
How to Use the Script
Insert a blank SD card into your computer.
Run the script:
sudo ./partition_usb_32mb.sh sdb
(Replace "sdb" with the correct device name for your SD card.)
BE CAREFUL ABOUT THIS BE CAREFUL ABOUT THIS BE CAREFUL ABOUT THIS
If you are not careful, all the original data on the disk will be destroyed.
This script prepares the SD card for PicoMite, uLisp, NES emulators, and other Pico firmware using the fatfs library.
Additionally, FUZIX can use /dev/sdb2 (32MB partition) as its root filesystem, as FUZIX supports a maximum partition size of 32MB.