add teeonardu to build_package.sh
This commit is contained in:
parent
9ce3968b89
commit
ab747f2d50
4 changed files with 90 additions and 2 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -2,6 +2,6 @@
|
|||
path = hardware/adafruit/samd
|
||||
url = git@github.com:adafruit/ArduinoCore-samd.git
|
||||
[submodule "hardware/teeonardu"]
|
||||
path = hardware/teeonardu
|
||||
path = hardware/teeonardu/avr
|
||||
url = https://github.com/adafruit/TeeOnArdu.git
|
||||
branch = 1.6.x
|
||||
|
|
|
|||
|
|
@ -30,6 +30,75 @@ BOARD_DOWNLOAD_URL="https:\/\/adafruit.github.io\/arduino-board-index\/boards"
|
|||
|
||||
# get package script directory
|
||||
REPO_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
read -r -d '' TEEJSON <<'EOF'
|
||||
{
|
||||
"name":"Adafruit TeeOnArdu",
|
||||
"architecture":"avr",
|
||||
"version":"PACKAGEVERSION",
|
||||
"category":"Adafruit",
|
||||
"url":"DOWNLOADURL/adafruit-teeonardu-PACKAGEVERSION.tar.bz2",
|
||||
"archiveFileName":"adafruit-teeonardu-PACKAGEVERSION.tar.bz2",
|
||||
"checksum":"SHA-256:PACKAGESHA",
|
||||
"size":"PACKAGESIZE",
|
||||
"help":{
|
||||
"online":"https://forums.adafruit.com"
|
||||
},
|
||||
"boards":[
|
||||
{
|
||||
"name":"TeeOnArdu (Leo on TeensyCore)"
|
||||
},
|
||||
{
|
||||
"name":"Flora (TeensyCore)"
|
||||
}
|
||||
],
|
||||
"toolsDependencies": []
|
||||
}
|
||||
EOF
|
||||
|
||||
read -r -d '' SAMDJSON <<'EOF'
|
||||
{
|
||||
"name":"Adafruit SAMD Boards",
|
||||
"architecture":"samd",
|
||||
"version":"PACKAGEVERSION",
|
||||
"category":"Adafruit",
|
||||
"url":"DOWNLOADURL/adafruit-samd-PACKAGEVERSION.tar.bz2",
|
||||
"archiveFileName":"adafruit-samd-PACKAGEVERSION.tar.bz2",
|
||||
"checksum":"SHA-256:PACKAGESHA",
|
||||
"size":"PACKAGESIZE",
|
||||
"help":{
|
||||
"online":"https://forums.adafruit.com"
|
||||
},
|
||||
"boards":[
|
||||
{
|
||||
"name":"Adafruit Feather M0"
|
||||
}
|
||||
],
|
||||
"toolsDependencies": [
|
||||
{
|
||||
"packager": "arduino",
|
||||
"name": "arm-none-eabi-gcc",
|
||||
"version": "4.8.3-2014q1"
|
||||
},
|
||||
{
|
||||
"packager": "arduino",
|
||||
"name": "bossac",
|
||||
"version": "1.6.1-arduino"
|
||||
},
|
||||
{
|
||||
"packager": "arduino",
|
||||
"name": "openocd",
|
||||
"version": "0.9.0-arduino"
|
||||
},
|
||||
{
|
||||
"packager": "arduino",
|
||||
"name": "CMSIS",
|
||||
"version": "4.0.0-atmel"
|
||||
}
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
read -r -d '' SAMDJSON <<'EOF'
|
||||
{
|
||||
"name":"Adafruit SAMD Boards",
|
||||
|
|
@ -190,3 +259,22 @@ echo $SAMDJSON | sed -e "s/PACKAGEVERSION/$PACKAGE_VERSION/g" \
|
|||
-e "s/DOWNLOADURL/$BOARD_DOWNLOAD_URL/g" \
|
||||
-e "s/PACKAGESHA/$PACKAGESHA/g" \
|
||||
-e "s/PACKAGESIZE/$PACKAGESIZE/g" > build/samd_package.json
|
||||
|
||||
read -p "TeeOnArdu VERSION: " input
|
||||
PACKAGE_VERSION=$input
|
||||
|
||||
cd $REPO_DIR
|
||||
|
||||
#update platform version
|
||||
sed -i .bak -e "s/^version=.*/version=$PACKAGE_VERSION/" hardware/teeonardu/avr/platform.txt
|
||||
|
||||
# create archives and get sha & size
|
||||
archive "adafruit-teeonardu-$PACKAGE_VERSION" hardware/teeonardu/avr PACKAGESHA PACKAGESIZE
|
||||
|
||||
cd $REPO_DIR
|
||||
|
||||
# fill in board json templatee
|
||||
echo $TEEJSON | sed -e "s/PACKAGEVERSION/$PACKAGE_VERSION/g" \
|
||||
-e "s/DOWNLOADURL/$BOARD_DOWNLOAD_URL/g" \
|
||||
-e "s/PACKAGESHA/$PACKAGESHA/g" \
|
||||
-e "s/PACKAGESIZE/$PACKAGESIZE/g" > build/tee_package.json
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
# - https://github.com/arduino/Arduino/wiki/Arduino-Hardware-Cores-migration-guide-from-1.0-to-1.6
|
||||
#
|
||||
name=Adafruit Boards
|
||||
version=1.4.0
|
||||
version=1.4.1
|
||||
|
||||
# AVR Uploader/Programmers tools
|
||||
# ------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue