当前位置:网站首页>Make a boot floppy and boot with bochs emulator
Make a boot floppy and boot with bochs emulator
2022-08-10 06:16:00 【Liu Shigang】
1.bximage creates a floppy disk.
Choose 1
Default[1.44M]
Name boot.img
status=inserted indicates that the floppy disk has been inserted
2. Compile the boot program compiled by boot.asm.
Compile using the nasm compiler.
-o parameters: nasm filename -o target program name
-o means output file like gcc.
Compile command:
nasm boot.asm -o boot.bin
3. Use the dd command to force the boot program into the fixed sector of the virtual floppy disk.
dd if=boot.bin of=./boot.img bs=512 count=1 conv=notrunc
conv=notrunc: After writing the data, do not change the size of the output file.
4. Configure the bochs virtual machine configuration file.
# configuration file generated by Bochsplugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, parallel=1, serial=1, iodebug=1config_interface: textconfigdisplay_library: x#memory: host=2048, guest=2048romimage: file="/home/hao/work_pro/bin_bochs/share/bochs/BIOS-bochs-latest"vgaromimage: file="/home/hao/work_pro/bin_bochs/share/bochs/VGABIOS-lgpl-latest"boot: floppyfloppy_bootsig_check: disabled=0floppya: type=1_44, 1_44="boot.img", status=inserted, write_protected=0# no floppybata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14ata0-master: type=noneata0-slave: type=noneata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15ata1-master: type=noneata1-slave: type=noneata2: enabled=0ata3: enabled=0pci: enabled=1, chipset=i440fxvga: extension=vbe, update_freq=5cpu: count=1:1:1, ips=4000000, quantum=16, model=corei7_haswell_4770, reset_on_triple_fault=1, cpuid_limit_winnt=0, ignore_bad_msrs=1, mwait_is_nop=0, msrs="msrs.def"cpuid: x86_64=1,level=6, mmx=1, sep=1, simd=avx512, aes=1, movbe=1, xsave=1,apic=x2apic,sha=1,movbe=1,adx=1,xsaveopt=1,avx_f16c=1,avx_fma=1,bmi=bmi2,1g_pages=1,pcid=1,fsgsbase=1,smep=1,smap=1,mwait=1,vmx=1cpuid: family=6, model=0x1a, stepping=5, vendor_string="GenuineIntel", brand_string="Intel(R) Core(TM) i7-4770 CPU (Haswell)"print_timestamps: enabled=0debugger_log: -magic_break: enabled=0port_e9_hack: enabled=0private_colormap: enabled=0clock: sync=none, time0=local, rtc_sync=0# no cmosimage# no loaderlog: -logprefix: %t%e%ddebug: action=ignoreinfo: action=reporterror: action=reportpanic: action=askkeyboard: type=mf, serial_delay=250, paste_delay=100000, user_shortcut=nonemouse: type=ps2, enabled=0, toggle=ctrl+mbuttonspeaker: enabled=1, mode=systemparport1: enabled=1, file=noneparport2: enabled=0com1: enabled=1, mode=nullcom2: enabled=0com3: enabled=0com4: enabled=0megs: 2048
5. Start bochs.
bochs -f ./bochsrc
6. Enter c to continue execution.
边栏推荐
猜你喜欢
随机推荐
UE 游戏模式
二叉树 6/15 76-80
H2数据库如何动态插入数据
Linux的文件IO与标准IO,以及IO缓存
OpenGL学习笔记(LearnOpenGL)-第二部分 绘制三角形
21天学习挑战赛--图像物体的边界
hanLP探索-语义距离计算的实现
21天学习挑战赛--补种胡杨求最大连续胡杨数量
Kernel performance analysis summary
UnityShader入门精要-纹理动画、顶点动画
在Unity中判断游戏物体是否在游戏屏幕范围之内
在TypeScript中使用parseInt()
【备份】《Unity Shader入门精要》配图
OpenGL学习笔记(LearnOpenGL)-第五部分 纹理
lua循环
初学者也能看懂的Ray March体积云
OpenGL学习笔记(LearnOpenGL)-第三部分 绘制矩形
Unity object pool implementation
UnityShader入门精要--Unity中的基础光照
电池级碳酸氢锂除杂质钙镁离子工艺原理