Page 1 of 1
Kernel Transmission Protocol
Posted: Sun Sep 14, 2008 10:25 am
by Jabus
Hi,
I'm still writing my bootloader that will be able to download kernels from the internet or other computers on the network. I've not found anything so far but is there a standard protocol for downloading kernels. I.e. a protocol like ftp but one more specific for kernels and that allows data about the computer hardware to be transmitted?
Re: Kernel Transmission Protocol
Posted: Sun Sep 14, 2008 10:30 am
by Dario
BOOTP and DHCP
Re: Kernel Transmission Protocol
Posted: Sun Sep 14, 2008 12:31 pm
by Jabus
Obtaining the IP address, which from my understanding is what BOOTP and DHCP do, is not the problem. Its sending information about the computer and then recieving a kernel based on that which is the problem. However thanks for the advice. I'll certainly use DHCP though for obtaining the IP address.
Re: Kernel Transmission Protocol
Posted: Sun Sep 14, 2008 1:03 pm
by Brendan
Hi,
Jabus wrote:Obtaining the IP address, which from my understanding is what BOOTP and DHCP do, is not the problem. Its sending information about the computer and then recieving a kernel based on that which is the problem. However thanks for the advice. I'll certainly use DHCP though for obtaining the IP address.
BOOTP and DHCP/PXE tell you the IP address (and other stuff, like gateway address, netmask, etc), but they can also tell you a file name to download. More specifically, they tell ROM chips which filename to use to download your bootloader. Your bootloader can do what it likes, including doing some hardware detection and downloading more files from anywhere it likes using any protocols you want (although TFTP is popular because that's implemented in all ROMs that support PXE).
Note: The DHCP server can also be configured so that it tells different computers to download different boot loaders, based on the computer's MAC address. For e.g. the client "00:11:22:33:44:55" might be told to use the bootloader "/sys/80x86/bootloader.bin" while the client "12:34:56:67:89:ab" might be told to use the bootloader "/sys/alpha/bootloader.bin".
For sending information about the computer, this depends on what sort of information you want to send. Probably the easiest way is to use FTP, and to encode the information about the hardware into the file name you're asking the FTP server for . For example, if you detect that the CPU is an 80x86 that's capable of supporting long mode you might ask the FTP server for "/sys/80x86/64-bit/kernel.bin" instead of "/sys/80x86/32-bit/kernel.bin" or "/sys/alpha/kernel.bin".
I guess you could also use HTTP, where your bootloader pretends it's responding to a form, and where the HTTP server uses a CGI script or something to autogenerate and/or autoselect a file to send back.
Mostly it depends on what features you need. In any case, there is no protocol specifically designed for transferring kernels.
Cheers,
Brendan
Re: Kernel Transmission Protocol
Posted: Sun Sep 14, 2008 3:35 pm
by Dario
We use NFS and MOP(DecNet) to boot some old X terminals.
Re: Kernel Transmission Protocol
Posted: Mon Sep 15, 2008 9:50 am
by Jabus
Brendan wrote:
I guess you could also use HTTP, where your bootloader pretends it's responding to a form, and where the HTTP server uses a CGI script or something to autogenerate and/or autoselect a file to send back.
Mostly it depends on what features you need. In any case, there is no protocol specifically designed for transferring kernels.
O.k. I guess I'll use HTTP or perhaps even my own protocol then. I was just worried there wasn't a standard already out there that I was forgetting about.
Thanks for the help.