Skip to content

Commit 9173ba0

Browse files
committed
Build toolchain
1 parent 8641ce1 commit 9173ba0

File tree

3 files changed

+125
-0
lines changed

3 files changed

+125
-0
lines changed
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: Build toolchain image
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: build-toolchain-image
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build_image:
16+
name: Build toolchain image
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Login to image registry
29+
uses: docker/login-action@v3
30+
with:
31+
registry: ghcr.io
32+
username: ${{ github.actor }}
33+
password: ${{ github.token }}
34+
35+
- name: Docker meta
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: |
40+
ghcr.io/${{ github.repository_owner }}/kobo-ssh-toolchain
41+
tags: |
42+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
43+
type=ref,event=branch
44+
type=ref,event=tag
45+
46+
- name: Build image
47+
uses: docker/build-push-action@v6
48+
id: build
49+
with:
50+
context: .
51+
file: ./Dockerfile
52+
push: true
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
55+
cache-from: type=gha
56+
cache-to: type=gha,mode=max

Dockerfile

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
FROM debian:bookworm
2+
3+
ARG DEBIAN_FRONTEND=noninteractive
4+
5+
# Build dependencies
6+
RUN \
7+
apt-get update -y \
8+
&& dpkg --add-architecture armhf \
9+
&& apt-get update -y \
10+
&& apt-get install -y \
11+
autoconf \
12+
autogen \
13+
automake \
14+
bison \
15+
build-essential \
16+
cmake \
17+
cross-gcc-dev \
18+
crossbuild-essential-armhf \
19+
curl \
20+
file \
21+
flex \
22+
g++-arm-linux-gnueabihf \
23+
gawk \
24+
gcc-arm-linux-gnueabihf \
25+
git \
26+
gperf \
27+
help2man \
28+
libglu1-mesa-dev \
29+
libncurses-dev \
30+
libtool \
31+
libtool-bin \
32+
libtool-doc \
33+
libx11-dev \
34+
libx11-dev \
35+
libxext-dev \
36+
libxinerama-dev \
37+
mesa-common-dev \
38+
nasm \
39+
shtool \
40+
texinfo \
41+
unzip \
42+
wget \
43+
xorg-dev \
44+
&& mkdir -p /crosstool-cfg \
45+
&& mkdir -p /home/crosstooluser/src \
46+
&& mkdir -p /root/src
47+
48+
# Pull in crosstool-ng
49+
RUN \
50+
git clone https://github.com/NiLuJe/crosstool-ng /crosstool-ng-sources
51+
52+
# Build crosstool-ng
53+
WORKDIR /crosstool-ng-sources
54+
RUN \
55+
./bootstrap \
56+
&& ./configure \
57+
&& make \
58+
&& make install
59+
60+
WORKDIR /crosstool-cfg
61+
RUN \
62+
ct-ng arm-kobo-linux-gnueabihf
63+
RUN \
64+
echo "CT_EXPERIMENTAL=y\n" >> .config \
65+
&& echo "CT_ALLOW_BUILD_AS_ROOT=y\n" >> .config \
66+
&& echo "CT_ALLOW_BUILD_AS_ROOT_SURE=y\n" >> .config \
67+
&& ct-ng build

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# kobo-ssh
22
Build pipeline to compile Dropbear for Kobo
3+
4+
Based on the work of https://github.com/obynio/kobopatch-ssh

0 commit comments

Comments
 (0)