Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mojo2012/atv-bootloader
https://github.com/mojo2012/atv-bootloader
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mojo2012/atv-bootloader
- Owner: mojo2012
- License: gpl-2.0
- Created: 2015-01-10T20:16:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-10T20:20:37.000Z (almost 10 years ago)
- Last Synced: 2023-03-22T10:26:34.406Z (over 1 year ago)
- Language: C
- Size: 7.15 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
Awesome Lists containing this project
README
atv-bootloader (March 10 2008)
This bootloader works by embedding a Linux kernel/initrd into "mach kernel" that boot.efi loads. Right now it's very simplistic and will boot to login prompt. user = root, password = root. parted is present as well as hfsplus tools for creating gpt partitions and formating them as ext2/3 and hfs/hfsplus. Also present is kexec to bootload another kernel. Typical usage is;
kexec --load vmlinuz --initrd=initrd.gz --command-line="root=/dev/sdb2 video=vesafb"
kexec -eatv-bootloader does not require an efi enabled kernel nor the patched imac_fb framebuffer, only a vesafb is required for console output. Boot params are set in com.apple.Boot.plist. There are some special switches. If "video=imac_fb" is detected, atv-bootloader will assume a patched imac_fb is present. "video=efifb" assumes the 2.6.24 efifb frame buffer driver is present. "video=vesafb" assumes the vesafb frame buffer.
Of special note, some installers are doing funny things like assuming a video bios (it's hiding in the AppleTV), these will hang and do bad things. So you might have to perform the actual Linux install on a doner box. Or if you only have Windows, burn a Linux LiveCD and boot your windows box from that.
This is far from complete but I wanted to push out the release.
Make a recovery partition. 25MB in size is plenty. Copy boot.efi, mach_kernel and the contents of recovery.tar.gz into it. sync, unmount, stick it in the AppleTV, reboot (might need to hold IR remote "menu" and "-" buttons down. This shuold boot to a Linux login prompt.
Uses:
Make a Linux based patchstick. Linux permissions and user IDs are similar to darwin. So you could create a bash stript that copies sshd into the AppleTV. Linux run the bash script but it moves and mods darwin stuff.Make a kexec bootloader. Make the recovery bits like normal, add a script at the end of "s/etc/init.d/rcS" that mounts your root partition and kexec into it.
Special thanks to "Edgar (gimli) Hucek" for the 1st boot and original code (mach_linux_boot) and James McKenzie of Mythic-Beasts for mb_boot_tv.