Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Renovate #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/build-toolchain.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Build toolchain image

on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: build-toolchain-image
cancel-in-progress: true

jobs:
build_image:
name: Build toolchain image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to image registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/kobo-ssh-toolchain
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=ref,event=branch
type=ref,event=tag

- name: Build image
uses: docker/build-push-action@v6
id: build
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
68 changes: 68 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
FROM debian:bookworm

# Build dependencies
RUN \
apt-get update -y \
&& dpkg --add-architecture armhf \
&& apt-get update -y \
&& apt-get install -y \
autoconf \
autogen \
automake \
bison \
build-essential \
cmake \
cross-gcc-dev \
crossbuild-essential-armhf \
curl \
file \
flex \
g++-arm-linux-gnueabihf \
gawk \
gcc-arm-linux-gnueabihf \
git \
gperf \
help2man \
libglu1-mesa-dev \
libncurses-dev \
libtool \
libtool-bin \
libtool-doc \
libx11-dev \
libx11-dev \
libxext-dev \
libxinerama-dev \
mesa-common-dev \
nasm \
shtool \
texinfo \
unzip \
wget \
xorg-dev

# Pull in crosstool-ng
RUN \
git clone https://github.com/NiLuJe/crosstool-ng /crosstool-ng-sources

# Build crosstool-ng
WORKDIR /crosstool-ng-sources
RUN \
./bootstrap \
&& ./configure \
&& make \
&& make install

# Set up a temp dir to configure crosstool in
RUN \
mkdir -p /crosstool-cfg \
&& /crosstool-cfg \
&& mkdir -p /home/crosstooluser/src \
&& ct-ng arm-kobo-linux-gnueabihf

# Set up a temp user for crosstool to use
RUN \
echo "CT_EXPERIMENTAL=y\n" >> .config \
&& echo "CT_ALLOW_BUILD_AS_ROOT=y\n" >> .config \
&& echo "CT_ALLOW_BUILD_AS_ROOT_SURE=y\n" >> .config \
&& mkdir -p /root/src \
&& ct-ng build
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# kobo-ssh
Build pipeline to compile Dropbear for Kobo

Based on the work of https://github.com/obynio/kobopatch-ssh
3 changes: 3 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
}