From ab2755aa74d23c0a4e4a0364f7aac4ebe03565d5 Mon Sep 17 00:00:00 2001 From: Marcelo Politzer <251334+mpolitzer@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:10:36 -0300 Subject: [PATCH 1/3] feat!: Replaced cartesi/toolchain by debian cross compiler --- CHANGELOG.md | 1 + Dockerfile | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30f8a69..69c3820 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- Replaced cartesi/toolchain by debian cross compiler ## [0.19.1] - 2023-12-05 ### Fix diff --git a/Dockerfile b/Dockerfile index ca50af1..e9e3b14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,23 +14,51 @@ # limitations under the License. # -ARG TOOLCHAIN_REPOSITORY=cartesi/toolchain -ARG TOOLCHAIN_VERSION=latest -FROM ${TOOLCHAIN_REPOSITORY}:${TOOLCHAIN_VERSION} +FROM debian:bookworm ARG KERNEL_VERSION=0.0.0-ctsi-y ARG KERNEL_TIMESTAMP="Thu, 01 Jan 1970 00:00:00 +0000" ARG OPENSBI_VERSION=0.0.0-ctsi-y +ARG TARGETARCH ENV DEBIAN_FRONTEND=noninteractive ENV OLDPATH=$PATH +ENV BASE=/opt/riscv ENV BUILD_BASE=$BASE/kernel +# install dependencies +# ------------------------------------------------------------------------------ +RUN apt-get update && \ + apt-get install --no-install-recommends -y \ + bc \ + bison \ + build-essential \ + ca-certificates \ + flex \ + gcc-riscv64-linux-gnu \ + libc6-dev-riscv64-cross \ + make \ + python3 \ + rsync \ + wget + +RUN \ + wget -O /tmp/xgenext2fs.deb https://github.com/cartesi/genext2fs/releases/download/v1.5.3/xgenext2fs_${TARGETARCH}.deb && \ + case ${TARGETARCH} in \ + amd64) echo "a5e52d86d0bf4c2f9cc38370ea762dc5aee502a86abf8520798acbebd9d7f68f /tmp/xgenext2fs.deb" | sha256sum --check ;; \ + arm64) echo "54051a31a10ba5e4f472b8eeaa47c82f3d2e744991995b8ef6981b4c1ba424c2 /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/* + # setup dirs # ------------------------------------------------------------------------------ RUN \ + adduser developer -u 499 --gecos ",,," --disabled-password && \ mkdir -p ${BUILD_BASE}/artifacts && \ chown -R developer:developer ${BUILD_BASE} && \ chmod go+w ${BUILD_BASE} @@ -56,7 +84,10 @@ RUN tar xzf ${BUILD_BASE}/dep/opensbi-${OPENSBI_VERSION}.tar.gz \ # ------------------------------------------------------------------------------ ARG IMAGE_KERNEL_VERSION=0.0.0 COPY build.mk build.mk -RUN make -f build.mk KERNEL_TIMESTAMP="${KERNEL_TIMESTAMP}" IMAGE_KERNEL_VERSION="${IMAGE_KERNEL_VERSION}" +RUN make -f build.mk \ + KERNEL_TIMESTAMP="${KERNEL_TIMESTAMP}" \ + IMAGE_KERNEL_VERSION="${IMAGE_KERNEL_VERSION}" \ + TOOLCHAIN_PREFIX=riscv64-linux-gnu # deb headers # ------------------------------------------------------------------------------ From 745c8c63074499d72b0f8423d0cbd5509dd47ebc Mon Sep 17 00:00:00 2001 From: Marcelo Politzer <251334+mpolitzer@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:45:36 -0300 Subject: [PATCH 2/3] chore!: Release 0.20.0 (output unification) --- CHANGELOG.md | 10 +++++++--- Makefile | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69c3820..54bdec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -- Replaced cartesi/toolchain by debian cross compiler +## [0.20.0] - 2024-02-16 +### Changed +- Update Linux Kernel to v6.5.9-ctsi-2 (rollup & yield replaced by cmio) +- Replace cartesi/toolchain by debian cross compiler ## [0.19.1] - 2023-12-05 ### Fix @@ -110,8 +113,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [0.2.0] - [0.1.0] -[Unreleased]: https://github.com/cartesi/image-kernel/compare/v0.19.1...HEAD -[0.19.1]: https://github.com/cartesi/image-kernel/compare/v0.19.1 +[Unreleased]: https://github.com/cartesi/image-kernel/compare/v0.20.0...HEAD +[0.20.0]: https://github.com/cartesi/image-kernel/compare/v0.20.0 +[0.19.1]: https://github.com/cartesi/image-kernel/releases/tag/v0.19.1 [0.19.0]: https://github.com/cartesi/image-kernel/releases/tag/v0.19.0 [0.18.0]: https://github.com/cartesi/image-kernel/releases/tag/v0.18.0 [0.17.0]: https://github.com/cartesi/image-kernel/releases/tag/v0.17.0 diff --git a/Makefile b/Makefile index 191a556..9661b0e 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,8 @@ .PHONY: all build download push run pull share copy clean checksum MAJOR := 0 -MINOR := 19 -PATCH := 1 +MINOR := 20 +PATCH := 0 LABEL := IMAGE_KERNEL_VERSION?= $(MAJOR).$(MINOR).$(PATCH)$(LABEL) @@ -30,7 +30,7 @@ TOOLCHAIN_TAG ?= 0.16.0 DEP_DIR := dep -KERNEL_VERSION ?= 6.5.9-ctsi-1 +KERNEL_VERSION ?= 6.5.9-ctsi-2 KERNEL_SRCPATH := $(DEP_DIR)/linux-${KERNEL_VERSION}.tar.gz OPENSBI_VERSION ?= 1.3.1-ctsi-1 From d866dd5fe6e82d7f48057af62d2f3a8b10d13060 Mon Sep 17 00:00:00 2001 From: Marcelo Politzer <251334+mpolitzer@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:26:34 -0300 Subject: [PATCH 3/3] chore: Build output unification tag --- Makefile | 4 ++-- shasumfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 9661b0e..4e2c416 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ TOOLCHAIN_TAG ?= 0.16.0 DEP_DIR := dep -KERNEL_VERSION ?= 6.5.9-ctsi-2 +KERNEL_VERSION ?= 6.5.9-ctsi-2-output-unification-test1 KERNEL_SRCPATH := $(DEP_DIR)/linux-${KERNEL_VERSION}.tar.gz OPENSBI_VERSION ?= 1.3.1-ctsi-1 @@ -120,7 +120,7 @@ $(DEP_DIR): mkdir dep $(KERNEL_SRCPATH): | $(DEP_DIR) - wget -O $@ https://github.com/cartesi/linux/archive/refs/tags/v$(KERNEL_VERSION).tar.gz + @wget -O $@ https://github.com/cartesi/linux/archive/v$(KERNEL_VERSION).tar.gz $(OPENSBI_SRCPATH): | $(DEP_DIR) wget -O $@ https://github.com/cartesi/opensbi/archive/refs/tags/v$(OPENSBI_VERSION).tar.gz diff --git a/shasumfile b/shasumfile index c879197..dae3e56 100644 --- a/shasumfile +++ b/shasumfile @@ -1,2 +1,2 @@ -bfc4d196b90592a2a6bef83ead9e196da6ab6d5978b48ee5e8ccf02913355bc2 dep/linux-6.5.9-ctsi-1.tar.gz +7782a5012313ec2365c39590b93cab4565a0c7ea3586daa3bd0ad05b2a8fc869 dep/linux-6.5.9-ctsi-2-output-unification-test1.tar.gz 267da33a34a023d9dcff3e7d9a8d58e7caefaff65441e38ff0114e4683dff176 dep/opensbi-1.3.1-ctsi-1.tar.gz