Advertisement
MichaelPetch

SO78992609 - build

Sep 17th, 2024
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. nasm -f bin first_stage.asm -o first_stage.bin
  2. dd if=/dev/zero of=bootloader.img bs=512 count=131072
  3. # Place second stage at sector 1 (seek=0)
  4. dd if=first_stage.bin of=bootloader.img bs=512 seek=0 conv=notrunc
  5. # Place second stage at sector 2 (seek=1)
  6. nasm -f bin second_stage.asm -o second_stage.bin
  7. dd if=second_stage.bin of=bootloader.img bs=512 seek=1 conv=notrunc
  8. nasm -f bin kernel.asm -o kernel.bin
  9. # Place kernel at sector 5 (seek=4)
  10. dd if=kernel.bin of=bootloader.img bs=512 seek=4 conv=notrunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement