Skip to content
Draft
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
15 changes: 15 additions & 0 deletions nixos/lib/make-iso9660-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
# Whether this should be an efi-bootable El-Torito CD.
efiBootable ? false,

# Whether this should be a CHRP-compatible CD.
chrpBootable ? false,

# Whether this should be an hybrid CD (bootable from USB as well as CD).
usbBootable ? false,

Expand All @@ -50,6 +53,12 @@
# The path (in the ISO file system) of the efi boot image.
efiBootImage ? "",

# The path (in the ISO file system) to bless for booting on New World ROM PowerMacs (path that "\\" in Open Firmware will resolve to)
tbxiBlessDir ? "",

# The file in tbxiBlessDir to bless as type tbxi
tbxiBlessFile ? "",

# The path (outside the ISO file system) of the isohybrid-mbr image.
isohybridMbrImage ? "",

Expand All @@ -63,6 +72,9 @@

assert bootable -> bootImage != "";
assert efiBootable -> efiBootImage != "";
assert
(tbxiBlessDir != "" || tbxiBlessFile != "")
-> (chrpBootable && tbxiBlessDir != "" && tbxiBlessFile != "");
assert usbBootable -> isohybridMbrImage != "";

let
Expand Down Expand Up @@ -97,6 +109,9 @@ stdenv.mkDerivation {
volumeID
efiBootImage
efiBootable
chrpBootable
tbxiBlessDir
tbxiBlessFile
isohybridMbrImage
usbBootable
;
Expand Down
13 changes: 13 additions & 0 deletions nixos/lib/make-iso9660-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,18 @@ if test -n "$efiBootable"; then
-isohybrid-gpt-basdat"
fi

if test -n "$chrpBootable"; then
chrpBootFlags="-sysid PPC -chrp-boot-part"

if [ -n "$tbxiBlessDir" -a -n "$tbxiBlessFile" ]; then
chrpBootFlags="-hfsplus
-apm-block-size 2048
-hfs-bless-by p $tbxiBlessDir
-hfsplus-file-creator-type chrp tbxi $tbxiBlessDir/$tbxiBlessFile
$chrpBootFlags"
fi
fi

touch pathlist


Expand Down Expand Up @@ -113,6 +125,7 @@ xorriso="xorriso
${isoBootFlags}
${usbBootFlags}
${efiBootFlags}
${chrpBootFlags}
-r
-path-list pathlist
--sort-weight 0 /
Expand Down
Loading
Loading