Skip to content

Commit

Permalink
Merge pull request #1 from Yagoor/feature/gcc-10.3-docker
Browse files Browse the repository at this point in the history
Implemented gcc-arm-none-eabi-10.3-2021.10 for i386
  • Loading branch information
Yagoor authored Apr 10, 2022
2 parents a756d97 + 2ef60b2 commit a6fc9b5
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 110 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: docker-build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-i386:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
with:
fetch-depth: '0'
submodules: 'recursive'
persist-credentials: false

- name: Build docker image
run: |
docker build . -f Dockerfile-i386 -t docker-build-i386 --no-cache --pull
- name: Run docker image
run: |
docker run --cap-add SYS_TIME -v `pwd`:/home/user/repo docker-build-i386 bash --login -c "cd repo && sudo sh build.sh"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: gcc-arm-none-eabi-10.3-2021.10-i386-linux.tar.bz2
path: gcc-arm-none-eabi-10.3-2021.10/pkg/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2
34 changes: 26 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# Source files
gcc-arm-none-eabi-*
###################
####### Vim #######
###################

# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-v][a-z]
[._]sw[a-p]

# Session
Session.vim

# Linux
.bash_history
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags

###################
##### Project #####
###################

gcc-arm-none-eabi-*

# Project
build-prerequisites
install-sources
build-toolchain
###################
####### EOF #######
###################
61 changes: 0 additions & 61 deletions Dockerfile

This file was deleted.

33 changes: 33 additions & 0 deletions Dockerfile-i386
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM i386/ubuntu:16.04

ENV DEBIAN_FRONTEND noninteractive

USER root

RUN apt-get update \
&& apt-get install -y software-properties-common \
&& apt-get -f install -y \
build-essential autoconf autogen bison dejagnu flex flip \
gawk git gperf gzip nsis openssh-client p7zip-full perl \
python-dev libisl-dev scons tcl texinfo tofrodos wget zip \
texlive texlive-extra-utils libncurses5-dev

RUN apt-get -f install -y \
sudo

RUN export uid=1000 gid=1000 && \
mkdir -p /home/user && \
echo "user:x:${uid}:${gid}:user,,,:/home/user:/bin/bash" >> /etc/passwd && \
echo "user:x:${uid}:" >> /etc/group && \
echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers && \
chmod 0440 /etc/sudoers && \
chown ${uid}:${gid} -R /home/user && \
usermod -aG dialout user

USER user

ENV HOME /home/user

WORKDIR ${HOME}

CMD bash --login
35 changes: 0 additions & 35 deletions Makefile

This file was deleted.

24 changes: 24 additions & 0 deletions bootstrap-ubuntu-16.04.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

export DEBIAN_FRONTEND=noninteractive

dpkg --add-architecture i386

apt-get update
apt-get install software-properties-common
add-apt-repository universe
cat >/etc/apt/sources.list.d/xenial.list <<EOF
deb http://archive.ubuntu.com/ubuntu xenial main universe
deb-src http://archive.ubuntu.com/ubuntu xenial main universe
deb http://security.ubuntu.com/ubuntu xenial-security main
EOF
echo ’APT::Default-Release "xenial";> /etc/apt/apt.conf.d/00default

apt-get install -y -t xenial \
gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686

apt-get -f install -y \
build-essential autoconf autogen bison dejagnu flex flip \
gawk git gperf gzip nsis openssh-client p7zip-full perl \
python-dev libisl-dev scons tcl texinfo tofrodos wget zip \
texlive texlive-extra-utils libncurses5-dev
19 changes: 13 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
#!/bin/bash

# Install ARM toolchain
wget -nv https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-src.tar.bz2 && \
RUN tar xjf gcc-arm-none-eabi-9-2020-q2-update-src.tar.bz2 -C /tmp/
./install-sources.sh --skip_steps=mingw32
./build-prerequisites.sh --skip_steps=mingw32
./build-toolchain.sh --skip_steps=mingw32,manual,howto
wget -v https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-src.tar.bz2
tar xjf gcc-arm-none-eabi-10.3-2021.10-src.tar.bz2
cd gcc-arm-none-eabi-10.3-2021.10

# Change date to match arm release
sed -i 's/.*RELEASEDATE=.*/RELEASEDATE=20211001/' build-common.sh
sed -i 's/.*release_year=.*/release_year=2021/' build-common.sh
sed -i 's/.*release_month=.*/release_month=10/' build-common.sh

./install-sources.sh --skip_steps=mingw32
./build-prerequisites.sh --skip_steps=mingw32,howto
./build-toolchain.sh --skip_steps=mingw32,manual,howto

0 comments on commit a6fc9b5

Please sign in to comment.