📄 readme
字号:
/*****************************************************************************\ LOADERX --------a simple loader to loader linux from DOS, expecially useful for big initrd image.(C) 2003 Fan Xiaoju (xiaoju_f@263.net)\*****************************************************************************/Principle and RequirementIn order to build loaderx, WATCOM C and BORLAND Tasm/Tlink are both required. WATCOM C is used to compile loader.c, which need access the 4GB physical memory directly. Protected mode part of kernel in bzImage format must be loaded to the physical address 0x100000. In order to make it simple, I choose WATCOM C to load it. But it seems that WATCOM C itself had use some memory which begins from 0x100000, and DOS use some space begins from 0x9000:0000. So I had to loader the kernel to high memory(I use 0x800000 now, and you can change it), and write another program to copy it back and boot, that is cpboot.asm.BORLAND Tasm/Tlink are used to assemble cpboot.asm. cpboot.asm do only two things:Firstly, switch to 32bit protected mode which physical memory is directly mapped to 0 to 4GB, and copy the kernel we loaded by loader.c to the position it should be.Secondly, use a long jump instruction to jump to setup section of the kernel. Now kernel started!Because cpboot.asm will never return controll back to DOS, it doesn't need to care of DOS's life.To MakeType make.bat <CR>To Boot (there are two examples)Type loaderx.bat <CR>, or ramdisk.bat <CR> if you want to use ramdisk as root. loadlin can't load initrd which is larger than about 6MB, but this problem could.LimitsBecause DOS is so called hostile OS for load linux, this program can only work in MS-DOS which version is below or equal to 6.22, without himem.sys and emm386.exe being loaded. I have tested it on MS-DOS 6.20.ThanksLi Xinchang, thanks for his tutorial on 80x86 protected mode. I also copied some of his example code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -