Имею следующую необходимость - скомпилировать pxegrub.
При стандартной установки grub из портов загрузчик pxegrub не создается.
Нагуглил следующие решение:
Код: Выделить всё
cd /usr/ports/sysutils/grub
make extract
cd /work/grub-0.97
./configure --enable-diskless --enable-eepro100
make
После данных мытарств в папке согласно описанию должен появится искомый файл (pxegrub)
В моем случае компиляция вылетает с ошибкой:
Код: Выделить всё
main.c:57: error: static declaration of 'bootp_data' follows non-static declaration
./etherboot.h:534: error: previous declaration of 'bootp_data' was here
main.c:59: error: static declaration of 'end_of_rfc1533' follows non-static declaration
./etherboot.h:536: error: previous declaration of 'end_of_rfc1533' was here
main.c: In function 'udp_transmit':
main.c:231: warning: pointer targets in passing argument 1 of 'eth_transmit' differ in signedness
main.c:276: warning: pointer targets in passing argument 1 of 'eth_transmit' differ in signedness
main.c:290: warning: pointer targets in passing argument 1 of 'eth_transmit' differ in signedness
main.c: In function 'tftp':
main.c:462: warning: pointer targets in passing argument 1 of 'fnc' differ in signedness
main.c: In function 'rarp':
main.c:509: warning: pointer targets in passing argument 1 of 'eth_transmit' differ in signedness
main.c: In function 'udpchksum':
main.c:729: warning: dereferencing type-punned pointer will break strict-aliasing rules
main.c: In function 'await_reply':
main.c:893: warning: pointer targets in passing argument 1 of 'grub_memcmp' differ in signedness
main.c:895: warning: pointer targets in passing argument 1 of 'grub_memcmp' differ in signedness
main.c:925: warning: pointer targets in passing argument 1 of 'decode_rfc1533' differ in signedness
main.c: In function 'decode_rfc1533':
main.c:973: warning: pointer targets in passing argument 1 of 'grub_memcmp' differ in signedness
main.c:973: warning: pointer targets in passing argument 2 of 'grub_memcmp' differ in signedness
main.c:984: warning: pointer targets in passing argument 1 of 'grub_memcmp' differ in signedness
main.c:984: warning: pointer targets in passing argument 2 of 'grub_memcmp' differ in signedness
main.c:1057: warning: pointer targets in passing argument 1 of 'grub_memcmp' differ in signedness
main.c:1057: warning: pointer targets in passing argument 2 of 'grub_memcmp' differ in signedness
*** Error code 1
Stop in /usr/ports/sysutils/grub/work/grub-0.97/netboot.
*** Error code 1
Stop in /usr/ports/sysutils/grub/work/grub-0.97.
*** Error code 1
Stop in /usr/ports/sysutils/grub/work/grub-0.97.
Код: Выделить всё
#cat ../../patch_me
--- work/grub-0.97.orig/netboot/main.c 2004-05-21 00:19:33.000000000 +0200
+++ work/grub-0.97/netboot/main.c 2007-07-20 02:31:28.000000000 +0200
@@ -54,9 +54,9 @@
static int vendorext_isvalid;
static unsigned long netmask;
-static struct bootpd_t bootp_data;
+struct bootpd_t bootp_data;
static unsigned long xid;
-static unsigned char *end_of_rfc1533 = NULL;
+unsigned char *end_of_rfc1533 = NULL;
#ifndef NO_DHCP_SUPPORT
#endif /* NO_DHCP_SUPPORT */
Код: Выделить всё
cd ../../
patch < patch_me
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- work/grub-0.97.orig/netboot/main.c 2004-05-21 00:19:33.000000000 +0200
|+++ work/grub-0.97/netboot/main.c 2007-07-20 02:31:28.000000000 +0200
--------------------------
Patching file work/grub-0.97/netboot/main.c using Plan A...
Hunk #1 succeeded at 54 with fuzz 2.
Hmm... Ignoring the trailing garbage.
done
cd work/grub-0.97
Код: Выделить всё
In file included from timer.c:11:
timer.h:53: warning: no previous prototype for 'timer2_running'
timer.h:58: warning: no previous prototype for 'waiton_timer2'
make: don't know how to make %.o:. Stop
*** Error code 1
Stop in /usr/ports/sysutils/grub/work/grub-0.97.
*** Error code 1
Stop in /usr/ports/sysutils/grub/work/grub-0.97.
Ось - FreeBSD 7.1-RELEASE-p7
на всякий случай gmake-3.81_3
больше ничего такого не стоит.