BIOSLoader

本文档详细介绍了如何利用DiskPart工具创建一个可启动的分区,并对其进行了格式化及安装必要的启动文件。整个过程分为七个步骤:准备工具、清理磁盘、创建分区、设置活动分区、写入启动扇区、复制启动文件以及最后的调试验证。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

========================================================

Study on-line help about "How to Create a Bootable Partition with DiskPart "

1. Copy DiskPart.exe bsect32.img Mbr.dat to /

2. DiskPart

List disk

Select disk <N>

clean

Select disk <N>

Create Primary Size=X (3900 for 4G)

exit

3. Use Storage Manager to format the new partition as "FAT32", 2 FATs. and mount it.

4. DiskPart

Select disk <N>

Select partition Y (0)

Active

FixPartOffset

DumpMBR

BootSec File=/bsect32.img Sector=Z (where Z is the first sector of the partition as given in the DumpMBR command output, 1)

MBRCode File=/Mbr.dat

exit

5. Copy the file BLDR

6. Copy the file Boot.ini and Splash.bmx

7. Copy the file NK.bin

 

========================================================

bsect.img -- %_TARGETPLATROOT%/src/bootloader/biosloader/bootsector/fat32

 

1. download MASM32 assembler

http://www.masm32.com/masmdl.htm

2. Modify build.bat
c:/MASM32/bin/ml /Zm /Flbsect.lst /c bsect.asm
c:/MASM32/bin/link16 bsect.obj,bsect.com,,,,
debug bsect.com < getbsect.scr

========================================================
bldr -- 
%_TARGETPLATROOT%/src/bootloader/biosloader/loader/fixed/main
%_TARGETPLATROOT%/src/bootloader/biosloader/iniparser
%_TARGETPLATROOT%/src/bootloader/biosloader/loader/fixed/fat32

1. Modify source file to add the sentence for debug
DEBUG_OPTIONS=-DDEBUG -DFULLMESSAGES -DFULLINT13MESSAGES

2. Add environment variable
set _PLATLIB=%_TARGETPLATROOT%/lib

3. Modify makebldr.bat
replace %_PROJECTROOT%/cesysgen/platform/%_TGTPLAT% by %_TARGETPLATROOT%

4. Modify boot.bib
replace $(_PROJECTROOT)/cesysgen/platform/$(_TGTPLAT) by $(_TARGETPLATROOT)

5. The path name is too long to execute debug, copy the bldr and fixjmp.scr to /temp/ and type
debug bldr < fixjmp.scr


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值