Skip to content

Commit

Permalink
fixup! Replace BBL with OpenSBI
Browse files Browse the repository at this point in the history
  • Loading branch information
mpolitzer committed Nov 27, 2023
1 parent b927bd2 commit ec066b3
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 18 deletions.
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
47 changes: 35 additions & 12 deletions configs/default-linux-config
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,35 @@ 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
# CONFIG_INPUT_MOUSE is not set
# 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
Expand All @@ -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
Expand All @@ -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
6 changes: 5 additions & 1 deletion shasumfile
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tools/template/cross-control.template
Original file line number Diff line number Diff line change
@@ -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 <https://discord.com/channels/600597137524391947/1107965671976992878>
Expand Down

0 comments on commit ec066b3

Please sign in to comment.