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

feat: add xgenext2fs #19

Merged
merged 1 commit into from
Nov 30, 2023
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for Linux/ARM64 images
- Added support fot the GitHub registry
- Added support for building multiple toolchains (RV64G and RV64IMA)
- Added xgenext2fs to image

### Changed
- Changed base image from Ubuntu 22.04 to Debian Bookworm
Expand Down
14 changes: 13 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ LABEL maintainer="Machine Reference Unit <https://discord.com/channels/600597137

ARG KERNEL_VERSION # define on makefile or CI
ARG TOOLCHAIN_CONFIG=configs/ct-ng-config
ARG TARGETARCH

ENV DEBIAN_FRONTEND=noninteractive

Expand All @@ -33,10 +34,21 @@ RUN \
build-essential autoconf automake libtool libtool-bin autotools-dev \
git make pkg-config patchutils gawk bison flex ca-certificates gnupg \
device-tree-compiler libmpc-dev libmpfr-dev libgmp-dev rsync cpio \
libusb-1.0-0-dev texinfo gperf bc zlib1g-dev libncurses-dev genext2fs \
libusb-1.0-0-dev texinfo gperf bc zlib1g-dev libncurses-dev \
wget vim wget curl zip unzip libexpat-dev python3 help2man && \
rm -rf /var/lib/apt/lists/*

RUN \
wget -O /tmp/xgenext2fs.deb https://github.com/cartesi/genext2fs/releases/download/v1.15.3/xgenext2fs_${TARGETARCH}.deb && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it makes sense to move the version to the env var here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'm actually ambivalent to it.
But we'll have to edit this file on any change to xgenext2fs either way due to the checksums.

case ${TARGETARCH} in \
amd64) echo "f34bc34253209f6c024b97723eac7573eccb7ab62034d3d99e60df438c3458a5 /tmp/xgenext2fs.deb" | sha256sum --check ;; \
arm64) echo "9e6cee8e9e9e8bb5b0c51f666b848ea7a1a97e663058dcdb37a17bde76ad221a /tmp/xgenext2fs.deb" | sha256sum --check ;; \
esac && \
apt-get update && \
apt-get install --no-install-recommends -y \
/tmp/xgenext2fs.deb && \
rm -rf /var/lib/apt/lists/*

RUN \
adduser developer -u 499 --gecos ",,," --disabled-password && \
mkdir -m 775 -p $BASE $BUILD_BASE && \
Expand Down