From 43fd7b0abbccde7fed3b049cf4e0136e113c13fe Mon Sep 17 00:00:00 2001 From: Victor Fusco <1221933+vfusco@users.noreply.github.com> Date: Sun, 3 Dec 2023 13:57:22 -0300 Subject: [PATCH] refactor: reorganize repo structure --- .github/workflows/main.yml | 12 +++--- Dockerfile | 43 +++++++++++-------- Makefile | 2 +- fs.Dockerfile => fs/Dockerfile | 0 .../http => rollup-http}/echo-dapp/Cargo.lock | 0 .../http => rollup-http}/echo-dapp/Cargo.toml | 0 .../http => rollup-http}/echo-dapp/README.md | 0 .../http => rollup-http}/echo-dapp/build.sh | 0 .../echo-dapp/environment.sh | 0 .../echo-dapp/src/config.rs | 0 .../echo-dapp/src/main.rs | 0 .../rollup-http-client/.gitignore | 0 .../rollup-http-client/Cargo.toml | 0 .../rollup-http-client/src/client.rs | 0 .../rollup-http-client/src/lib.rs | 0 .../rollup-http-client/src/rollup.rs | 0 .../rollup-http-server/Cargo.lock | 0 .../rollup-http-server/Cargo.toml | 0 .../rollup-http-server/README.md | 0 .../rollup-http-server/build.rs | 0 .../rollup-http-server/build.sh | 0 .../rollup-http-server/environment.sh | 0 .../rollup-http-server/src/config.rs | 0 .../rollup-http-server/src/dapp_process.rs | 0 .../rollup-http-server/src/http_service.rs | 0 .../rollup-http-server/src/lib.rs | 0 .../rollup-http-server/src/main.rs | 0 .../rollup-http-server/src/rollup/bindings.c | 0 .../rollup-http-server/src/rollup/bindings.h | 0 .../rollup-http-server/src/rollup/bindings.rs | 0 .../rollup-http-server/src/rollup/mod.rs | 0 .../tests/rollup-http-server-tests.rs | 0 .../tests/rollup_test_bindings.c | 0 .../tests/rollup_test_bindings.h | 0 .../rollup-init}/rollup-init | 2 +- skel/etc/hostname | 1 - .../ioctl-echo-loop/Makefile | 0 .../ioctl-echo-loop/ioctl-echo-loop.c | 0 {linux/utils => sys-utils/misc}/flashdrive | 0 {linux/utils => sys-utils/misc}/readbe64 | 0 {linux/utils => sys-utils/misc}/writebe64 | 0 {linux/rollup => sys-utils}/rollup/Makefile | 0 {linux/rollup => sys-utils}/rollup/json.hpp | 0 {linux/rollup => sys-utils}/rollup/rollup.cpp | 0 .../init => sys-utils/system-init/system-init | 0 {linux => sys-utils}/xhalt/.gitignore | 0 {linux => sys-utils}/xhalt/Makefile | 0 {linux => sys-utils}/xhalt/README.md | 0 {linux => sys-utils}/xhalt/xhalt.c | 0 {linux/htif => sys-utils/yield}/.gitignore | 0 {linux/htif => sys-utils/yield}/Makefile | 0 {linux/htif => sys-utils/yield}/README.md | 0 {linux/htif => sys-utils/yield}/yield.c | 0 53 files changed, 32 insertions(+), 28 deletions(-) rename fs.Dockerfile => fs/Dockerfile (100%) rename {linux/rollup/http => rollup-http}/echo-dapp/Cargo.lock (100%) rename {linux/rollup/http => rollup-http}/echo-dapp/Cargo.toml (100%) rename {linux/rollup/http => rollup-http}/echo-dapp/README.md (100%) rename {linux/rollup/http => rollup-http}/echo-dapp/build.sh (100%) rename {linux/rollup/http => rollup-http}/echo-dapp/environment.sh (100%) rename {linux/rollup/http => rollup-http}/echo-dapp/src/config.rs (100%) rename {linux/rollup/http => rollup-http}/echo-dapp/src/main.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-client/.gitignore (100%) rename {linux/rollup/http => rollup-http}/rollup-http-client/Cargo.toml (100%) rename {linux/rollup/http => rollup-http}/rollup-http-client/src/client.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-client/src/lib.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-client/src/rollup.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/Cargo.lock (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/Cargo.toml (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/README.md (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/build.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/build.sh (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/environment.sh (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/config.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/dapp_process.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/http_service.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/lib.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/main.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/rollup/bindings.c (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/rollup/bindings.h (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/rollup/bindings.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/src/rollup/mod.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/tests/rollup-http-server-tests.rs (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/tests/rollup_test_bindings.c (100%) rename {linux/rollup/http => rollup-http}/rollup-http-server/tests/rollup_test_bindings.h (100%) rename {linux/utils => rollup-http/rollup-init}/rollup-init (93%) delete mode 100644 skel/etc/hostname rename {linux/rollup => sys-utils}/ioctl-echo-loop/Makefile (100%) rename {linux/rollup => sys-utils}/ioctl-echo-loop/ioctl-echo-loop.c (100%) rename {linux/utils => sys-utils/misc}/flashdrive (100%) rename {linux/utils => sys-utils/misc}/readbe64 (100%) rename {linux/utils => sys-utils/misc}/writebe64 (100%) rename {linux/rollup => sys-utils}/rollup/Makefile (100%) rename {linux/rollup => sys-utils}/rollup/json.hpp (100%) rename {linux/rollup => sys-utils}/rollup/rollup.cpp (100%) rename skel/opt/cartesi/bin/init => sys-utils/system-init/system-init (100%) rename {linux => sys-utils}/xhalt/.gitignore (100%) rename {linux => sys-utils}/xhalt/Makefile (100%) rename {linux => sys-utils}/xhalt/README.md (100%) rename {linux => sys-utils}/xhalt/xhalt.c (100%) rename {linux/htif => sys-utils/yield}/.gitignore (100%) rename {linux/htif => sys-utils/yield}/Makefile (100%) rename {linux/htif => sys-utils/yield}/README.md (100%) rename {linux/htif => sys-utils/yield}/yield.c (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ad4b522..06f0163c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -121,21 +121,21 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Build yield tool - run: cd linux/htif && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make yield.toolchain" + run: cd sys-utils/yield && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make yield.toolchain" - name: Build ioctl-echo-loop tool - run: cd linux/rollup/ioctl-echo-loop && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make ioctl-echo-loop.toolchain" + run: cd sys-utils/ioctl-echo-loop && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make ioctl-echo-loop.toolchain" - name: Build rollup tool - run: cd linux/rollup/rollup && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make rollup.toolchain" + run: cd sys-utils/rollup && make toolchain-exec CONTAINER_COMMAND="/usr/bin/make rollup.toolchain" - name: Build rollup http server - run: cd linux/rollup/http/rollup-http-server && ./build.sh + run: cd rollup-http/rollup-http-server && ./build.sh - name: Build echo dapp - run: cd linux/rollup/http/echo-dapp && ./build.sh + run: cd rollup-http/echo-dapp && ./build.sh - name: Test rollup-http-server and echo-dapp client run: | - cd linux/rollup/http/rollup-http-server + cd rollup-http/rollup-http-server USE_ROLLUP_BINDINGS_MOCK=1 cargo test -- --show-output --test-threads=1 diff --git a/Dockerfile b/Dockerfile index 1048a5e9..45228091 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,15 +42,15 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ rm -rf /var/lib/apt/lists/* ${LINUX_HEADERS_FILEPATH} FROM tools-env as builder -COPY linux/ ${BUILD_BASE}/tools/linux/ +COPY sys-utils/ ${BUILD_BASE}/tools/sys-utils/ # build C/C++ tools # ------------------------------------------------------------------------------ FROM builder as c-builder -RUN make -C ${BUILD_BASE}/tools/linux/xhalt/ CROSS_COMPILE="" xhalt.toolchain -RUN make -C ${BUILD_BASE}/tools/linux/htif/ CROSS_COMPILE="" yield.toolchain -RUN make -C ${BUILD_BASE}/tools/linux/rollup/ioctl-echo-loop/ CROSS_COMPILE="" ioctl-echo-loop.toolchain -RUN make -C ${BUILD_BASE}/tools/linux/rollup/rollup/ CROSS_COMPILE="" rollup.toolchain +RUN make -C ${BUILD_BASE}/tools/sys-utils/xhalt/ CROSS_COMPILE="" xhalt.toolchain +RUN make -C ${BUILD_BASE}/tools/sys-utils/yield/ CROSS_COMPILE="" yield.toolchain +RUN make -C ${BUILD_BASE}/tools/sys-utils/ioctl-echo-loop/ CROSS_COMPILE="" ioctl-echo-loop.toolchain +RUN make -C ${BUILD_BASE}/tools/sys-utils/rollup/ CROSS_COMPILE="" rollup.toolchain # build rust tools # ------------------------------------------------------------------------------ @@ -61,12 +61,14 @@ RUN mkdir -p $HOME/.cargo && \ echo "[net]" >> $HOME/.cargo/config && \ echo "git-fetch-with-cli = true" >> $HOME/.cargo/config -FROM rust-builder as echo-dapp-builder -RUN cd ${BUILD_BASE}/tools/linux/rollup/http/echo-dapp && \ - cargo build --release +COPY rollup-http/ ${BUILD_BASE}/tools/rollup-http/ FROM rust-builder as http-server-builder -RUN cd ${BUILD_BASE}/tools/linux/rollup/http/rollup-http-server && \ +RUN cd ${BUILD_BASE}/tools/rollup-http/rollup-http-server && \ + cargo build --release + +FROM rust-builder as echo-dapp-builder +RUN cd ${BUILD_BASE}/tools/rollup-http/echo-dapp && \ cargo build --release # pack tools (deb) @@ -75,19 +77,22 @@ FROM c-builder as packer ARG TOOLS_DEB=machine-emulator-tools.deb ARG STAGING_BASE=${BUILD_BASE}/_install ARG STAGING_DEBIAN=${STAGING_BASE}/DEBIAN -ARG STAGING_BIN=${STAGING_BASE}/opt/cartesi/bin +ARG STAGING_SBIN=${STAGING_BASE}/usr/sbin +ARG STAGING_BIN=${STAGING_BASE}/usr/bin -RUN mkdir -p ${STAGING_DEBIAN} ${STAGING_BIN} && \ - cp ${BUILD_BASE}/tools/linux/xhalt/xhalt ${STAGING_BIN} && \ - cp ${BUILD_BASE}/tools/linux/htif/yield ${STAGING_BIN} && \ - cp ${BUILD_BASE}/tools/linux/rollup/ioctl-echo-loop/ioctl-echo-loop ${STAGING_BIN} && \ - cp ${BUILD_BASE}/tools/linux/rollup/rollup/rollup ${STAGING_BIN} && \ - cp ${BUILD_BASE}/tools/linux/utils/* ${STAGING_BIN} +RUN mkdir -p ${STAGING_DEBIAN} ${STAGING_SBIN} ${STAGING_BIN} ${STAGING_BASE}/etc && \ + echo "cartesi-machine" > ${staging_base}/etc/hostname && \ + cp ${BUILD_BASE}/tools/sys-utils/system-init/system-init ${STAGING_SBIN} && \ + cp ${BUILD_BASE}/tools/sys-utils/xhalt/xhalt ${STAGING_SBIN} && \ + cp ${BUILD_BASE}/tools/sys-utils/yield/yield ${STAGING_SBIN} && \ + cp ${BUILD_BASE}/tools/sys-utils/rollup/rollup ${STAGING_SBIN} && \ + cp ${BUILD_BASE}/tools/sys-utils/ioctl-echo-loop/ioctl-echo-loop ${STAGING_BIN} && \ + cp ${BUILD_BASE}/tools/sys-utils/misc/* ${STAGING_BIN} -COPY skel/ ${STAGING_BASE}/ COPY control ${STAGING_DEBIAN}/control -COPY --from=echo-dapp-builder ${BUILD_BASE}/tools/linux/rollup/http/echo-dapp/target/release/echo-dapp ${STAGING_BIN} -COPY --from=http-server-builder ${BUILD_BASE}/tools/linux/rollup/http/rollup-http-server/target/release/rollup-http-server ${STAGING_BIN} +COPY --from=rust-builder ${BUILD_BASE}/tools/rollup-http/rollup-init/rollup-init ${STAGING_SBIN} +COPY --from=http-server-builder ${BUILD_BASE}/tools/rollup-http/rollup-http-server/target/release/rollup-http-server ${STAGING_BIN} +COPY --from=echo-dapp-builder ${BUILD_BASE}/tools/rollup-http/echo-dapp/target/release/echo-dapp ${STAGING_BIN} RUN dpkg-deb -Zxz --root-owner-group --build ${STAGING_BASE} ${BUILD_BASE}/${TOOLS_DEB} diff --git a/Makefile b/Makefile index 9809488b..225b0176 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,7 @@ $(TOOLS_ROOTFS) fs: $(TOOLS_DEB) @docker buildx build --platform=linux/riscv64 \ --build-arg TOOLS=$(TOOLS_DEB) \ --output type=tar,dest=rootfs.tar \ - --file fs.Dockerfile \ + --file fs/Dockerfile \ . && \ bsdtar -cf rootfs.gnutar --format=gnutar @rootfs.tar && \ xgenext2fs -fzB 4096 -i 4096 -a rootfs.gnutar -L rootfs $(TOOLS_ROOTFS) && \ diff --git a/fs.Dockerfile b/fs/Dockerfile similarity index 100% rename from fs.Dockerfile rename to fs/Dockerfile diff --git a/linux/rollup/http/echo-dapp/Cargo.lock b/rollup-http/echo-dapp/Cargo.lock similarity index 100% rename from linux/rollup/http/echo-dapp/Cargo.lock rename to rollup-http/echo-dapp/Cargo.lock diff --git a/linux/rollup/http/echo-dapp/Cargo.toml b/rollup-http/echo-dapp/Cargo.toml similarity index 100% rename from linux/rollup/http/echo-dapp/Cargo.toml rename to rollup-http/echo-dapp/Cargo.toml diff --git a/linux/rollup/http/echo-dapp/README.md b/rollup-http/echo-dapp/README.md similarity index 100% rename from linux/rollup/http/echo-dapp/README.md rename to rollup-http/echo-dapp/README.md diff --git a/linux/rollup/http/echo-dapp/build.sh b/rollup-http/echo-dapp/build.sh similarity index 100% rename from linux/rollup/http/echo-dapp/build.sh rename to rollup-http/echo-dapp/build.sh diff --git a/linux/rollup/http/echo-dapp/environment.sh b/rollup-http/echo-dapp/environment.sh similarity index 100% rename from linux/rollup/http/echo-dapp/environment.sh rename to rollup-http/echo-dapp/environment.sh diff --git a/linux/rollup/http/echo-dapp/src/config.rs b/rollup-http/echo-dapp/src/config.rs similarity index 100% rename from linux/rollup/http/echo-dapp/src/config.rs rename to rollup-http/echo-dapp/src/config.rs diff --git a/linux/rollup/http/echo-dapp/src/main.rs b/rollup-http/echo-dapp/src/main.rs similarity index 100% rename from linux/rollup/http/echo-dapp/src/main.rs rename to rollup-http/echo-dapp/src/main.rs diff --git a/linux/rollup/http/rollup-http-client/.gitignore b/rollup-http/rollup-http-client/.gitignore similarity index 100% rename from linux/rollup/http/rollup-http-client/.gitignore rename to rollup-http/rollup-http-client/.gitignore diff --git a/linux/rollup/http/rollup-http-client/Cargo.toml b/rollup-http/rollup-http-client/Cargo.toml similarity index 100% rename from linux/rollup/http/rollup-http-client/Cargo.toml rename to rollup-http/rollup-http-client/Cargo.toml diff --git a/linux/rollup/http/rollup-http-client/src/client.rs b/rollup-http/rollup-http-client/src/client.rs similarity index 100% rename from linux/rollup/http/rollup-http-client/src/client.rs rename to rollup-http/rollup-http-client/src/client.rs diff --git a/linux/rollup/http/rollup-http-client/src/lib.rs b/rollup-http/rollup-http-client/src/lib.rs similarity index 100% rename from linux/rollup/http/rollup-http-client/src/lib.rs rename to rollup-http/rollup-http-client/src/lib.rs diff --git a/linux/rollup/http/rollup-http-client/src/rollup.rs b/rollup-http/rollup-http-client/src/rollup.rs similarity index 100% rename from linux/rollup/http/rollup-http-client/src/rollup.rs rename to rollup-http/rollup-http-client/src/rollup.rs diff --git a/linux/rollup/http/rollup-http-server/Cargo.lock b/rollup-http/rollup-http-server/Cargo.lock similarity index 100% rename from linux/rollup/http/rollup-http-server/Cargo.lock rename to rollup-http/rollup-http-server/Cargo.lock diff --git a/linux/rollup/http/rollup-http-server/Cargo.toml b/rollup-http/rollup-http-server/Cargo.toml similarity index 100% rename from linux/rollup/http/rollup-http-server/Cargo.toml rename to rollup-http/rollup-http-server/Cargo.toml diff --git a/linux/rollup/http/rollup-http-server/README.md b/rollup-http/rollup-http-server/README.md similarity index 100% rename from linux/rollup/http/rollup-http-server/README.md rename to rollup-http/rollup-http-server/README.md diff --git a/linux/rollup/http/rollup-http-server/build.rs b/rollup-http/rollup-http-server/build.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/build.rs rename to rollup-http/rollup-http-server/build.rs diff --git a/linux/rollup/http/rollup-http-server/build.sh b/rollup-http/rollup-http-server/build.sh similarity index 100% rename from linux/rollup/http/rollup-http-server/build.sh rename to rollup-http/rollup-http-server/build.sh diff --git a/linux/rollup/http/rollup-http-server/environment.sh b/rollup-http/rollup-http-server/environment.sh similarity index 100% rename from linux/rollup/http/rollup-http-server/environment.sh rename to rollup-http/rollup-http-server/environment.sh diff --git a/linux/rollup/http/rollup-http-server/src/config.rs b/rollup-http/rollup-http-server/src/config.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/src/config.rs rename to rollup-http/rollup-http-server/src/config.rs diff --git a/linux/rollup/http/rollup-http-server/src/dapp_process.rs b/rollup-http/rollup-http-server/src/dapp_process.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/src/dapp_process.rs rename to rollup-http/rollup-http-server/src/dapp_process.rs diff --git a/linux/rollup/http/rollup-http-server/src/http_service.rs b/rollup-http/rollup-http-server/src/http_service.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/src/http_service.rs rename to rollup-http/rollup-http-server/src/http_service.rs diff --git a/linux/rollup/http/rollup-http-server/src/lib.rs b/rollup-http/rollup-http-server/src/lib.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/src/lib.rs rename to rollup-http/rollup-http-server/src/lib.rs diff --git a/linux/rollup/http/rollup-http-server/src/main.rs b/rollup-http/rollup-http-server/src/main.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/src/main.rs rename to rollup-http/rollup-http-server/src/main.rs diff --git a/linux/rollup/http/rollup-http-server/src/rollup/bindings.c b/rollup-http/rollup-http-server/src/rollup/bindings.c similarity index 100% rename from linux/rollup/http/rollup-http-server/src/rollup/bindings.c rename to rollup-http/rollup-http-server/src/rollup/bindings.c diff --git a/linux/rollup/http/rollup-http-server/src/rollup/bindings.h b/rollup-http/rollup-http-server/src/rollup/bindings.h similarity index 100% rename from linux/rollup/http/rollup-http-server/src/rollup/bindings.h rename to rollup-http/rollup-http-server/src/rollup/bindings.h diff --git a/linux/rollup/http/rollup-http-server/src/rollup/bindings.rs b/rollup-http/rollup-http-server/src/rollup/bindings.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/src/rollup/bindings.rs rename to rollup-http/rollup-http-server/src/rollup/bindings.rs diff --git a/linux/rollup/http/rollup-http-server/src/rollup/mod.rs b/rollup-http/rollup-http-server/src/rollup/mod.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/src/rollup/mod.rs rename to rollup-http/rollup-http-server/src/rollup/mod.rs diff --git a/linux/rollup/http/rollup-http-server/tests/rollup-http-server-tests.rs b/rollup-http/rollup-http-server/tests/rollup-http-server-tests.rs similarity index 100% rename from linux/rollup/http/rollup-http-server/tests/rollup-http-server-tests.rs rename to rollup-http/rollup-http-server/tests/rollup-http-server-tests.rs diff --git a/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.c b/rollup-http/rollup-http-server/tests/rollup_test_bindings.c similarity index 100% rename from linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.c rename to rollup-http/rollup-http-server/tests/rollup_test_bindings.c diff --git a/linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.h b/rollup-http/rollup-http-server/tests/rollup_test_bindings.h similarity index 100% rename from linux/rollup/http/rollup-http-server/tests/rollup_test_bindings.h rename to rollup-http/rollup-http-server/tests/rollup_test_bindings.h diff --git a/linux/utils/rollup-init b/rollup-http/rollup-init/rollup-init similarity index 93% rename from linux/utils/rollup-init rename to rollup-http/rollup-init/rollup-init index 2d5e25e1..53b3387b 100755 --- a/linux/utils/rollup-init +++ b/rollup-http/rollup-init/rollup-init @@ -16,7 +16,7 @@ # limitations under the License. # -busybox sh -c "/opt/cartesi/bin/rollup-http-server $*" +busybox sh -c "/usr/bin/rollup-http-server $*" MESSAGE="rollup-http-server exited with $? status" echo "$MESSAGE" echo "{\"payload\": \"$MESSAGE\"}" | rollup exception diff --git a/skel/etc/hostname b/skel/etc/hostname deleted file mode 100644 index 9af48ec4..00000000 --- a/skel/etc/hostname +++ /dev/null @@ -1 +0,0 @@ -cartesi-machine diff --git a/linux/rollup/ioctl-echo-loop/Makefile b/sys-utils/ioctl-echo-loop/Makefile similarity index 100% rename from linux/rollup/ioctl-echo-loop/Makefile rename to sys-utils/ioctl-echo-loop/Makefile diff --git a/linux/rollup/ioctl-echo-loop/ioctl-echo-loop.c b/sys-utils/ioctl-echo-loop/ioctl-echo-loop.c similarity index 100% rename from linux/rollup/ioctl-echo-loop/ioctl-echo-loop.c rename to sys-utils/ioctl-echo-loop/ioctl-echo-loop.c diff --git a/linux/utils/flashdrive b/sys-utils/misc/flashdrive similarity index 100% rename from linux/utils/flashdrive rename to sys-utils/misc/flashdrive diff --git a/linux/utils/readbe64 b/sys-utils/misc/readbe64 similarity index 100% rename from linux/utils/readbe64 rename to sys-utils/misc/readbe64 diff --git a/linux/utils/writebe64 b/sys-utils/misc/writebe64 similarity index 100% rename from linux/utils/writebe64 rename to sys-utils/misc/writebe64 diff --git a/linux/rollup/rollup/Makefile b/sys-utils/rollup/Makefile similarity index 100% rename from linux/rollup/rollup/Makefile rename to sys-utils/rollup/Makefile diff --git a/linux/rollup/rollup/json.hpp b/sys-utils/rollup/json.hpp similarity index 100% rename from linux/rollup/rollup/json.hpp rename to sys-utils/rollup/json.hpp diff --git a/linux/rollup/rollup/rollup.cpp b/sys-utils/rollup/rollup.cpp similarity index 100% rename from linux/rollup/rollup/rollup.cpp rename to sys-utils/rollup/rollup.cpp diff --git a/skel/opt/cartesi/bin/init b/sys-utils/system-init/system-init similarity index 100% rename from skel/opt/cartesi/bin/init rename to sys-utils/system-init/system-init diff --git a/linux/xhalt/.gitignore b/sys-utils/xhalt/.gitignore similarity index 100% rename from linux/xhalt/.gitignore rename to sys-utils/xhalt/.gitignore diff --git a/linux/xhalt/Makefile b/sys-utils/xhalt/Makefile similarity index 100% rename from linux/xhalt/Makefile rename to sys-utils/xhalt/Makefile diff --git a/linux/xhalt/README.md b/sys-utils/xhalt/README.md similarity index 100% rename from linux/xhalt/README.md rename to sys-utils/xhalt/README.md diff --git a/linux/xhalt/xhalt.c b/sys-utils/xhalt/xhalt.c similarity index 100% rename from linux/xhalt/xhalt.c rename to sys-utils/xhalt/xhalt.c diff --git a/linux/htif/.gitignore b/sys-utils/yield/.gitignore similarity index 100% rename from linux/htif/.gitignore rename to sys-utils/yield/.gitignore diff --git a/linux/htif/Makefile b/sys-utils/yield/Makefile similarity index 100% rename from linux/htif/Makefile rename to sys-utils/yield/Makefile diff --git a/linux/htif/README.md b/sys-utils/yield/README.md similarity index 100% rename from linux/htif/README.md rename to sys-utils/yield/README.md diff --git a/linux/htif/yield.c b/sys-utils/yield/yield.c similarity index 100% rename from linux/htif/yield.c rename to sys-utils/yield/yield.c