mirror of
https://github.com/iceHtwoO/novaOS.git
synced 2026-04-17 04:32:27 +00:00
Implement first basic interrupt handler
This commit is contained in:
28
tools/generate_sd_card.sh
Executable file
28
tools/generate_sd_card.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Config
|
||||
IMAGE_NAME="sd.img"
|
||||
IMAGE_SIZE_MB=64
|
||||
FIRMWARE_DIR="./firmware_files"
|
||||
|
||||
|
||||
# Clean up existing image
|
||||
if [ -f "$IMAGE_NAME" ]; then
|
||||
echo "[*] Removing existing $IMAGE_NAME..."
|
||||
rm -f "$IMAGE_NAME"
|
||||
fi
|
||||
|
||||
# Create empty image
|
||||
echo "[*] Creating ${IMAGE_SIZE_MB}MB SD image..."
|
||||
dd if=/dev/zero of="$IMAGE_NAME" bs=1M count=$IMAGE_SIZE_MB
|
||||
|
||||
# Format image as FAT32
|
||||
echo "[*] Formatting image as FAT32..."
|
||||
mformat -i sd.img -F ::
|
||||
|
||||
# Copy all files from firmware_files/ into root of SD image
|
||||
echo "[*] Copying files from '$FIRMWARE_DIR' to image..."
|
||||
mcopy -i "$IMAGE_NAME" -s "$FIRMWARE_DIR"/* ::/
|
||||
|
||||
echo "[✓] SD card image '$IMAGE_NAME' is ready."
|
||||
Reference in New Issue
Block a user