It's always good to try. It's better you first assemble the asm files using some assembler to object files (use the assembler suitable for the assembly code), then compile the C files (using -c switch of gcc) to corresponding object files, finally link the things which have reference. You may write a custom Makefile for the same. Jmp my_kernel may or may not start your kernel, it highly depends on what you are doing in your code and where from you are jumping in total boot procedure (refer boot procedure of linux). But just try. You can use both lilo and grub once you placed your program in an addressable location (preferably in the start of some partition)
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of hashir n a Sent: Tuesday, January 04, 2005 6:17 PM To: [email protected] Subject: [Mailinglist] RTOS HELP Hi All Sorry,this isn't regarding linux. But this might be helpful for all those people who are interested in Embedded systems and OS's. Especially those who are making their own OS. I have a RTOS kernel source. Since it isnt linux,theres isnt a MAKEFILE so i cant do anything like 'make config' etc like we do with the Linux Kernel. Now This source is for the x386 Architecture. My doubt is how to use build this source and use this kernel. The source contains *.c and a few *.asm files. The source is for the 386 in the protected mode. I did a little googling and found this site. http://linuxgazette.net/issue82/raghu.html This explains a lot about Protected Mode and how to boot a floppy into protected mode. Contains SOURCE CODE too.The source is in assembly and can be compiled with NASM. nasm abc.asm . and dd if=abc of=/dev/fd0 and boot the floppy to boot into Protected Mode. The final line in the source code is spin : jmp spin ; Loop This causes this to go into a infinite loop. MY DOUBTS: 1) How to compile the source kernel ? It has .c's that have references to asm files and vice versa. 2) Finally use the above code to run the kernel. Instead of jmp spin ,if i change that to jmp my_kernel. Wouldnt that start my kernel? 3) Can i use GRUB or LILO to do the same? Is there anyway i can use the Kernel Source to Learn about it? ANY IDEAS and ANY LINKS? Hope My Doubt is CLEAR. PLEASE HELLLLLLLLLLLLLP 'regards Hashir N A _______________________________________________ Mailinglist mailing list [email protected] http://mail.ilug-cochin.org/mailman/listinfo/mailinglist_ilug-cochin.org
