From 9143a76e1b12475450aeee610fb8af1858cc4525 Mon Sep 17 00:00:00 2001 From: SparkySimp Date: Fri, 28 Jul 2023 15:34:59 +0300 Subject: [PATCH 1/4] add sfdisk script --- util/partable.m4 | 4 ++-- util/partable.sfd | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 util/partable.sfd diff --git a/util/partable.m4 b/util/partable.m4 index 46480ac..f3bd10b 100644 --- a/util/partable.m4 +++ b/util/partable.m4 @@ -14,7 +14,7 @@ define(`STAGE1_TYPE', `0C')dnl # the stage2 bootloader (and ramdisk images) partition define(`STAGE2_START', `1471488')dnl define(`STAGE2_SIZE', `1469440')dnl -define(`STAGE2_TYPE', `83')dnl +define(`STAGE2_TYPE', `0C')dnl # Run fdisk to get the device size and capture the output define(`FDISK_OUTPUT', `esyscmd(`fdisk -l `device_name)')dnl @@ -30,4 +30,4 @@ define(`PART3_START', `STAGE2_START + STAGE2_SIZE')dnl define(`PART3_SIZE', `DEVICE_SIZE - PART3_START')dnl # the third partition (freely available space) -define(`PART3_TYPE', `83')dnl +define(`PART3_TYPE', `0C')dnl diff --git a/util/partable.sfd b/util/partable.sfd new file mode 100644 index 0000000..0613782 --- /dev/null +++ b/util/partable.sfd @@ -0,0 +1,6 @@ +label: $reclabel_type +unit: sectors + +$device_name"1 : start=$STAGE1_START, size=$STAGE1_SIZE, type=$STAGE1_TYPE # FAT32 +$device_name"2 : start=$STAGE2_START, size=$STAGE2_SIZE, type=$STAGE2_TYPE # Linux +$device_name"3 : start=$PART3_START, size=$PART3_SIZE, type=$PART3_TYPE # Freely available space From 542e56f327379c58d2ddf27fcdb2abdeda6b29a2 Mon Sep 17 00:00:00 2001 From: SparkySimp Date: Fri, 28 Jul 2023 15:43:34 +0300 Subject: [PATCH 2/4] Configure cargo for no-std7 --- Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 7f5198c..3da500a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,12 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] + + +# panic behaviour + +[profile.dev] +panic = "abort" + +[profile.release] +panic = "abort" From 96499ae00dbc0bbdaf31b4dc3f52465bcdd0aa6b Mon Sep 17 00:00:00 2001 From: SparkySimp Date: Fri, 28 Jul 2023 15:46:57 +0300 Subject: [PATCH 3/4] add target file --- arch/x86_64-arch.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 arch/x86_64-arch.json diff --git a/arch/x86_64-arch.json b/arch/x86_64-arch.json new file mode 100644 index 0000000..7d2110d --- /dev/null +++ b/arch/x86_64-arch.json @@ -0,0 +1,15 @@ +{ + "llvm-target": "x86_64-unknown-none", + "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", + "arch": "x86_64", + "target-endian": "little", + "target-pointer-width": "64", + "target-c-int-width": "32", + "os": "none", + "executables": true, + "linker-flavor": "ld.lld", + "linker": "rust-lld", + "panic-strategy": "abort", + "disable-redzone": true, + "features": "-mmx,-sse,+soft-float" +} From 96fffdc902f458f4bb3d66ed551e76d942a68e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=2E=20Y=2E=20Cemal=20=C3=96zt=C3=BCrk?= Date: Fri, 28 Jul 2023 15:48:38 +0300 Subject: [PATCH 4/4] add sfdisk script and change partitions to fat32 (#10) (#11)