mirror of
https://github.com/ruppert/fmini-1.git
synced 2026-12-05 12:24:36 +01:00
22 lines
1.0 KiB
Bash
Executable File
22 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
|
# Copyright (C) 2026 Leo Kuroshita (@kurogedelic), Hügelton Instruments
|
|
# Build Felucca on macOS (see BUILDING.md).
|
|
# ./build.sh [--release X.Y]
|
|
# JIELI_TOOLCHAIN JieLi Linux toolchain (default: ~/.jieli/toolchain)
|
|
# AC79_SDK JieLi AC79 SDK checkout (default: ~/fw-AC79_AIoT_SDK)
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
export JIELI_TOOLCHAIN="${JIELI_TOOLCHAIN:-$HOME/.jieli/toolchain}"
|
|
export AC79_SDK="${AC79_SDK:-$HOME/fw-AC79_AIoT_SDK}"
|
|
PY="${PYTHON:-python3}"
|
|
|
|
"$PY" -c 'import PIL' 2>/dev/null || { echo "build.sh: $PY has no Pillow (pip3 install Pillow)"; exit 1; }
|
|
[ -x "$JIELI_TOOLCHAIN/pi32v2/bin/clang" ] || { echo "build.sh: no toolchain in $JIELI_TOOLCHAIN (run tools/get_toolchain.sh)"; exit 1; }
|
|
[ -f "$AC79_SDK/cpu/wl82/tools/uboot.boot" ] || { echo "build.sh: no JieLi AC79 SDK in $AC79_SDK"; exit 1; }
|
|
if [ "$(uname -s)" != Linux ] || [ "$(uname -m)" != x86_64 ]; then
|
|
docker info >/dev/null 2>&1 || { echo "build.sh: Docker is not running"; exit 1; }
|
|
fi
|
|
exec "$PY" tools/build.py "$@"
|
|
|