美文网首页
如何编译新的MBR Image

如何编译新的MBR Image

作者: v1gor | 来源:发表于2019-11-02 14:09 被阅读0次

修改head.s或boot.s之后如何编译出新的Image来调试运行

https://stackoverflow.com/questions/35952853/relocation-truncated-to-fit-r-386-16-against-text

https://stackoverflow.com/questions/34995239/nasm-ld-relocation-truncated-to-fit-r-386-16

https://stackoverflow.com/questions/14436184/how-to-install-as86-in-debian-6-0

# Makefile for the simple example kernel.
AS86    =as86 -0 -a
LD86    =ld86 -0
AS  =as
LD  =ld
LDFLAGS =-m elf_i386 -Ttext 0 -e startup_32 -s -x -M

all:    Image

Image: boot system
    dd bs=32 if=boot of=Image skip=1
    objcopy -O binary system head
    cat head >> Image

disk: Image
    dd bs=8192 if=Image of=/dev/fd0
    sync;sync;sync

head.o: head.s
    gcc -m32 -c head.s

system: head.o
    $(LD) $(LDFLAGS) head.o  -o system > System.map

boot:   boot.s
    $(AS86) -o boot.o boot.s
    $(LD86) -s -o boot boot.o

clean:
    rm -f Image System.map core boot head *.o system

相关文章

  • 如何编译新的MBR Image

    修改head.s或boot.s之后如何编译出新的Image来调试运行 https://stackoverflow....

  • 三、Image与Container

    1、image image层的概念 现有的image都是怎么来的呢?其实image就是通过编译运行Dockerfi...

  • StarGAN - 图像到图像的翻译

    本文为AI研习社编译的技术博客,原标题: StarGAN — Image-to-Image Translation...

  • APK构建过程

    APK的编译打包流程:编译–>DEX–>打包–>签名和对齐image.png 1、编译 Java编译器对工程本身的...

  • Centos-扩容已有分区的磁盘空间

    针对:磁盘已有在用盘,再扩容空间用于增加新的MBR分区。 分区挂载准备 新增并格式化MBR分区场景:新增空间用于增...

  • qemu-ubuntu-arm64 kernel

    安装qemu 安装编译调试工具 下载&编译Busybox 下载&编译kernel Image在目录“arch/ar...

  • 编译安装nginx

    编译安装nginx: windows域名解析:image

  • 注意,问题归档

    没配置编译环境: image.pngimage.png

  • jvm专题二

    jvm架构理解image.png jvm执行流程Java编译成字节码、动态编译和解释为机器码的过程分析:image...

  • 如何将硬盘更改为GPT/MBR分区格式

    如何将硬盘更改为MBR分区格式 说明:1.当硬盘分区格式为MBR分区格式时候,才可以利用DiskGenius软件进...

网友评论

      本文标题:如何编译新的MBR Image

      本文链接:https://www.haomeiwen.com/subject/pancbctx.html