Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Doggy OS Developer Firmware Installer
- -- Function to install custom bootloader
- local function installCustomBootloader(bootloaderFile)
- -- Delete existing bootloader file
- fs.delete("/startup")
- -- Copy custom bootloader file to startup (root directory of computer)
- fs.copy(bootloaderFile, "/startup")
- print("Custom bootloader installed successfully.")
- end
- -- Function to install custom recovery
- local function installCustomRecovery(recoveryFile)
- -- Delete existing recovery file
- fs.delete("/disk/boot/Recovery.lua")
- -- Copy custom recovery file to /disk/boot/Recovery.lua
- fs.copy(recoveryFile, "/disk/boot/Recovery.lua")
- print("Custom recovery installed successfully.")
- end
- -- Function to install custom boot error message
- local function installCustomBootErrorMessage(errorMessageFile)
- -- Delete existing boot error message file
- fs.delete("/no-os")
- -- Copy custom boot error message file to /no-os
- fs.copy(errorMessageFile, "/no-os")
- print("Custom boot error message installed successfully.")
- end
- -- Main function
- local function main()
- print("Welcome to Doggy OS Developer Firmware Installer")
- print("1. Install Custom Bootloader")
- print("2. Install Custom Recovery")
- print("3. Install Custom Boot Error Message")
- print("4. Exit")
- local choice = tonumber(read())
- if choice == 1 then
- print("Enter the path to the custom bootloader file:")
- local bootloaderFile = read()
- installCustomBootloader(bootloaderFile)
- elseif choice == 2 then
- print("Enter the path to the custom recovery file:")
- local recoveryFile = read()
- installCustomRecovery(recoveryFile)
- elseif choice == 3 then
- print("Enter the path to the custom boot error message file:")
- local errorMessageFile = read()
- installCustomBootErrorMessage(errorMessageFile)
- elseif choice == 4 then
- print("Rebooting...")
- os.reboot()
- else
- print("Invalid choice.")
- end
- end
- -- Run the main function
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement