<message>Delete obsolete one-shot scripts for setting screen rotation and wallpaper, as well as related Python and shell scripts. Update the first-boot configuration to streamline the provisioning process by removing references to these scripts. This cleanup enhances maintainability and focuses on the essential steps required for the first boot experience, ensuring a more efficient setup for users.
18 lines
664 B
Bash
18 lines
664 B
Bash
#!/bin/bash
|
|
# Step 10: Kernel command line (swiotlb + DSI rotation)
|
|
|
|
step_10_cmdline() {
|
|
local cmdline="/boot/firmware/cmdline.txt"
|
|
[[ -f "$cmdline" ]] || cmdline="/boot/cmdline.txt"
|
|
[[ -f "$cmdline" ]] || { log "WARNING: cmdline.txt not found"; return 0; }
|
|
|
|
if [[ -n "$SWIOTLB_SIZE" ]] && ! grep -q 'swiotlb=' "$cmdline"; then
|
|
sed -i "s/rootwait/rootwait swiotlb=$SWIOTLB_SIZE/" "$cmdline"
|
|
log "Added swiotlb=$SWIOTLB_SIZE to cmdline"
|
|
fi
|
|
if [[ -n "$DSI_ROTATE" ]] && ! grep -q 'video=DSI-1:rotate=' "$cmdline"; then
|
|
sed -i "s/\$/ video=DSI-1:rotate=$DSI_ROTATE/" "$cmdline"
|
|
log "Added video=DSI-1:rotate=$DSI_ROTATE to cmdline"
|
|
fi
|
|
}
|