Skip to content

Commit

Permalink
Support new version of toolchain, kernel, rom and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vfusco committed Jun 30, 2020
1 parent ed52397 commit f556656
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 98 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,30 @@ jobs:
uses: Legion2/[email protected]
with:
repository: ${{ steps.git_org.outputs.current_organization }}/image-rootfs
tag: 'v0.2.0'
tag: 'v0.4.0'
file: rootfs.ext2
token: ${{ secrets.CI_TOKEN }}

- name: Download [kernel.bin]
uses: Legion2/[email protected]
with:
repository: ${{ steps.git_org.outputs.current_organization }}/image-kernel
tag: 'v0.4.0'
file: kernel.bin
tag: 'v0.5.0'
file: linux-5.5.19-ctsi-1.bin
token: ${{ secrets.CI_TOKEN }}

- name: Download [rom.bin]
uses: Legion2/[email protected]
with:
repository: ${{ steps.git_org.outputs.current_organization }}/machine-emulator-rom
tag: 'v0.2.0'
tag: 'v0.2.1'
file: rom.bin
token: ${{ secrets.CI_TOKEN }}

- name: Move images to cartesi images folder
run: mv rom.bin kernel.bin rootfs.ext2 /opt/cartesi/share/images/
run: |
mv rom.bin linux-5.5.19-ctsi-1.bin rootfs.ext2 /opt/cartesi/share/images/
cd /opt/cartesi/share/images/ && ln -s linux-5.5.19-ctsi-1.bin linux.bin
- name: Simple Boot
run: /opt/cartesi/bin/cartesi-machine /bin/true
Expand All @@ -115,12 +117,12 @@ jobs:
uses: Legion2/[email protected]
with:
repository: ${{ steps.git_org.outputs.current_organization }}/machine-tests
tag: 'v0.3.0'
file: machine-tests-v0.3.0.tar.gz
tag: 'v0.4.0'
file: machine-tests-v0.4.0.tar.gz
token: ${{ secrets.CI_TOKEN }}

- name: Untar test suite
run: mkdir -p /opt/cartesi/tests && tar -xzf machine-tests-v0.3.0.tar.gz -C /opt/cartesi/tests
run: mkdir -p /opt/cartesi/tests && tar -xzf machine-tests-v0.4.0.tar.gz -C /opt/cartesi/tests

- name: Run test suite
run: /opt/cartesi/bin/cartesi-machine-tests --test-path=/opt/cartesi/tests run
Expand Down Expand Up @@ -188,7 +190,3 @@ jobs:
docker build -t cartesi/machine-emulator:${GITHUB_REF:11} -f .github/workflows/Dockerfile /opt/cartesi
docker push cartesi/machine-emulator:${GITHUB_REF:11}
- name: Docker Alpine Image
run: |
docker build . -t cartesi/machine-emulator:${GITHUB_REF:11}-alpine -f .github/workflows/Dockerfile.alpine
docker push cartesi/machine-emulator:${GITHUB_REF:11}-alpine
166 changes: 83 additions & 83 deletions src/cartesi-machine-tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,25 @@ local tests = {
{"rv64ua-p-amoxor_d.bin", 72},
{"rv64ua-p-amoxor_w.bin", 74},
{"rv64ua-p-lrsc.bin", 6246},
{"rv64ua-v-amoadd_d.bin", 10731},
{"rv64ua-v-amoadd_w.bin", 10728},
{"rv64ua-v-amoand_d.bin", 10740},
{"rv64ua-v-amoand_w.bin", 10739},
{"rv64ua-v-amomax_d.bin", 10721},
{"rv64ua-v-amomax_w.bin", 10721},
{"rv64ua-v-amomaxu_d.bin", 10721},
{"rv64ua-v-amomaxu_w.bin", 10721},
{"rv64ua-v-amomin_d.bin", 10721},
{"rv64ua-v-amomin_w.bin", 10721},
{"rv64ua-v-amominu_d.bin", 11211},
{"rv64ua-v-amominu_w.bin", 11211},
{"rv64ua-v-amoor_d.bin", 10720},
{"rv64ua-v-amoor_w.bin", 10720},
{"rv64ua-v-amoswap_d.bin", 10740},
{"rv64ua-v-amoswap_w.bin", 10739},
{"rv64ua-v-amoxor_d.bin", 10723},
{"rv64ua-v-amoxor_w.bin", 10725},
{"rv64ua-v-lrsc.bin", 16895},
{"rv64ua-v-amoadd_d.bin", 10748},
{"rv64ua-v-amoadd_w.bin", 10807},
{"rv64ua-v-amoand_d.bin", 10819},
{"rv64ua-v-amoand_w.bin", 10818},
{"rv64ua-v-amomax_d.bin", 10800},
{"rv64ua-v-amomax_w.bin", 10800},
{"rv64ua-v-amomaxu_d.bin", 10800},
{"rv64ua-v-amomaxu_w.bin", 10800},
{"rv64ua-v-amomin_d.bin", 10800},
{"rv64ua-v-amomin_w.bin", 10800},
{"rv64ua-v-amominu_d.bin", 10806},
{"rv64ua-v-amominu_w.bin", 10806},
{"rv64ua-v-amoor_d.bin", 10799},
{"rv64ua-v-amoor_w.bin", 10799},
{"rv64ua-v-amoswap_d.bin", 10819},
{"rv64ua-v-amoswap_w.bin", 10818},
{"rv64ua-v-amoxor_d.bin", 10802},
{"rv64ua-v-amoxor_w.bin", 10804},
{"rv64ua-v-lrsc.bin", 16974},
{"rv64ui-p-add.bin", 475},
{"rv64ui-p-addi.bin", 250},
{"rv64ui-p-addiw.bin", 247},
Expand Down Expand Up @@ -124,57 +124,57 @@ local tests = {
{"rv64ui-p-subw.bin", 462},
{"rv64ui-p-xor.bin", 578},
{"rv64ui-p-xori.bin", 212},
{"rv64ui-v-add.bin", 6915},
{"rv64ui-v-addi.bin", 6690},
{"rv64ui-v-addiw.bin", 6687},
{"rv64ui-v-addw.bin", 6910},
{"rv64ui-v-and.bin", 11689},
{"rv64ui-v-andi.bin", 6661},
{"rv64ui-v-auipc.bin", 6503},
{"rv64ui-v-beq.bin", 6736},
{"rv64ui-v-bge.bin", 6754},
{"rv64ui-v-bgeu.bin", 6844},
{"rv64ui-v-blt.bin", 6736},
{"rv64ui-v-bltu.bin", 6822},
{"rv64ui-v-bne.bin", 6736},
{"rv64ui-v-fence_i.bin", 13155},
{"rv64ui-v-jal.bin", 6500},
{"rv64ui-v-jalr.bin", 6553},
{"rv64ui-v-lb.bin", 11389},
{"rv64ui-v-lbu.bin", 11389},
{"rv64ui-v-ld.bin", 11523},
{"rv64ui-v-lh.bin", 11401},
{"rv64ui-v-lhu.bin", 11408},
{"rv64ui-v-lui.bin", 6510},
{"rv64ui-v-lw.bin", 11411},
{"rv64ui-v-lwu.bin", 11437},
{"rv64ui-v-or.bin", 11722},
{"rv64ui-v-ori.bin", 6654},
{"rv64ui-v-sb.bin", 11086},
{"rv64ui-v-sd.bin", 15957},
{"rv64ui-v-sh.bin", 11139},
{"rv64ui-v-simple.bin", 6486},
{"rv64ui-v-sll.bin", 11684},
{"rv64ui-v-slli.bin", 6715},
{"rv64ui-v-slliw.bin", 6686},
{"rv64ui-v-sllw.bin", 11644},
{"rv64ui-v-slt.bin", 6904},
{"rv64ui-v-slti.bin", 6682},
{"rv64ui-v-sltiu.bin", 6682},
{"rv64ui-v-sltu.bin", 11620},
{"rv64ui-v-sra.bin", 11656},
{"rv64ui-v-srai.bin", 6703},
{"rv64ui-v-sraiw.bin", 6713},
{"rv64ui-v-sraw.bin", 11656},
{"rv64ui-v-srl.bin", 11698},
{"rv64ui-v-srli.bin", 6724},
{"rv64ui-v-srliw.bin", 6695},
{"rv64ui-v-srlw.bin", 11650},
{"rv64ui-v-sub.bin", 6906},
{"rv64ui-v-subw.bin", 6902},
{"rv64ui-v-sw.bin", 11146},
{"rv64ui-v-xor.bin", 11717},
{"rv64ui-v-xori.bin", 6652},
{"rv64ui-v-add.bin", 6990},
{"rv64ui-v-addi.bin", 6765},
{"rv64ui-v-addiw.bin", 6762},
{"rv64ui-v-addw.bin", 6985},
{"rv64ui-v-and.bin", 7065},
{"rv64ui-v-andi.bin", 6736},
{"rv64ui-v-auipc.bin", 6578},
{"rv64ui-v-beq.bin", 6811},
{"rv64ui-v-bge.bin", 6829},
{"rv64ui-v-bgeu.bin", 6919},
{"rv64ui-v-blt.bin", 6811},
{"rv64ui-v-bltu.bin", 6897},
{"rv64ui-v-bne.bin", 6811},
{"rv64ui-v-fence_i.bin", 12994},
{"rv64ui-v-jal.bin", 6575},
{"rv64ui-v-jalr.bin", 6628},
{"rv64ui-v-lb.bin", 11468},
{"rv64ui-v-lbu.bin", 11468},
{"rv64ui-v-ld.bin", 11602},
{"rv64ui-v-lh.bin", 11480},
{"rv64ui-v-lhu.bin", 11487},
{"rv64ui-v-lui.bin", 6585},
{"rv64ui-v-lw.bin", 11490},
{"rv64ui-v-lwu.bin", 11516},
{"rv64ui-v-or.bin", 7098},
{"rv64ui-v-ori.bin", 6729},
{"rv64ui-v-sb.bin", 11165},
{"rv64ui-v-sd.bin", 11337},
{"rv64ui-v-sh.bin", 11218},
{"rv64ui-v-simple.bin", 6561},
{"rv64ui-v-sll.bin", 7060},
{"rv64ui-v-slli.bin", 6790},
{"rv64ui-v-slliw.bin", 6761},
{"rv64ui-v-sllw.bin", 7020},
{"rv64ui-v-slt.bin", 6979},
{"rv64ui-v-slti.bin", 6757},
{"rv64ui-v-sltiu.bin", 6757},
{"rv64ui-v-sltu.bin", 6996},
{"rv64ui-v-sra.bin", 7032},
{"rv64ui-v-srai.bin", 6778},
{"rv64ui-v-sraiw.bin", 6788},
{"rv64ui-v-sraw.bin", 7032},
{"rv64ui-v-srl.bin", 7074},
{"rv64ui-v-srli.bin", 6799},
{"rv64ui-v-srliw.bin", 6770},
{"rv64ui-v-srlw.bin", 7026},
{"rv64ui-v-sub.bin", 6981},
{"rv64ui-v-subw.bin", 6977},
{"rv64ui-v-sw.bin", 11225},
{"rv64ui-v-xor.bin", 7093},
{"rv64ui-v-xori.bin", 6727},
{"rv64um-p-div.bin", 106},
{"rv64um-p-divu.bin", 112},
{"rv64um-p-divuw.bin", 104},
Expand All @@ -188,19 +188,19 @@ local tests = {
{"rv64um-p-remu.bin", 106},
{"rv64um-p-remuw.bin", 101},
{"rv64um-p-remw.bin", 107},
{"rv64um-v-div.bin", 6546},
{"rv64um-v-divu.bin", 6552},
{"rv64um-v-divuw.bin", 6544},
{"rv64um-v-divw.bin", 6541},
{"rv64um-v-mul.bin", 6905},
{"rv64um-v-mulh.bin", 6913},
{"rv64um-v-mulhsu.bin", 6913},
{"rv64um-v-mulhu.bin", 6945},
{"rv64um-v-mulw.bin", 6844},
{"rv64um-v-rem.bin", 6545},
{"rv64um-v-remu.bin", 6546},
{"rv64um-v-remuw.bin", 6541},
{"rv64um-v-remw.bin", 6547},
{"rv64um-v-div.bin", 6621},
{"rv64um-v-divu.bin", 6627},
{"rv64um-v-divuw.bin", 6619},
{"rv64um-v-divw.bin", 6616},
{"rv64um-v-mul.bin", 6980},
{"rv64um-v-mulh.bin", 6988},
{"rv64um-v-mulhsu.bin", 6988},
{"rv64um-v-mulhu.bin", 7020},
{"rv64um-v-mulw.bin", 6919},
{"rv64um-v-rem.bin", 6620},
{"rv64um-v-remu.bin", 6559},
{"rv64um-v-remuw.bin", 6616},
{"rv64um-v-remw.bin", 6622},
-- regression tests
{"sd_pma_overflow.bin", 16},
{"xpie_exceptions.bin", 51},
Expand Down
4 changes: 2 additions & 2 deletions src/cartesi-machine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Usage:
where options are:
--ram-image=<filename>
name of file containing RAM image (default: "kernel.bin")
name of file containing RAM image (default: "linux.bin")
--no-ram-image
forget settings for RAM image
Expand Down Expand Up @@ -172,7 +172,7 @@ local flash_shared = { }
local flash_start = { }
local flash_length = { }
local flash_drive_replace = { }
local ram_image_filename = images_path .. "kernel.bin"
local ram_image_filename = images_path .. "linux.bin"
local ram_length = 64 << 20
local rom_image_filename = images_path .. "rom.bin"
local rom_bootargs = "console=hvc0 rootfstype=ext2 root=/dev/mtdblock0 rw quiet"
Expand Down
2 changes: 1 addition & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define SERVER_VERSION_MAJOR UINT32_C(0)
#define SERVER_VERSION_MINOR UINT32_C(1)
#define SERVER_VERSION_PATCH UINT32_C(0)
#define SERVER_VERSION_PRE_RELEASE "rc1"
#define SERVER_VERSION_PRE_RELEASE ""
#define SERVER_VERSION_BUILD ""

#include <sys/types.h>
Expand Down

0 comments on commit f556656

Please sign in to comment.