mirror of
https://github.com/sickcodes/osx-serial-generator
synced 2024-11-21 14:29:10 -07:00
Add --kernel-args option
This commit is contained in:
parent
07d95a9d55
commit
a9e2b126db
6 changed files with 28 additions and 14 deletions
19
README.md
19
README.md
|
@ -159,13 +159,17 @@ Or you can manually enter the values generated above:
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
<key>Resolution</key>
|
|
||||||
<string>{{WIDTH}}x{{HEIGHT}}@32</string>
|
<string>{{WIDTH}}x{{HEIGHT}}@32</string>
|
||||||
<key>SanitiseClearScreen</key>
|
...
|
||||||
|
...
|
||||||
|
...
|
||||||
|
<key>boot-args</key>
|
||||||
|
<string>-v keepsyms=1 tlbto_us=0 vti=9 {{KERNEL_ARGS}}</string>
|
||||||
|
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
||||||
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}
|
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{KERNEL_ARGS}}
|
||||||
```
|
```
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -177,6 +181,7 @@ General options:
|
||||||
--output-dir <directory> Optionally change the script output location
|
--output-dir <directory> Optionally change the script output location
|
||||||
--width <string> Resolution x axis length in px, default 1920
|
--width <string> Resolution x axis length in px, default 1920
|
||||||
--height <string> Resolution y axis length in px, default 1080
|
--height <string> Resolution y axis length in px, default 1080
|
||||||
|
--kernel-args <string> Additional boot-args
|
||||||
--master-plist-url <url> Specify an alternative master plist, via URL
|
--master-plist-url <url> Specify an alternative master plist, via URL
|
||||||
--master-plist <filename> Optionally change the input plist
|
--master-plist <filename> Optionally change the input plist
|
||||||
--custom-plist <filename> Same as --master-plist
|
--custom-plist <filename> Same as --master-plist
|
||||||
|
@ -192,7 +197,7 @@ Additional options only if you are creating ONE serial set:
|
||||||
|
|
||||||
Custom plist placeholders:
|
Custom plist placeholders:
|
||||||
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
||||||
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}
|
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{KERNEL_ARGS}}
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
./generate-unique-machine-values.sh --count 1 --plists --bootdisks --envs
|
./generate-unique-machine-values.sh --count 1 --plists --bootdisks --envs
|
||||||
|
@ -223,6 +228,7 @@ Required options:
|
||||||
Optional options:
|
Optional options:
|
||||||
--width <integer> Resolution x axis length in px, default 1920
|
--width <integer> Resolution x axis length in px, default 1920
|
||||||
--height <integer> Resolution y axis length in px, default 1080
|
--height <integer> Resolution y axis length in px, default 1080
|
||||||
|
--kernel-args <string> Additional boot-args
|
||||||
--master-plist-url <url> Specify an alternative master plist, via URL
|
--master-plist-url <url> Specify an alternative master plist, via URL
|
||||||
--custom-plist <filename>
|
--custom-plist <filename>
|
||||||
|| --master-plist <filename> Optionally change the input plist.
|
|| --master-plist <filename> Optionally change the input plist.
|
||||||
|
@ -231,7 +237,7 @@ Optional options:
|
||||||
--help, -h, help Display this help and exit
|
--help, -h, help Display this help and exit
|
||||||
|
|
||||||
Placeholders: {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}}, {{UUID}},
|
Placeholders: {{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}}, {{UUID}},
|
||||||
{{ROM}}, {{WIDTH}}, {{HEIGHT}}
|
{{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{KERNEL_ARGS}}
|
||||||
```
|
```
|
||||||
|
|
||||||
Example using your serials generated earlier:
|
Example using your serials generated earlier:
|
||||||
|
@ -248,7 +254,8 @@ CUSTOM_PLIST=https://raw.githubusercontent.com/sickcodes/osx-serial-generator/ma
|
||||||
--mac-address A8:5C:2C:9A:46:2F \
|
--mac-address A8:5C:2C:9A:46:2F \
|
||||||
--output-bootdisk ./OpenCore-nopicker.qcow2 \
|
--output-bootdisk ./OpenCore-nopicker.qcow2 \
|
||||||
--width 1920 \
|
--width 1920 \
|
||||||
--height 1080
|
--height 1080 \
|
||||||
|
--kernel-args "-pmap_trace"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -957,7 +957,7 @@
|
||||||
<key>SystemAudioVolume</key>
|
<key>SystemAudioVolume</key>
|
||||||
<data>Rg==</data>
|
<data>Rg==</data>
|
||||||
<key>boot-args</key>
|
<key>boot-args</key>
|
||||||
<string>-v keepsyms=1 tlbto_us=0 vti=9</string>
|
<string>-v keepsyms=1 tlbto_us=0 vti=9 {{KERNEL_ARGS}}</string>
|
||||||
<key>run-efi-updater</key>
|
<key>run-efi-updater</key>
|
||||||
<string>No</string>
|
<string>No</string>
|
||||||
<key>csr-active-config</key>
|
<key>csr-active-config</key>
|
||||||
|
|
|
@ -957,7 +957,7 @@
|
||||||
<key>SystemAudioVolume</key>
|
<key>SystemAudioVolume</key>
|
||||||
<data>Rg==</data>
|
<data>Rg==</data>
|
||||||
<key>boot-args</key>
|
<key>boot-args</key>
|
||||||
<string>-v keepsyms=1 tlbto_us=0 vti=9</string>
|
<string>-v keepsyms=1 tlbto_us=0 vti=9 {{KERNEL_ARGS}}</string>
|
||||||
<key>run-efi-updater</key>
|
<key>run-efi-updater</key>
|
||||||
<string>No</string>
|
<string>No</string>
|
||||||
<key>csr-active-config</key>
|
<key>csr-active-config</key>
|
||||||
|
|
|
@ -633,7 +633,7 @@
|
||||||
<key>SystemAudioVolume</key>
|
<key>SystemAudioVolume</key>
|
||||||
<data>Rg==</data>
|
<data>Rg==</data>
|
||||||
<key>boot-args</key>
|
<key>boot-args</key>
|
||||||
<string>-v keepsyms=1 tlbto_us=0 vti=9</string>
|
<string>-v keepsyms=1 tlbto_us=0 vti=9 {{KERNEL_ARGS}}</string>
|
||||||
<key>run-efi-updater</key>
|
<key>run-efi-updater</key>
|
||||||
<string>No</string>
|
<string>No</string>
|
||||||
<key>csr-active-config</key>
|
<key>csr-active-config</key>
|
||||||
|
|
|
@ -24,6 +24,7 @@ Required options:
|
||||||
Optional options:
|
Optional options:
|
||||||
--width <integer> Resolution x axis length in px, default 1920
|
--width <integer> Resolution x axis length in px, default 1920
|
||||||
--height <integer> Resolution y axis length in px, default 1080
|
--height <integer> Resolution y axis length in px, default 1080
|
||||||
|
--kernel-args <string> Additional boot-args
|
||||||
--input-plist-url <url> Specify an alternative master plist, via URL
|
--input-plist-url <url> Specify an alternative master plist, via URL
|
||||||
--master-plist-url <url> Same as above.
|
--master-plist-url <url> Same as above.
|
||||||
--custom-plist <filename> Optionally change the input plist.
|
--custom-plist <filename> Optionally change the input plist.
|
||||||
|
@ -252,6 +253,7 @@ generate_bootdisk () {
|
||||||
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
||||||
-e s/\{\{WIDTH\}\}/"${WIDTH:-1920}"/g \
|
-e s/\{\{WIDTH\}\}/"${WIDTH:-1920}"/g \
|
||||||
-e s/\{\{HEIGHT\}\}/"${HEIGHT:-1080}"/g \
|
-e s/\{\{HEIGHT\}\}/"${HEIGHT:-1080}"/g \
|
||||||
|
-e s/\{\{KERNEL_ARGS\}\}/"${KERNEL_ARGS:-}"/g \
|
||||||
"${MASTER_PLIST}" > ./tmp.config.plist || exit 1
|
"${MASTER_PLIST}" > ./tmp.config.plist || exit 1
|
||||||
else
|
else
|
||||||
cat <<EOF && exit 1
|
cat <<EOF && exit 1
|
||||||
|
@ -263,8 +265,11 @@ Error: one of the following values is missing:
|
||||||
--uuid "${UUID:-MISSING}"
|
--uuid "${UUID:-MISSING}"
|
||||||
--mac-address "${MAC_ADDRESS:-MISSING}"
|
--mac-address "${MAC_ADDRESS:-MISSING}"
|
||||||
|
|
||||||
|
Optional:
|
||||||
|
|
||||||
--width "${WIDTH:-1920}"
|
--width "${WIDTH:-1920}"
|
||||||
--height "${HEIGHT:-1080}"
|
--height "${HEIGHT:-1080}"
|
||||||
|
--kernel-args "${KERNEL_ARGS:-}"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -22,6 +22,7 @@ General options:
|
||||||
--output-dir <directory> Optionally change the script output location
|
--output-dir <directory> Optionally change the script output location
|
||||||
--width <string> Resolution x axis length in px, default 1920
|
--width <string> Resolution x axis length in px, default 1920
|
||||||
--height <string> Resolution y axis length in px, default 1080
|
--height <string> Resolution y axis length in px, default 1080
|
||||||
|
--kernel-args <string> Additional boot-args
|
||||||
--input-plist-url <url> Specify an alternative master plist, via URL
|
--input-plist-url <url> Specify an alternative master plist, via URL
|
||||||
--master-plist-url <url> Same as above.
|
--master-plist-url <url> Same as above.
|
||||||
--custom-plist <filename> Optionally change the input plist.
|
--custom-plist <filename> Optionally change the input plist.
|
||||||
|
@ -38,7 +39,7 @@ Additional options only if you are creating ONE serial set:
|
||||||
|
|
||||||
Custom plist placeholders:
|
Custom plist placeholders:
|
||||||
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
{{DEVICE_MODEL}}, {{SERIAL}}, {{BOARD_SERIAL}},
|
||||||
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}
|
{{UUID}}, {{ROM}}, {{WIDTH}}, {{HEIGHT}}, {{KERNEL_ARGS}}
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
./generate-unique-machine-values.sh --count 1 --plists --bootdisks --envs
|
./generate-unique-machine-values.sh --count 1 --plists --bootdisks --envs
|
||||||
|
@ -289,14 +290,14 @@ generate_serial_sets () {
|
||||||
|
|
||||||
# append to csv file
|
# append to csv file
|
||||||
tee -a "${CSV_SERIAL_SETS_FILE}" <<EOF
|
tee -a "${CSV_SERIAL_SETS_FILE}" <<EOF
|
||||||
"${DEVICE_MODEL}","${SERIAL}","${BOARD_SERIAL}","${UUID}","${MAC_ADDRESS}","${WIDTH}","${HEIGHT}"
|
"${DEVICE_MODEL}","${SERIAL}","${BOARD_SERIAL}","${UUID}","${MAC_ADDRESS}","${WIDTH}","${HEIGHT}","${KERNEL_ARGS}"
|
||||||
EOF
|
EOF
|
||||||
echo "Wrote CSV to: ${CSV_SERIAL_SETS_FILE}"
|
echo "Wrote CSV to: ${CSV_SERIAL_SETS_FILE}"
|
||||||
|
|
||||||
# append to tsv file
|
# append to tsv file
|
||||||
T=$'\t'
|
T=$'\t'
|
||||||
tee -a "${TSV_SERIAL_SETS_FILE}" <<EOF
|
tee -a "${TSV_SERIAL_SETS_FILE}" <<EOF
|
||||||
${DEVICE_MODEL}${T}${SERIAL}${T}${BOARD_SERIAL}${T}${UUID}${T}${MAC_ADDRESS}${T}${WIDTH}${T}${HEIGHT}
|
${DEVICE_MODEL}${T}${SERIAL}${T}${BOARD_SERIAL}${T}${UUID}${T}${MAC_ADDRESS}${T}${WIDTH}${T}${HEIGHT}${T}${KERNEL_ARGS}
|
||||||
EOF
|
EOF
|
||||||
echo "Wrote TSV to: ${TSV_SERIAL_SETS_FILE}"
|
echo "Wrote TSV to: ${TSV_SERIAL_SETS_FILE}"
|
||||||
|
|
||||||
|
@ -344,6 +345,7 @@ EOF
|
||||||
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
-e s/\{\{ROM\}\}/"${ROM}"/g \
|
||||||
-e s/\{\{WIDTH\}\}/"${WIDTH}"/g \
|
-e s/\{\{WIDTH\}\}/"${WIDTH}"/g \
|
||||||
-e s/\{\{HEIGHT\}\}/"${HEIGHT}"/g \
|
-e s/\{\{HEIGHT\}\}/"${HEIGHT}"/g \
|
||||||
|
-e s/\{\{KERNEL_ARGS\}\}/"${KERNEL_ARGS:-}"/g \
|
||||||
"${MASTER_PLIST}" > "${OUTPUT_DIRECTORY}/plists/${SERIAL}.config.plist" || exit 1
|
"${MASTER_PLIST}" > "${OUTPUT_DIRECTORY}/plists/${SERIAL}.config.plist" || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -361,11 +363,11 @@ EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
[ -e "${CSV_SERIAL_SETS_FILE}" ] && \
|
[ -e "${CSV_SERIAL_SETS_FILE}" ] && \
|
||||||
cat <(echo "DEVICE_MODEL,SERIAL,BOARD_SERIAL,UUID,MAC_ADDRESS,WIDTH,HEIGHT") "${CSV_SERIAL_SETS_FILE}"
|
cat <(echo "DEVICE_MODEL,SERIAL,BOARD_SERIAL,UUID,MAC_ADDRESS,WIDTH,HEIGHT,KERNEL_ARGS") "${CSV_SERIAL_SETS_FILE}"
|
||||||
|
|
||||||
|
|
||||||
[ -e "${TSV_SERIAL_SETS_FILE}" ] && \
|
[ -e "${TSV_SERIAL_SETS_FILE}" ] && \
|
||||||
cat <(printf "DEVICE_MODEL\tSERIAL\tBOARD_SERIAL\tUUID\tMAC_ADDRESS\tWIDTH\tHEIGHT\n") "${TSV_SERIAL_SETS_FILE}"
|
cat <(printf "DEVICE_MODEL\tSERIAL\tBOARD_SERIAL\tUUID\tMAC_ADDRESS\tWIDTH\tHEIGHT\tKERNEL_ARGS\n") "${TSV_SERIAL_SETS_FILE}"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue