Skip to content

Commit

Permalink
Add AVR toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
ltekieli committed Apr 18, 2023
1 parent e232b8d commit 8291b3a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ct-ng-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
crosstool-ng-1.25.0
0ce5b27
6 changes: 6 additions & 0 deletions avr_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CT_CONFIG_VERSION="4"
CT_LOCAL_TARBALLS_DIR="${CT_PREFIX}/downloads"
CT_ARCH_AVR=y
CT_STATIC_TOOLCHAIN=y
CT_CC_LANG_CXX=y
CT_DEBUG_GDB=y
24 changes: 18 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ source ~/.ct-ng-$(cat ./.ct-ng-version)/activate
mkdir -p output/downloads
export CT_PREFIX=${PWD}/output

TAG=2022.05.01
TAG=2023.04.01
MTIME="2023-04-01 00:00Z"

function _build() {
CONFIG=$1
Expand All @@ -15,7 +16,7 @@ function _build() {

tar -c \
--sort=name \
--mtime="${TAG}" \
--mtime="${MTIME}" \
--owner=0 \
--group=0 \
--numeric-owner \
Expand All @@ -27,6 +28,8 @@ function _build() {

function _release() {
hub release create -m "v${TAG}" \
-a output/avr.tar.gz \
-a output/avr.tar.gz.sha256 \
-a output/aarch64-rpi3-linux-gnu.tar.gz \
-a output/aarch64-rpi3-linux-gnu.tar.gz.sha256 \
-a output/arm-cortex_a8-linux-gnueabihf.tar.gz \
Expand All @@ -36,7 +39,16 @@ function _release() {
"v${TAG}"
}

_build aarch64-rpi3-linux-gnu
_build arm-cortex_a8-linux-gnueabihf
_build armv6-rpi-linux-gnueabihf
_build x86_64-unknown-linux-gnu
function help() {
ct-ng version
}

if [ $# -eq 0 ]; then
_build avr
_build aarch64-rpi3-linux-gnu
_build arm-cortex_a8-linux-gnueabihf
_build armv6-rpi-linux-gnueabihf
_build x86_64-unknown-linux-gnu
else
"$@"
fi

0 comments on commit 8291b3a

Please sign in to comment.