Makefile.toml 1.9 KB

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