-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump kernel to 6.5.9 and replace BBL with OpenSBI
- Loading branch information
1 parent
e114b82
commit 6517bd2
Showing
5 changed files
with
54 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
TOOLCHAIN_PREFIX := riscv64-cartesi-linux-gnu | ||
|
||
RISCV_PK_DIR := work/riscv-pk | ||
RISCV_PK_BUILD_DIR := $(RISCV_PK_DIR)/build | ||
OPENSBI_DIR := work/opensbi | ||
OPENSBI_BUILD_DIR := $(OPENSBI_DIR)/build | ||
|
||
LINUX_DIR := work/linux | ||
LINUX_TEST_DIR := $(LINUX_DIR)/tools/testing/selftests | ||
|
@@ -65,23 +65,13 @@ native-deb: # HOST == riscv64 | |
find $(DESTDIR) -exec touch -d "$(KERNEL_TIMESTAMP)" {} \; | ||
SOURCE_DATE_EPOCH="1" dpkg-deb -Zxz --root-owner-group --build $(DESTDIR) $(NATIVE_DEB_FILENAME) | ||
|
||
# configure riscv-pk | ||
# build linux w/ opensbi | ||
# ------------------------------------------------------------------------------ | ||
$(RISCV_PK_BUILD_DIR)/Makefile: $(LINUX_DIR)/vmlinux $(LINUX_DIR)/.config | ||
@mkdir -p $(RISCV_PK_BUILD_DIR) | ||
cd $(RISCV_PK_BUILD_DIR) && ../configure \ | ||
--with-payload=$(abspath $<) \ | ||
--disable-fp-emulation \ | ||
--host=$(TOOLCHAIN_PREFIX) | ||
|
||
# build linux w/ bbl | ||
# ------------------------------------------------------------------------------ | ||
$(LINUX): $(RISCV_PK_DIR)/build/Makefile $(LINUX_DIR)/vmlinux | ||
mkdir -p artifacts | ||
$(MAKE) $(JOBS) -rC $(RISCV_PK_BUILD_DIR) bbl | ||
$(TOOLCHAIN_PREFIX)-objcopy \ | ||
-O binary $(RISCV_PK_BUILD_DIR)/bbl $@ | ||
truncate -s %4096 $@ | ||
OPENSBI_OPTS=$(JOBS) FW_PAYLOAD_PATH=$(abspath $(IMAGE)) FW_PAYLOAD=y FW_OPTIONS=0x01 PLATFORM=cartesi CROSS_COMPILE=$(TOOLCHAIN_PREFIX)- | ||
$(LINUX): $(IMAGE) | ||
@mkdir -p artifacts | ||
$(MAKE) -rC $(OPENSBI_DIR) $(OPENSBI_OPTS) | ||
@cp $(OPENSBI_BUILD_DIR)/platform/cartesi/firmware/fw_payload.bin $@ | ||
|
||
# build linux tests | ||
# ------------------------------------------------------------------------------ | ||
|
@@ -97,7 +87,8 @@ $(SELFTEST): | |
|
||
clean: | ||
$(MAKE) -rC $(LINUX_DIR) $(LINUX_OPTS) clean | ||
$(MAKE) $(JOBS) -rC $(RISCV_PK_BUILD_DIR) clean | ||
$(MAKE) $(JOBS) -rC $(OPENSBI_DIR) clean | ||
@rm -rf $(OPENSBI_BUILD_DIR) | ||
|
||
run-selftest: | ||
cartesi-machine.lua --rollup \ | ||
|
@@ -110,18 +101,18 @@ run-selftest: | |
|
||
# clone (for non CI environment) | ||
# ------------------------------------------------------------------------------ | ||
clone: LINUX_BRANCH ?= linux-5.15.63-ctsi-y | ||
clone: RISCV_PK_BRANCH ?= v1.0.0-ctsi-1 | ||
clone: LINUX_BRANCH ?= linux-6.5.9-ctsi-y | ||
clone: OPENSBI_BRANCH ?= opensbi-1.3.1-ctsi-y | ||
clone: | ||
git clone --depth 1 --branch $(LINUX_BRANCH) \ | ||
[email protected]:cartesi/linux.git $(LINUX_DIR) || \ | ||
cd $(LINUX_DIR) && git pull | ||
git clone --depth 1 --branch $(RISCV_PK_BRANCH) \ | ||
[email protected]:cartesi/riscv-pk.git $(RISCV_PK_DIR) || \ | ||
cd $(RISCV_PK_DIR) && git pull | ||
git clone --depth 1 --branch $(OPENSBI_BRANCH) \ | ||
[email protected]:cartesi/opensbi.git $(OPENSBI_DIR) || \ | ||
cd $(OPENSBI_DIR) && git pull | ||
|
||
run: IMG=cartesi/toolchain:devel | ||
run: | ||
$(MAKE) run IMG=$(IMG) | ||
|
||
.PHONY: $(RISCV_PK_BUILD_DIR)/Makefile $(LINUX_DIR)/vmlinux $(ARTIFACTS) | ||
.PHONY: $(OPENSBI_BUILD_DIR)/Makefile $(LINUX_DIR)/vmlinux $(ARTIFACTS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
e8d4d1882632eac7fd8e433b4eb4db014fd56e645fdad3b89be7d1ca4f20ca07 linux-5.15.63-ctsi-2.tar.gz | ||
9a873345b9914940e7bf03a167da823910c8a2acadd818b780ffbd1a3edcc4c5 riscv-pk-1.0.0-ctsi-1.tar.gz | ||
ac235221a482701959e7a1b5dcef95c2b9bbd3c387170a11c2c43cc84a9c24c2 dep/linux-linux-6.5.9-ctsi-y.tar.gz | ||
68388abd01e2dc2705f0dedd6525c6aa11fe3446480647310a57ef7a9ad5b5ce dep/opensbi-opensbi-1.3.1-ctsi-y.tar.gz |