-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #2.
- Loading branch information
Showing
11 changed files
with
1,335 additions
and
227 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/.idea | ||
/.config | ||
/.config.old | ||
/build | ||
/result | ||
/build.log | ||
/crosstool-ng* | ||
/*.tar.xz | ||
/*.tar.xz.asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
/_build | ||
/.idea | ||
/.config | ||
/.config.old | ||
/build | ||
/result | ||
/build.log | ||
/crosstool-ng* | ||
/*.tar.xz | ||
/*.tar.xz.asc |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:eoan | ||
|
||
ARG CTVER=1.24.0 | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
ARG USER=toolchain | ||
ARG GROUP=toolchain | ||
|
||
RUN apt-get update | ||
RUN apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \ | ||
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \ | ||
patch libstdc++6 rsync wget git | ||
|
||
RUN wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-$CTVER.tar.xz && \ | ||
tar xf crosstool-ng-$CTVER.tar.xz && \ | ||
cd crosstool-ng-$CTVER && \ | ||
./configure && \ | ||
make && make install | ||
|
||
RUN groupadd -g $GID $GROUP | ||
RUN useradd -ms /bin/bash -u $UID -g $GID $USER | ||
|
||
USER $USER | ||
RUN mkdir -p /home/$USER/rpi-toolchain | ||
WORKDIR /home/$USER/rpi-toolchain | ||
COPY --chown=toolchain:toolchain . . | ||
RUN make | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
TARGET:=arm-linux-gnueabihf | ||
VERSION:=$(shell git describe --always --dirty) | ||
NAME:=raspbian-$(VERSION) | ||
TOOLCHAIN:=toolchain-$(NAME)-x86_64-$(TARGET) | ||
SRC:=src-$(NAME) | ||
URL:=https://github.com/ali1234/rpi-toolchain/issues/new?body=Version:%20$(VERSION) | ||
|
||
export DEB_TARGET_MULTIARCH=$(TARGET) | ||
|
||
all: $(TOOLCHAIN).tar.xz.asc $(SRC).tar.xz.asc | ||
|
||
%.tar.xz.asc: %.tar.xz | ||
sha256sum $< > $@ | ||
|
||
.config: ct-ng-config | ||
sed -E -e 's|^(CT_TOOLCHAIN_PKGVERSION)=.*|\1=\"$(NAME)\"|' \ | ||
-e 's|^(CT_TOOLCHAIN_BUGURL)=.*|\1=\"$(NAME)\"|' ct-ng-config > .config | ||
|
||
result/success: .config | ||
ct-ng build && touch result/success | ||
|
||
$(TOOLCHAIN).tar.xz: result/success | ||
rm -rf --one-file-system result/$(TOOLCHAIN) | ||
mkdir result/$(TOOLCHAIN) | ||
rsync -av result/$(TARGET)/* result/$(TOOLCHAIN) | ||
ct-ng --version > result/$(TOOLCHAIN)/ct-ng-version | ||
cp .config result/$(TOOLCHAIN)/ct-ng-config | ||
tar Jcf $(TOOLCHAIN).tar.xz --directory result $(TOOLCHAIN) | ||
|
||
$(SRC).tar.xz: result/success | ||
ct-ng --version > src/ct-ng-version | ||
cp .config src/ct-ng-config | ||
tar Jcf $(SRC).tar.xz src | ||
|
||
saveconfig: | ||
sed -E -e 's|^(CT_TOOLCHAIN_PKGVERSION)=.*|\1=\"\"|' \ | ||
-e 's|^(CT_TOOLCHAIN_BUGURL)=.*|\1=\"\"|' .config > ct-ng-config | ||
|
||
menuconfig: .config | ||
ct-ng menuconfig | ||
|
||
clean: | ||
rm -rf build result build.log .config .config.old | ||
rm -rf $(TOOLCHAIN).tar.xz $(TOOLCHAIN).tar.xz.asc $(SRC).tar.xz $(SRC).tar.xz.asc | ||
|
||
reallyclean: clean | ||
rm -rf *.tar.xz *.tar.xz.asc | ||
|
||
indocker: | ||
docker build -t rpi-toolchain . | ||
docker create -ti --name rpi-toolchain-tmp rpi-toolchain | ||
docker cp rpi-toolchain-tmp:/home/toolchain/rpi-toolchain/$(TOOLCHAIN).tar.xz . | ||
docker cp rpi-toolchain-tmp:/home/toolchain/rpi-toolchain/$(TOOLCHAIN).tar.xz.asc . | ||
docker cp rpi-toolchain-tmp:/home/toolchain/rpi-toolchain/$(SRC).tar.xz . | ||
docker cp rpi-toolchain-tmp:/home/toolchain/rpi-toolchain/$(SRC).tar.xz.asc . | ||
docker cp rpi-toolchain-tmp:/home/toolchain/rpi-toolchain/build.log . | ||
docker rm -f rpi-toolchain-tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule abe
deleted from
bb166f
Oops, something went wrong.