Makefile.toml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. [config]
  2. default_to_workspace = false
  3. [tasks.clean]
  4. command = "cargo"
  5. args = ["clean"]
  6. [tasks.prototyper-nemu-build]
  7. command = "cargo"
  8. args = ["build", "-prustsbi-prototyper", "--release", "--target", "riscv64imac-unknown-none-elf", "-Zbuild-std=core", "--features=nemu,payload"]
  9. env = {"RUSTFLAGS"="-C relocation-model=pie -C link-arg=-pie" }
  10. [tasks.prototyper-nemu]
  11. command = "rust-objcopy"
  12. args = [
  13. "--binary-architecture=riscv64",
  14. "target/riscv64imac-unknown-none-elf/release/rustsbi-prototyper",
  15. "--output-target=binary",
  16. "target/riscv64imac-unknown-none-elf/release/rustsbi-prototyper.bin",
  17. ]
  18. dependencies = ["prototyper-nemu-build"]
  19. [tasks.prototyper-build]
  20. command = "cargo"
  21. args = [
  22. "build",
  23. "-prustsbi-prototyper",
  24. "--release",
  25. "--target",
  26. "riscv64imac-unknown-none-elf",
  27. "-Zbuild-std=core",
  28. ]
  29. env = { "RUSTFLAGS" = "-C relocation-model=pie -C link-arg=-pie" }
  30. [tasks.prototyper]
  31. command = "rust-objcopy"
  32. args = [
  33. "--binary-architecture=riscv64",
  34. "target/riscv64imac-unknown-none-elf/release/rustsbi-prototyper",
  35. "--output-target=binary",
  36. "target/riscv64imac-unknown-none-elf/release/rustsbi-prototyper.bin",
  37. ]
  38. dependencies = ["prototyper-build"]
  39. [tasks.test-kernel-build]
  40. command = "cargo"
  41. args = ["build", "-prustsbi-test-kernel", "--release"]
  42. env = { "RUSTFLAGS"= { unset = true }}
  43. [tasks.test-kernel]
  44. command = "rust-objcopy"
  45. args = [
  46. "--binary-architecture=riscv64",
  47. "target/riscv64imac-unknown-none-elf/release/rustsbi-test-kernel",
  48. "--output-target=binary",
  49. "target/riscv64imac-unknown-none-elf/release/rustsbi-test-kernel.bin",
  50. ]
  51. dependencies = ["test-kernel-build"]
  52. [tasks.test-kernel-itb]
  53. script = '''
  54. cp test-kernel/scripts/rustsbi-test-kernel.its target/riscv64imac-unknown-none-elf/release
  55. cd target/riscv64imac-unknown-none-elf/release/
  56. mkimage -f rustsbi-test-kernel.its rustsbi-test-kernel.itb
  57. rm rustsbi-test-kernel.its
  58. cd ../../../
  59. '''
  60. dependencies = ["prototyper", "test-kernel"]