diff refs/heads/master refs/heads/bochs commit - c7f6dca2baf13f57941aeba81f7adb57d76b01ce commit + 4da36a16dee4c0c7894d6c29073793c8c8a7edd1 blob - 9a311da65de49df2ebb47cf33d961ad49aadc7bb blob + 93965bbe6cfd9a876e8bc43a09cd87baf9db96cf --- emulators/bochs/Makefile +++ emulators/bochs/Makefile @@ -1,16 +1,19 @@ COMMENT= x86 machine simulator -DISTNAME= bochs-2.7 -REVISION= 1 +V = 3.1 +GH_ACCOUNT = bochs-emu +GH_PROJECT = Bochs +GH_TAGNAME = REL_3_1_FINAL +DISTNAME = ${GH_PROJECT:L}-${V} + CATEGORIES= emulators -SITES= ${SITE_SOURCEFORGE:=bochs/} HOMEPAGE= https://bochs.sourceforge.io/ # LGPLv2.1+ and MIT PERMIT_PACKAGE= Yes -WANTLIB += ${COMPILER_LIBCXX} c curses m pthread +WANTLIB += ${COMPILER_LIBCXX} c curses m pthread slirp COMPILER = base-clang ports-gcc base-gcc @@ -32,13 +35,16 @@ CONFIGURE_ARGS= --disable-docbook \ --enable-vmx=2 \ --with-term \ --enable-cet \ - --enable-evex + --enable-evex \ + --enable-using-libslirp -AUTOCONF_VERSION = 2.69 +AUTOCONF_VERSION = 2.72 FLAVORS= debug no_x11 FLAVOR?= +LIB_DEPENDS += net/libslirp + .if ${FLAVOR:Mdebug} CONFIGURE_ARGS+=--disable-debugger-gui \ --enable-debugger \ @@ -59,6 +65,10 @@ WANTLIB+= SDL X11 Xext Xpm Xrandr Xrender iconv sndio NO_TEST= Yes +WRKSRC = ${WRKDIST}/bochs + +USE_GMAKE = Yes + post-install: ${INSTALL_DATA} ${WRKSRC}/docs-html/*.html ${PREFIX}/share/doc/bochs @mv ${PREFIX}/share/doc/bochs/bochsrc-sample.txt \ blob - cacd4287cbb74f16b2dd21488f84743b9c7bed5a blob + 935d152c7eac8f77d4cd01c52024060fa0d63051 --- emulators/bochs/distinfo +++ emulators/bochs/distinfo @@ -1,2 +1,2 @@ -SHA256 (bochs-2.7.tar.gz) = oBCrG/3HKsWgjS4kEs1HHA/r1mrx2TSbwNeWh53lsXo= -SIZE (bochs-2.7.tar.gz) = 5298413 +SHA256 (bochs-3.1.tar.gz) = DTdmeEu8qk1v5X2sUPg8bXCV0OohL9eQTL96d1NHFZo= +SIZE (bochs-3.1.tar.gz) = 9043567 blob - 459eb5c9801206923abe56be8ab3138bfd87d63c (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-Makefile_in +++ /dev/null @@ -1,25 +0,0 @@ -Don't gzip the man pages. - -Index: Makefile.in ---- Makefile.in.orig -+++ Makefile.in -@@ -39,7 +39,7 @@ DESTDIR = - - VERSION=@VERSION@ - REL_STRING=@REL_STRING@ --MAN_PAGE_1_LIST=bochs bximage bochs-dlx -+MAN_PAGE_1_LIST=bochs bximage - MAN_PAGE_5_LIST=bochsrc - INSTALL_LIST_SHARE=bios/BIOS-bochs-* bios/VGABIOS* bios/SeaBIOS* bios/SeaVGABIOS* bios/bios.bin-* bios/vgabios-cirrus.bin-* @INSTALL_LIST_FOR_PLATFORM@ - INSTALL_LIST_DOC=CHANGES COPYING LICENSE README TODO misc/slirp.conf misc/vnet.conf -@@ -463,8 +463,8 @@ clean_docbook:: - install_man:: - -mkdir -p $(DESTDIR)$(man1dir) - -mkdir -p $(DESTDIR)$(man5dir) -- for i in $(MAN_PAGE_1_LIST); do cat $(srcdir)/doc/man/$$i.1 | $(SED) 's/@version@/$(VERSION)/g' | $(GZIP_BIN) -c > $(DESTDIR)$(man1dir)/$$i.1.gz; chmod 644 $(DESTDIR)$(man1dir)/$$i.1.gz; done -- for i in $(MAN_PAGE_5_LIST); do cat $(srcdir)/doc/man/$$i.5 | $(GZIP_BIN) -c > $(DESTDIR)$(man5dir)/$$i.5.gz; chmod 644 $(DESTDIR)$(man5dir)/$$i.5.gz; done -+ for i in $(MAN_PAGE_1_LIST); do cat $(srcdir)/doc/man/$$i.1 | $(SED) 's/@version@/$(VERSION)/g' > $(DESTDIR)$(man1dir)/$$i.1; chmod 644 $(DESTDIR)$(man1dir)/$$i.1; done -+ for i in $(MAN_PAGE_5_LIST); do cat $(srcdir)/doc/man/$$i.5 > $(DESTDIR)$(man5dir)/$$i.5; chmod 644 $(DESTDIR)$(man5dir)/$$i.5; done - - download_dlx: $(DLXLINUX_TAR) - blob - /dev/null blob + ad56f1ff38470b6f346e8b17a675a293945d07dc (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_Makefile_in @@ -0,0 +1,23 @@ +Index: bochs/Makefile.in +--- bochs/Makefile.in.orig ++++ bochs/Makefile.in +@@ -37,7 +37,7 @@ top_srcdir = $(srcdir) + + VERSION=@VERSION@ + REL_STRING=@REL_STRING@ +-MAN_PAGE_1_LIST=bochs bximage bxhub bochs-dlx ++MAN_PAGE_1_LIST=bochs bximage bxhub + MAN_PAGE_5_LIST=bochsrc + INSTALL_LIST_SHARE=bios/BIOS-bochs-* bios/OVMF/* bios/VGABIOS-elpin/* bios/VGABIOS-lgpl/* bios/SeaBIOS/* bios/i440fx/* @INSTALL_LIST_FOR_PLATFORM@ + INSTALL_LIST_DOC=CHANGES COPYING LICENSE README TODO misc/slirp.conf misc/vnet.conf docs-html/cpu_configurability.txt +@@ -475,8 +475,8 @@ clean_docbook:: + install_man:: + -mkdir -p $(DESTDIR)$(man1dir) + -mkdir -p $(DESTDIR)$(man5dir) +- for i in $(MAN_PAGE_1_LIST); do cat $(srcdir)/doc/man/$$i.1 | $(SED) 's/@version@/$(VERSION)/g' | $(GZIP_BIN) -c > $(DESTDIR)$(man1dir)/$$i.1.gz; chmod 644 $(DESTDIR)$(man1dir)/$$i.1.gz; done +- for i in $(MAN_PAGE_5_LIST); do cat $(srcdir)/doc/man/$$i.5 | $(GZIP_BIN) -c > $(DESTDIR)$(man5dir)/$$i.5.gz; chmod 644 $(DESTDIR)$(man5dir)/$$i.5.gz; done ++ for i in $(MAN_PAGE_1_LIST); do cat $(srcdir)/doc/man/$$i.1 | $(SED) 's/@version@/$(VERSION)/g' > $(DESTDIR)$(man1dir)/$$i.1; chmod 644 $(DESTDIR)$(man1dir)/$$i.1; done ++ for i in $(MAN_PAGE_5_LIST); do cat $(srcdir)/doc/man/$$i.5 > $(DESTDIR)$(man5dir)/$$i.5; chmod 644 $(DESTDIR)$(man5dir)/$$i.5; done + + download_dlx: $(DLXLINUX_TAR) + blob - ed9332637f69d90a14aa398aef2a5831ba664d6b (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-_bochsrc +++ /dev/null @@ -1,39 +0,0 @@ -Index: .bochsrc ---- .bochsrc.orig -+++ .bochsrc -@@ -613,7 +613,7 @@ pci: enabled=1, chipset=i440fx - # - # Default value are sync=none, rtc_sync=0, time0=local - #======================================================================= --#clock: sync=none, time0=local -+clock: sync=realtime, time0=local - - #======================================================================= - # CMOSIMAGE: -@@ -669,13 +669,13 @@ private_colormap: enabled=0 - # The optional parameter 'write_protected' can be used to control the media - # write protect switch. By default it is turned off. - #======================================================================= --floppya: 1_44=/dev/fd0, status=inserted -+#floppya: 1_44=/dev/fd0, status=inserted - #floppya: image=../1.44, status=inserted - #floppya: 1_44=/dev/fd0H1440, status=inserted - #floppya: 1_2=../1_2, status=inserted - #floppya: 1_44=a:, status=inserted - #floppya: 1_44=a.img, status=inserted, write_protected=1 --#floppya: 1_44=/dev/rfd0a, status=inserted -+floppya: 1_44=/dev/rfd0a, status=inserted - - #======================================================================= - # FLOPPYB: -@@ -800,8 +800,8 @@ floppy_bootsig_check: disabled=0 - # log: ./bochs.out - # log: /dev/tty - #======================================================================= --#log: /dev/null --log: bochsout.txt -+log: /dev/null -+#log: bochsout.txt - - #======================================================================= - # LOGPREFIX: blob - /dev/null blob + e7f9667757ea70f4d5c0aa0bf5dc753342e6512f (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs__bochsrc @@ -0,0 +1,39 @@ +Index: bochs/.bochsrc +--- bochs/.bochsrc.orig ++++ bochs/.bochsrc +@@ -566,7 +566,7 @@ pci: enabled=1, chipset=i440fx + # + # Default value are sync=none, rtc_sync=0, time0=local + #======================================================================= +-#clock: sync=none, time0=local ++clock: sync=realtime, time0=local + + #======================================================================= + # CMOSIMAGE: +@@ -624,13 +624,13 @@ private_colormap: enabled=0 + # write protect switch. By default it is turned off. + #======================================================================= + #floppya: type=none +-floppya: 1_44=/dev/fd0, status=inserted ++#floppya: 1_44=/dev/fd0, status=inserted + #floppya: image=../1.44, status=inserted + #floppya: 1_44=/dev/fd0H1440, status=inserted + #floppya: 1_2=../1_2, status=inserted + #floppya: 1_44=a:, status=inserted + #floppya: 1_44=a.img, status=inserted, write_protected=1 +-#floppya: 1_44=/dev/rfd0a, status=inserted ++floppya: 1_44=/dev/rfd0a, status=inserted + + #======================================================================= + # FLOPPYB: +@@ -758,8 +758,8 @@ floppy_bootsig_check: disabled=0 + # log: ./bochs.out + # log: /dev/tty + #======================================================================= +-#log: /dev/null +-log: bochsout.txt ++log: /dev/null ++#log: bochsout.txt + + #======================================================================= + # LOGPREFIX: blob - 8e24a59b030d5d2bdd9e4dc9b6d6ea804a99a153 (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-configure_in +++ /dev/null @@ -1,25 +0,0 @@ -the configure script tries to use pkg-config to get the LDFLAGS for -ncurses, but we don't have .pc files for libncurses, so fall back to the -hardcoded -lncurses. - -Index: configure.in ---- configure.in.orig -+++ configure.in -@@ -2929,17 +2929,7 @@ AC_SUBST(CI_SUPPORT_OBJS) - AC_SUBST(EXPORT_DYNAMIC) - - if test "$use_curses" = yes; then -- if test "$PKGCONFIG" != not_found; then -- AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs curses`") -- AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs ncurses`") -- AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs termlib`") -- AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM="`pkg-config --libs pdcurses`") -- else -- AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses') - AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses') -- AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib') -- AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses') -- fi - if test "$GUI_LINK_OPTS_TERM" = ""; then - echo Curses library not found: tried curses, ncurses, termlib and pdcurses. - exit 1 blob - /dev/null blob + 60d6ce7906b7c86e9162b228f516476f6f8c286c (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_configure_ac @@ -0,0 +1,21 @@ +Index: bochs/configure.ac +--- bochs/configure.ac.orig ++++ bochs/configure.ac +@@ -3204,17 +3204,7 @@ AC_SUBST(EXPORT_DYNAMIC) + AC_SUBST(DLLTOOL) + + if test "$use_curses" = yes; then +- if test "x$PKG_CONFIG" != x; then +- AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM="`$PKG_CONFIG --libs curses`") +- AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM="`$PKG_CONFIG --libs ncurses`") +- AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM="`$PKG_CONFIG --libs termlib`") +- AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM="`$PKG_CONFIG --libs pdcurses`") +- else +- AC_CHECK_LIB(curses, mvaddch, GUI_LINK_OPTS_TERM='-lcurses') + AC_CHECK_LIB(ncurses, mvaddch, GUI_LINK_OPTS_TERM='-lncurses') +- AC_CHECK_LIB(termlib, mvaddch, GUI_LINK_OPTS_TERM='-ltermlib') +- AC_CHECK_LIB(pdcurses, mvaddch, GUI_LINK_OPTS_TERM='-lpdcurses') +- fi + if test "$GUI_LINK_OPTS_TERM" = ""; then + echo Curses library not found: tried curses, ncurses, termlib and pdcurses. + exit 1 blob - fea3c2b104734c97d7caf3ded19fa2d127abe08d (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-cpu_apic_cc +++ /dev/null @@ -1,23 +0,0 @@ -fix format string - -Index: cpu/apic.cc ---- cpu/apic.cc.orig -+++ cpu/apic.cc -@@ -26,6 +26,8 @@ - #include "scalar_arith.h" - #include "iodev/iodev.h" - -+#include -+ - #if BX_SUPPORT_APIC - - extern bool simulate_xapic; -@@ -1176,7 +1178,7 @@ void bx_local_apic_c::set_vmx_preemption_timer(Bit32u - vmx_preemption_timer_value = value; - vmx_preemption_timer_initial = bx_pc_system.time_ticks(); - vmx_preemption_timer_fire = ((vmx_preemption_timer_initial >> vmx_preemption_timer_rate) + value) << vmx_preemption_timer_rate; -- BX_DEBUG(("VMX Preemption timer: value = %u, rate = %u, init = %u, fire = %u", value, vmx_preemption_timer_rate, vmx_preemption_timer_initial, vmx_preemption_timer_fire)); -+ BX_DEBUG(("VMX Preemption timer: value = %u, rate = %u, init = %" PRIu64 ", fire = %" PRIu64, value, vmx_preemption_timer_rate, vmx_preemption_timer_initial, vmx_preemption_timer_fire)); - bx_pc_system.activate_timer_ticks(vmx_timer_handle, vmx_preemption_timer_fire - vmx_preemption_timer_initial, 0); - vmx_timer_active = 1; - } blob - /dev/null blob + 3a60f62d84eb923dc2d16c135ea0500b6b15bb9f (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_cpu_apic_cc @@ -0,0 +1,12 @@ +Index: bochs/cpu/apic.cc +--- bochs/cpu/apic.cc.orig ++++ bochs/cpu/apic.cc +@@ -32,6 +32,8 @@ + #include "pc_system.h" + #include "iodev/iodev.h" + ++#include ++ + extern bool simulate_xapic; + + #define LOG_THIS this-> blob - 96c63cb183b4480bf4a5715148bcf5890ee84f97 (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-cpu_paging_cc +++ /dev/null @@ -1,14 +0,0 @@ -fix format string - -Index: cpu/paging.cc ---- cpu/paging.cc.orig -+++ cpu/paging.cc -@@ -804,7 +804,7 @@ bx_phy_address BX_CPU_C::translate_linear_long_mode(bx - // - R/W bit=0 and Dirty=1 for leaf entry - bool shadow_stack_page = ((combined_access & BX_COMBINED_ACCESS_WRITE) != 0) && ((entry[leaf] & 0x40) != 0) && ((entry[leaf] & 0x02) == 0); - if (!shadow_stack_page) { -- BX_DEBUG(("shadow stack access to not shadow stack page CA=%x entry=%lx\n", combined_access, Bit32u(entry[leaf] & 0xfff))); -+ BX_DEBUG(("shadow stack access to not shadow stack page CA=%x entry=%x\n", combined_access, Bit32u(entry[leaf] & 0xfff))); - page_fault(ERROR_PROTECTION, laddr, user, rw); - } - blob - /dev/null blob + e5f4551222301f577d4d3ae5a20f876b465f8d80 (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_gui_keymap_cc @@ -0,0 +1,12 @@ +Index: bochs/gui/keymap.cc +--- bochs/gui/keymap.cc.orig ++++ bochs/gui/keymap.cc +@@ -34,6 +34,8 @@ + #include + #endif + ++#include ++ + // Table of bochs "BX_KEY_*" symbols + // the table must be in BX_KEY_* order + const char *bx_key_symbol[BX_KEY_NBKEYS] = { blob - 45402886f0e998a08be9acf1c5ffa6d1249a66a1 (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-gui_textconfig_cc +++ /dev/null @@ -1,11 +0,0 @@ -Index: gui/textconfig.cc ---- gui/textconfig.cc.orig -+++ gui/textconfig.cc -@@ -36,6 +36,7 @@ - // isn't even defined in this context. - // - -+#include "bochs.h" - #include "config.h" - - #if BX_USE_TEXTCONFIG blob - /dev/null blob + 0733ceb5da49e1e3614452ac606b1ba2ece23572 (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_gui_textconfig_cc @@ -0,0 +1,11 @@ +Index: bochs/gui/textconfig.cc +--- bochs/gui/textconfig.cc.orig ++++ bochs/gui/textconfig.cc +@@ -36,6 +36,7 @@ + // isn't even defined in this context. + // + ++#include "bochs.h" + #include "config.h" + + #if BX_USE_TEXTCONFIG blob - f7f9d51daaa6dd56d041944017d1bc48707dea33 (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-iodev_hdimage_vbox_cc +++ /dev/null @@ -1,41 +0,0 @@ -fix format string - -Index: iodev/hdimage/vbox.cc ---- iodev/hdimage/vbox.cc.orig -+++ iodev/hdimage/vbox.cc -@@ -229,7 +229,7 @@ ssize_t vbox_image_t::read(void *buf, size_t count) - while (count > 0) { - off_t readable = perform_seek(); - if (readable == INVALID_OFFSET) { -- BX_ERROR(("vbox disk image read failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); -+ BX_ERROR(("vbox disk image read failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); - return -1; - } - -@@ -253,7 +253,7 @@ ssize_t vbox_image_t::write(const void *buf, size_t co - while (count > 0) { - off_t writable = perform_seek(); - if (writable == INVALID_OFFSET) { -- BX_ERROR(("vbox disk image write failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); -+ BX_ERROR(("vbox disk image write failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); - return -1; - } - -@@ -389,7 +389,7 @@ void vbox_image_t::read_block(const Bit32u index) - offset = dtoh32(mtlb[index]) * header.block_size; - bx_read_image(file_descriptor, header.offset_data + offset, block_data, header.block_size); - -- BX_DEBUG(("reading block index %d (%d) " FMT_LL "d", index, dtoh32(mtlb[index]), offset)); -+ BX_DEBUG(("reading block index %d (%d) %lld", index, dtoh32(mtlb[index]), (long long)offset)); - } - } - -@@ -415,7 +415,7 @@ void vbox_image_t::write_block(const Bit32u index) - - offset = dtoh32(mtlb[index]) * header.block_size; - -- BX_DEBUG(("writing block index %d (%d) " FMT_LL "d", index, dtoh32(mtlb[index]), offset)); -+ BX_DEBUG(("writing block index %d (%d) %lld", index, dtoh32(mtlb[index]), (long long)offset)); - - bx_write_image(file_descriptor, header.offset_data + offset, block_data, header.block_size); - } blob - /dev/null blob + 8f5df2e5223a1e48a3c3480ed4359bb3fe531269 (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_iodev_hdimage_vbox_cc @@ -0,0 +1,39 @@ +Index: bochs/iodev/hdimage/vbox.cc +--- bochs/iodev/hdimage/vbox.cc.orig ++++ bochs/iodev/hdimage/vbox.cc +@@ -229,7 +229,7 @@ ssize_t vbox_image_t::read(void *buf, size_t count) + while (count > 0) { + off_t readable = perform_seek(); + if (readable == INVALID_OFFSET) { +- BX_ERROR(("vbox disk image read failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); ++ BX_ERROR(("vbox disk image read failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); + return -1; + } + +@@ -253,7 +253,7 @@ ssize_t vbox_image_t::write(const void *buf, size_t co + while (count > 0) { + off_t writable = perform_seek(); + if (writable == INVALID_OFFSET) { +- BX_ERROR(("vbox disk image write failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); ++ BX_ERROR(("vbox disk image write failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); + return -1; + } + +@@ -389,7 +389,7 @@ void vbox_image_t::read_block(const Bit32u index) + offset = dtoh32(mtlb[index]) * header.block_size; + bx_read_image(file_descriptor, header.offset_data + offset, block_data, header.block_size); + +- BX_DEBUG(("reading block index %d (%d) " FMT_LL "d", index, dtoh32(mtlb[index]), offset)); ++ BX_DEBUG(("reading block index %d (%d) %lld", index, dtoh32(mtlb[index]), offset)); + } + } + +@@ -415,7 +415,7 @@ void vbox_image_t::write_block(const Bit32u index) + + offset = dtoh32(mtlb[index]) * header.block_size; + +- BX_DEBUG(("writing block index %d (%d) " FMT_LL "d", index, dtoh32(mtlb[index]), offset)); ++ BX_DEBUG(("writing block index %d (%d) %lld", index, dtoh32(mtlb[index]), (long long)offset)); + + bx_write_image(file_descriptor, header.offset_data + offset, block_data, header.block_size); + } blob - 7ca22b978314d94ff5f54ab4491dc96c57369dbf (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-iodev_hdimage_vmware4_cc +++ /dev/null @@ -1,23 +0,0 @@ -fix format string - -Index: iodev/hdimage/vmware4.cc ---- iodev/hdimage/vmware4.cc.orig -+++ iodev/hdimage/vmware4.cc -@@ -180,7 +180,7 @@ ssize_t vmware4_image_t::read(void * buf, size_t count - while (count > 0) { - off_t readable = perform_seek(); - if (readable == INVALID_OFFSET) { -- BX_DEBUG(("vmware4 disk image read failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); -+ BX_DEBUG(("vmware4 disk image read failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); - return -1; - } - -@@ -202,7 +202,7 @@ ssize_t vmware4_image_t::write(const void * buf, size_ - while (count > 0) { - off_t writable = perform_seek(); - if (writable == INVALID_OFFSET) { -- BX_DEBUG(("vmware4 disk image write failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); -+ BX_DEBUG(("vmware4 disk image write failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); - return -1; - } - blob - /dev/null blob + 93853c0953745717213a19753a00f7a3dac7a89d (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_iodev_hdimage_vmware4_cc @@ -0,0 +1,21 @@ +Index: bochs/iodev/hdimage/vmware4.cc +--- bochs/iodev/hdimage/vmware4.cc.orig ++++ bochs/iodev/hdimage/vmware4.cc +@@ -180,7 +180,7 @@ ssize_t vmware4_image_t::read(void * buf, size_t count + while (count > 0) { + off_t readable = perform_seek(); + if (readable == INVALID_OFFSET) { +- BX_DEBUG(("vmware4 disk image read failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); ++ BX_DEBUG(("vmware4 disk image read failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); + return -1; + } + +@@ -202,7 +202,7 @@ ssize_t vmware4_image_t::write(const void * buf, size_ + while (count > 0) { + off_t writable = perform_seek(); + if (writable == INVALID_OFFSET) { +- BX_DEBUG(("vmware4 disk image write failed on %u bytes at " FMT_LL "d", (unsigned)count, current_offset)); ++ BX_DEBUG(("vmware4 disk image write failed on %u bytes at %lld", (unsigned)count, (long long)current_offset)); + return -1; + } + blob - 71eedf826a73b6e0b80c904dc1462f4a6051285a (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-iodev_network_eth_socket_cc +++ /dev/null @@ -1,11 +0,0 @@ -Index: iodev/network/eth_socket.cc ---- iodev/network/eth_socket.cc.orig -+++ iodev/network/eth_socket.cc -@@ -93,7 +93,6 @@ extern "C" { - #include - #include - #include --#include - #include - #ifdef __linux__ - #include blob - /dev/null blob + 96b2e8e76f67eee607adb66a15c5c8e79eafbcf0 (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_iodev_network_eth_slirp_cc @@ -0,0 +1,13 @@ +Index: bochs/iodev/network/eth_slirp.cc +--- bochs/iodev/network/eth_slirp.cc.orig ++++ bochs/iodev/network/eth_slirp.cc +@@ -66,6 +66,9 @@ typedef ssize_t slirp_ssize_t; + #endif + #include + ++#include ++#include ++ + static unsigned int bx_slirp_instances = 0; + + // network driver plugin entry point blob - 4780e75d0a0a1ff712838d35ab0f808468d61c38 (mode 644) blob + /dev/null --- emulators/bochs/patches/patch-iodev_network_netutil_cc +++ /dev/null @@ -1,21 +0,0 @@ -fix format string - -Index: iodev/network/netutil.cc ---- iodev/network/netutil.cc.orig -+++ iodev/network/netutil.cc -@@ -1671,11 +1671,11 @@ void vnet_server_c::ftp_list_directory(tcp_conn_t *tcp - strftime(tmptime, 20, "%b %d %H:%M", localtime(&st.st_mtime)); - } - if (S_ISDIR(st.st_mode)) { -- sprintf(linebuf, "drwxrwxr-x 1 ftp ftp %ld %s %s%c%c", st.st_size, -- tmptime, dent->d_name, 13, 10); -+ sprintf(linebuf, "drwxrwxr-x 1 ftp ftp %lld %s %s%c%c", -+ (long long) st.st_size, tmptime, dent->d_name, 13, 10); - } else { -- sprintf(linebuf, "-rw-rw-r-- 1 ftp ftp %ld %s %s%c%c", st.st_size, -- tmptime, dent->d_name, 13, 10); -+ sprintf(linebuf, "-rw-rw-r-- 1 ftp ftp %lld %s %s%c%c", -+ (long long)st.st_size, tmptime, dent->d_name, 13, 10); - } - } - } else { blob - /dev/null blob + 59e6b93f11b3130ad6c0ec3846fb6d615026dd43 (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_iodev_network_eth_slirp_cc.orig @@ -0,0 +1,12 @@ +Index: bochs/iodev/network/eth_slirp.cc +--- bochs/iodev/network/eth_slirp.cc.orig ++++ bochs/iodev/network/eth_slirp.cc +@@ -66,6 +66,8 @@ typedef ssize_t slirp_ssize_t; + #endif + #include + ++#include ++ + static unsigned int bx_slirp_instances = 0; + + // network driver plugin entry point blob - /dev/null blob + 17e5132ac356b2dd28cacc393854911fe1a156c0 (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_iodev_network_eth_socket_cc @@ -0,0 +1,11 @@ +Index: bochs/iodev/network/eth_socket.cc +--- bochs/iodev/network/eth_socket.cc.orig ++++ bochs/iodev/network/eth_socket.cc +@@ -93,7 +93,6 @@ extern "C" { + #include + #include + #include +-#include + #include + #ifdef __linux__ + #include blob - /dev/null blob + b413908d4131a2e2e9cd6cf9d9d0b1a857491244 (mode 644) --- /dev/null +++ emulators/bochs/patches/patch-bochs_iodev_network_netutil_cc @@ -0,0 +1,19 @@ +Index: bochs/iodev/network/netutil.cc +--- bochs/iodev/network/netutil.cc.orig ++++ bochs/iodev/network/netutil.cc +@@ -1671,11 +1671,11 @@ void vnet_server_c::ftp_list_directory(tcp_conn_t *tcp + strftime(tmptime, 20, "%b %d %H:%M", localtime(&st.st_mtime)); + } + if (S_ISDIR(st.st_mode)) { +- sprintf(linebuf, "drwxrwxr-x 1 ftp ftp %ld %s %s%c%c", st.st_size, +- tmptime, dent->d_name, 13, 10); ++ sprintf(linebuf, "drwxrwxr-x 1 ftp ftp %lld %s %s%c%c", ++ (long long)st.st_size, tmptime, dent->d_name, 13, 10); + } else { +- sprintf(linebuf, "-rw-rw-r-- 1 ftp ftp %ld %s %s%c%c", st.st_size, +- tmptime, dent->d_name, 13, 10); ++ sprintf(linebuf, "-rw-rw-r-- 1 ftp ftp %lld %s %s%c%c", ++ (long long)st.st_size, tmptime, dent->d_name, 13, 10); + } + } + } else { blob - 01106631618fc35c27bf83d48c0c7fb0589b9cd0 blob + b26a2a60bc7f1d46490b07c51a6ac3f1ea9758d2 --- emulators/bochs/pkg/PLIST +++ emulators/bochs/pkg/PLIST @@ -2,23 +2,30 @@ @bin bin/bxhub @bin bin/bximage @man man/man1/bochs.1 +@man man/man1/bxhub.1 @man man/man1/bximage.1 @man man/man5/bochsrc.5 share/bochs/ share/bochs/BIOS-bochs-latest share/bochs/BIOS-bochs-legacy +share/bochs/OVMF-pure-efi.fd +share/bochs/README-i440fx +share/bochs/RELEASEX64_OVMF.fd share/bochs/SeaBIOS-README share/bochs/SeaVGABIOS-README share/bochs/VGABIOS-elpin-2.40 share/bochs/VGABIOS-elpin-LICENSE share/bochs/VGABIOS-lgpl-README -share/bochs/VGABIOS-lgpl-latest -share/bochs/VGABIOS-lgpl-latest-banshee -share/bochs/VGABIOS-lgpl-latest-cirrus -share/bochs/VGABIOS-lgpl-latest-cirrus-debug -share/bochs/VGABIOS-lgpl-latest-debug -share/bochs/bios.bin-1.13.0 +share/bochs/VGABIOS-lgpl-latest-banshee-debug.bin +share/bochs/VGABIOS-lgpl-latest-banshee.bin +share/bochs/VGABIOS-lgpl-latest-cirrus-debug.bin +share/bochs/VGABIOS-lgpl-latest-cirrus-vesa3.bin +share/bochs/VGABIOS-lgpl-latest-cirrus.bin +share/bochs/VGABIOS-lgpl-latest-debug.bin +share/bochs/VGABIOS-lgpl-latest.bin +share/bochs/bios.bin-1.16.0 share/bochs/bochsrc +share/bochs/i440fx.bin share/bochs/keymaps/ share/bochs/keymaps/sdl-pc-de.map share/bochs/keymaps/sdl-pc-us.map @@ -44,5 +51,6 @@ share/doc/bochs/LICENSE share/doc/bochs/README share/doc/bochs/TODO share/doc/bochs/bxdebugger.html +share/doc/bochs/cpu_configurability.txt share/doc/bochs/slirp.conf share/doc/bochs/vnet.conf