From ec066b3b4afef3101b4610657930ccb320c85660 Mon Sep 17 00:00:00 2001 From: Marcelo Politzer <251334+mpolitzer@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:14:03 -0300 Subject: [PATCH] fixup! Replace BBL with OpenSBI --- Makefile | 13 ++++++-- build.mk | 4 +-- configs/default-linux-config | 47 ++++++++++++++++++++------- shasumfile | 6 +++- tools/template/cross-control.template | 2 +- 5 files changed, 54 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index a614bf7..7c2a336 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,12 @@ UNAME:=$(shell uname) TAG ?= devel TOOLCHAIN_REPOSITORY ?= cartesi/toolchain TOOLCHAIN_TAG ?= 0.15.0 -KERNEL_VERSION ?= 5.15.63-ctsi-2 +<<<<<<< Updated upstream +KERNEL_VERSION ?= 5.15.63-ctsi-y +======= +KERNEL_VERSION ?= 6.5.9-ctsi-y +KERNEL_BRANCH ?= feature/linux-$(KERNEL_VERSION) +>>>>>>> Stashed changes KERNEL_SRCPATH := dep/linux-${KERNEL_VERSION}.tar.gz OPENSBI_VERSION ?= opensbi-1.2-ctsi-y OPENSBI_SRCPATH := dep/opensbi-${OPENSBI_VERSION}.tar.gz @@ -122,7 +127,11 @@ cartesi-linux-config: cp $(KERNEL_CONFIG) ./cartesi-linux-config $(KERNEL_SRCPATH): - wget -O $@ https://github.com/cartesi/linux/archive/v$(KERNEL_VERSION).tar.gz +<<<<<<< Updated upstream + wget -O $@ https://github.com/cartesi/linux/archive/refs/heads/linux-$(KERNEL_VERSION).tar.gz +======= + wget -O $@ https://github.com/cartesi/linux/archive/refs/heads/$(KERNEL_BRANCH).tar.gz +>>>>>>> Stashed changes clean-config: rm -f ./cartesi-linux-config diff --git a/build.mk b/build.mk index 206f2c1..cd75622 100644 --- a/build.mk +++ b/build.mk @@ -41,7 +41,7 @@ env: LINUX_OPTS=$(JOBS) ARCH=riscv CROSS_COMPILE=$(TOOLCHAIN_PREFIX)- KBUILD_BUILD_TIMESTAMP="$(KERNEL_TIMESTAMP)" KBUILD_BUILD_USER=dapp KBUILD_BUILD_HOST=cartesi $(LINUX_DIR)/vmlinux $(IMAGE) $(HEADERS) &: $(LINUX_DIR)/.config mkdir -p artifacts - $(MAKE) -rC $(LINUX_DIR) $(LINUX_OPTS) olddefconfig + $(MAKE) -rC $(LINUX_DIR) $(LINUX_OPTS) cartesi_defconfig $(MAKE) -rC $(LINUX_DIR) $(LINUX_OPTS) vmlinux Image $(MAKE) -rC $(LINUX_DIR) $(LINUX_OPTS) headers_install \ INSTALL_HDR_PATH=$(abspath work/linux-headers) @@ -67,7 +67,7 @@ native-deb: # HOST == riscv64 # build linux w/ opensbi # ------------------------------------------------------------------------------ -OPENSBI_OPTS=$(JOBS) FW_PAYLOAD_PATH=$(abspath $(IMAGE)) PLATFORM=cartesi CROSS_COMPILE=$(TOOLCHAIN_PREFIX)- +OPENSBI_OPTS=$(JOBS) FW_PAYLOAD=y FW_OPTIONS=0x01 FW_PAYLOAD_PATH=$(abspath $(IMAGE)) PLATFORM=cartesi CROSS_COMPILE=$(TOOLCHAIN_PREFIX)- $(LINUX): $(IMAGE) @mkdir -p artifacts $(MAKE) -rC $(OPENSBI_DIR) $(OPENSBI_OPTS) diff --git a/configs/default-linux-config b/configs/default-linux-config index baf8f18..f793779 100644 --- a/configs/default-linux-config +++ b/configs/default-linux-config @@ -28,16 +28,21 @@ CONFIG_INET=y # CONFIG_WIRELESS is not set CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS_MOUNT=y -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_CFI=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_OF=y -CONFIG_MTD_PLATRAM=y +CONFIG_LIBNVDIMM=y +CONFIG_BLK_DEV_PMEM=y +CONFIG_OF_PMEM=y CONFIG_VIRTIO_BLK=y CONFIG_NETDEVICES=y +CONFIG_TUN=y CONFIG_VIRTIO_NET=y +CONFIG_VSOCKETS=y +CONFIG_VIRTIO_VSOCKETS=y +CONFIG_VHOST_VSOCK=y +CONFIG_VHOST_NET=y +CONFIG_NET_9P=y +CONFIG_NET_9P_VIRTIO=y +CONFIG_VIRTIO_CONSOLE=y +CONFIG_BRIDGE=y # CONFIG_ETHERNET is not set # CONFIG_WLAN is not set # CONFIG_INPUT_KEYBOARD is not set @@ -45,10 +50,13 @@ CONFIG_VIRTIO_NET=y # CONFIG_SERIO is not set CONFIG_SERIAL_EARLYCON_RISCV_SBI=y CONFIG_HVC_RISCV_SBI=y -# CONFIG_HW_RANDOM is not set -# CONFIG_RANDOM_TRUST_BOOTLOADER is not set +CONFIG_RISCV_SBI_V01=y +CONFIG_HW_RANDOM=y +CONFIG_RANDOM_TRUST_BOOTLOADER=y # CONFIG_HWMON is not set # CONFIG_USB_SUPPORT is not set +CONFIG_HW_RANDOM_VIRTIO=y +CONFIG_VIRTIO_BALLOON=y CONFIG_VIRTIO_MMIO=y # CONFIG_IOMMU_SUPPORT is not set # CONFIG_NVMEM is not set @@ -59,8 +67,17 @@ CONFIG_EXT2_FS_SECURITY=y CONFIG_EXT4_FS=y # CONFIG_PROC_PAGE_MONITOR is not set CONFIG_TMPFS=y -# CONFIG_MISC_FILESYSTEMS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_HUGETLBFS=y +CONFIG_MISC_FILESYSTEMS=y +CONFIG_SQUASHFS=y +CONFIG_SQUASHFS_FILE_DIRECT=y +CONFIG_SQUASHFS_ZLIB=y +CONFIG_SQUASHFS_LZ4=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_SQUASHFS_ZSTD=y +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_9P_FS=y CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity" CONFIG_CRYPTO_SHA3=y CONFIG_CRYPTO_KECCAK=y @@ -72,8 +89,14 @@ CONFIG_STRIP_ASM_SYMS=y CONFIG_STACKTRACE=y # CONFIG_FTRACE is not set # CONFIG_RUNTIME_TESTING_MENU is not set -CONFIG_SLAB=y +CONFIG_SLUB=y # CONFIG_FW_LOADER is not set # CONFIG_ALLOW_DEV_COREDUMP is not set CONFIG_JUMP_LABEL=y # CONFIG_LEGACY_PTYS is not set +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=y +# CONFIG_COMPAT is not set +# CONFIG_SUSPEND is not set +CONFIG_STRICT_DEVMEM=y +CONFIG_IO_STRICT_DEVMEM=y diff --git a/shasumfile b/shasumfile index c17bc40..385e12c 100644 --- a/shasumfile +++ b/shasumfile @@ -1,2 +1,6 @@ -e8d4d1882632eac7fd8e433b4eb4db014fd56e645fdad3b89be7d1ca4f20ca07 dep/linux-5.15.63-ctsi-2.tar.gz +<<<<<<< Updated upstream +ba052ec5118d21b0bbea3bdcd866a81b3b68029f69464074ca26f0cda4447bb9 dep/linux-5.15.63-ctsi-y.tar.gz +======= +ae0be0a9e81a00fc7ab661c5d6807cbcddd5ce0950112597684dec1d6287fafa dep/linux-6.5.9-ctsi-y.tar.gz +>>>>>>> Stashed changes dad6cc6b0efeb3fd34d80199279dbaf7217c2f2179a5fdb639c3829e62f6b44a dep/opensbi-opensbi-1.2-ctsi-y.tar.gz diff --git a/tools/template/cross-control.template b/tools/template/cross-control.template index 9ad6172..9d76389 100644 --- a/tools/template/cross-control.template +++ b/tools/template/cross-control.template @@ -1,6 +1,6 @@ Package: linux-libc-dev-riscv64-cross Version: ARG_KERNEL_VERSION -Architecture: any +Architecture: amd64 Priority: optional Section: devel Maintainer: Machine Reference Unit