Re: James Molloy's Tutorial: Are there workarounds if you do not use Grub but your own tiny bootloader, e.g. for the loading of the files to the ram disk area? (chapter eight)
Which tool could you recommend (MS Windows) for transfering files/data from external mediums to the memory before or after the boot process?
There are more transfer problems like initial_esp (for moving stack), end of kernel, ...
James Molloy's Tutorial without Grub Multi Bootloader?
Re: James Molloy's Tutorial without Grub Multi Bootloader?
You have to strip the Multiboot code so boot.s is:ehenkes wrote:Re: James Molloy's Tutorial: Are there workarounds if you do not use Grub but your own tiny bootloader, e.g. for the loading of the files to the ram disk area? (chapter eight)
Which tool could you recommend (MS Windows) for transfering files/data from external mediums to the memory before or after the boot process?
There are more transfer problems like initial_esp (for moving stack), end of kernel, ...
Code: Select all
start:
mov esp, stack
cli
call main
jmp $
stack resb 16384
Use the same linker script.
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: James Molloy's Tutorial without Grub Multi Bootloader?
Are you seriously asking for a windows application to run at boot-time? Nonexistant.Which tool could you recommend (MS Windows) for transfering files/data from external mediums to the memory before or after the boot process?
If you read the tutorial you would know about the multiboot standard, and you wouldn't be asking this question.Re: James Molloy's Tutorial: Are there workarounds if you do not use Grub but your own tiny bootloader
Re: James Molloy's Tutorial without Grub Multi Bootloader?
For loading the initrd, I used somethign like
and compiled it like
and then linked it with the rest of the kernel like
then all you have to do to get the address of initrd is
Very simple stuff..
Code: Select all
global initrd
global end_initrd
initrd:
incbin "initrd.bin"
end_initrd:
Code: Select all
yasm -f elf initrd.asm
Code: Select all
ld ... main.o initrd.o
Code: Select all
extern char initrd[];
...
initrd[0]; //first byte of ramdisk
Re: James Molloy's Tutorial without Grub Multi Bootloader?
@earlz: thanks, I did not know this incbin instruction. Great!
It worked very well.
I worked on the VFS and the RAM disk, because it is very important to bring data, specialized kernel modules or user code into the memory of the OS. The way how it works now is as follows:
1) produce a binary image from various files (with "make_initrd.exe", source code: "make_initrd.c"). I renamed the resulting image to "file_data.dat". This is the target for incbin in process.asm.
2a) include it in process.asm with incbin, global addresses:
2b) Linker transfers it to the memory at &file_data_start
3) The source code linein main() transfers the data with the files to the RAM disk (this is an easy way to exchange data with the OS)
4) The Virtual File System (VFS) with individual file headers helps to access the files in the RAM disk
PrettyOS: http://www.henkessoft.de/OS_Dev/Downloads/36.zip
Screenshot: http://www.henkessoft.de/OS_Dev/Downloa ... k_test.png
It worked very well.
I worked on the VFS and the RAM disk, because it is very important to bring data, specialized kernel modules or user code into the memory of the OS. The way how it works now is as follows:
1) produce a binary image from various files (with "make_initrd.exe", source code: "make_initrd.c"). I renamed the resulting image to "file_data.dat". This is the target for incbin in process.asm.
2a) include it in process.asm with incbin, global addresses:
Code: Select all
; data for ramdisk
global _file_data_start
global _file_data_end
_file_data_start:
incbin "file_data.dat"
_file_data_end:
3) The source code line
Code: Select all
k_memcpy((void*)ramdisk_start, &file_data_start, (ULONG)&file_data_end - (ULONG)&file_data_start);
4) The Virtual File System (VFS) with individual file headers helps to access the files in the RAM disk
PrettyOS: http://www.henkessoft.de/OS_Dev/Downloads/36.zip
Screenshot: http://www.henkessoft.de/OS_Dev/Downloa ... k_test.png
I thought that there might be a little tool (at MS Windows developing platform) performing the transfer controlled by the makefile before booting, but I think now that this is really nonsense.Are you seriously asking for a windows application to run at boot-time? Nonexistant.
http://www.henkessoft.de/OS_Dev/OS_Dev3.htm (OSDEV)
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS
http://www.c-plusplus.de/forum/viewforu ... is-62.html
irc.euirc.net #PrettyOS