organize board flags more sensibly

This commit is contained in:
bunnie 2024-10-04 13:09:30 +08:00
parent 8deeac91ee
commit 0580e8a2cd

View file

@ -481,6 +481,12 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// ------ Cramium hardware image configs ------
Some("cramium-fpga") | Some("cramium-soc") => {
let board = "board-baosec";
// select the board
builder.add_feature(board);
builder.add_loader_feature(board);
builder.add_kernel_feature(board);
// placement in flash is a tension between dev convenience and RAM usage. Things in flash
// are resident, non-swapable, but end up making the slow kernel burn process take longer.
let cramium_flash_pkgs = [
@ -500,7 +506,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
if !builder.is_swap_set() {
builder.set_swap(0, 4 * 1024 * 1024);
}
// builder.add_loader_feature("board-bringup");
builder.add_loader_feature("board-bringup");
// builder.add_loader_feature("spim-test");
// builder.add_loader_feature("spi-alt-channel"); // this flag, when asserted, uses the J_QSPI
// header. By default, we use JPC7_13 (J_QSPI does not work, for some reason; bit 3 is stuck
@ -524,10 +530,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
builder.add_feature("mass-storage");
builder.add_feature("ditherpunk");
// select the board
builder.add_feature("board-baosec");
builder.add_loader_feature("board-baosec");
match task.as_deref() {
Some("cramium-fpga") => builder.target_cramium_fpga(),
Some("cramium-soc") => builder.target_cramium_soc(),