Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build scripts for outside docker. #38

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions scripts/build-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# This build script is used to build the project outside of the docker container.
# This has been tested on a native Ubuntu 20.04 LTS only, I am not sure if it will work on other platforms.
# It should be executed from the project root directory.

set -e -o pipefail

# Get the current directory and assign to a variable
export ROOTDIR=`pwd`

source ./esp-idf/export.sh
export IOT_SOLUTION_PATH=$ROOTDIR/esp-iot-solution
export TARGET=esp32s3
export CONFIG_TIDAL_VARIANT_DEVBOARD=y

cd $ROOTDIR/micropython
make -C mpy-cross

cd $ROOTDIR/micropython/ports/esp32/boards

ln -sfn $ROOTDIR/tildamk6 $ROOTDIR/micropython/ports/esp32/boards/tildamk6

cd $ROOTDIR/micropython/ports/esp32

# Make sure we update the manifest, otherwise changes will not be picked up
rm build-tildamk6/frozen_content.c || true

make submodules BOARD=tildamk6 USER_C_MODULES="$ROOTDIR"/drivers/micropython.cmake CONFIG_TIDAL_VARIANT_DEVBOARD=y
make BOARD=tildamk6 USER_C_MODULES="$ROOTDIR"/drivers/micropython.cmake CONFIG_TIDAL_VARIANT_DEVBOARD=y $@
14 changes: 14 additions & 0 deletions scripts/setup-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This script setups the build environment for the project when used outside of the docker container.
# This has been tested on a native Ubuntu 20.04 LTS only, I am not sure if it will work on other platforms.
# It should be executed from the project root directory.

sudo apt-get update
sudo apt-get install -y software-properties-common
sudo apt-get update
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install -y build-essential python3-pip libusb-1.0-0-dev cmake wget zip git python3-pillow

# Download the ESP-IDF v4.4 release and install it
# Do this all in one step to avoid creating extraneous layers
mkdir ./esp-idf && git clone -b v4.4 --recurse-submodules https://github.com/espressif/esp-idf /esp-idf && ./esp-idf/install.sh