Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Create sfdisk file #12

Merged
merged 4 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
15 changes: 15 additions & 0 deletions arch/x86_64-arch.json
Original file line number Diff line number Diff line change
@@ -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"
}
4 changes: 2 additions & 2 deletions util/partable.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 6 additions & 0 deletions util/partable.sfd
Original file line number Diff line number Diff line change
@@ -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
Loading