Kernel Transmission Protocol

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
Jabus
Member
Member
Posts: 39
Joined: Sun Jan 07, 2007 7:54 am

Kernel Transmission Protocol

Post 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?
Dario
Member
Member
Posts: 117
Joined: Sun Aug 31, 2008 12:39 pm

Re: Kernel Transmission Protocol

Post by Dario »

BOOTP and DHCP
____
Dario
Jabus
Member
Member
Posts: 39
Joined: Sun Jan 07, 2007 7:54 am

Re: Kernel Transmission Protocol

Post 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.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Kernel Transmission Protocol

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Dario
Member
Member
Posts: 117
Joined: Sun Aug 31, 2008 12:39 pm

Re: Kernel Transmission Protocol

Post by Dario »

We use NFS and MOP(DecNet) to boot some old X terminals.
____
Dario
Jabus
Member
Member
Posts: 39
Joined: Sun Jan 07, 2007 7:54 am

Re: Kernel Transmission Protocol

Post 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.
Post Reply