Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Apr 2016 14:48:49 +0300
From:      Aleksander Alekseev <afiskon@devzen.ru>
To:        freebsd-hackers@freebsd.org
Subject:   A few stupid questions regarding MBR and boot0
Message-ID:  <20160414144849.7a08b1db@fujitsu>

next in thread | raw e-mail | index | archive | help
Hello

I was trying to figure out how FreeBSD boot process works and noticed
something strange.

1) If I understand correctly first 512 bytes of /dev/ad0
and /boot/boot0 file should match, but they don't:

http://afiskon.ru/s/31/665dc9755c_mbr.txt

Could someone please explain why they don't match?

2) I tried to compile boot0 from source (r297956) but compilation
failed:

```
$ cd sys/boot/i386/boot0
$ make

Warning: Object directory not changed from
original /usr/home/eax/freebsd-src/sys/boot/i386/boot0

/usr/local/bin/clang38 -O2 -pipe -O2 -pipe -g -march=native
-DVOLUME_SERIAL -DPXE -DFLAGS=0x8f  -DTICKS=0xb6  -DCOMSPEED="7 << 5 +
3" -march=i386 -ffreestanding  -msoft-float -m32 -std=gnu99
-Qunused-arguments -m32 -c boot0.S -o boot0.o clang -cc1as: fatal
error: error in backend: invalid .org offset '430' (at offset '439')
*** Error code 1

Stop.
make: stopped in /usr/home/eax/freebsd-src/sys/boot/i386/boot0
```

Am I doing something wrong?

-- 
Best regards,
Aleksander Alekseev
http://eax.me/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160414144849.7a08b1db>