3.2. Tracking the source code with GIT

GIT is a free and open source version control system designed to handle small to very large project efficiently. Git is used to tracking changes in the source code, enabling multiple developers to work together on non-linear development. The Bochs source code and documentation is available using GIT[1] hostet on GitHub.

3.2.1. Checking out Bochs

When you have a GIT client installed, the first step is to do a checkout. The initial checkout command is long and ugly, but usually you only have to do it once. The example below shows the GIT checkout process of the Bochs master branch in Unix. On the Windows platform, you can download a GIT client from git-scm.com, or use GIT within Cygwin[2].

Figure 3-1. Checking out Bochs in GIT

  user$ git clone https://github.com/bochs-emu/Bochs.git
  Cloning into 'Bochs'...
  remote: Enumerating objects: 107946, done.
  remote: Counting objects: 100% (2708/2708), done.
  remote: Compressing objects: 100% (869/869), done.
  remote: Total 107946 (delta 2095), reused 2118 (delta 1817), pack-reused 105238
  Receiving objects: 100% (107946/107946), 39.53 MiB | 2.86 MiB/s, done.
  Resolving deltas: 100% (85554/85554), done.
  (This might take a few minutes, depending on your network connection.)
  user$ cd Bochs/bochs
  user$ ls
  CHANGES           aclocal.m4      bxversion.rc.in  crc.cc       iodev      osdep.h           win32res.rc
  COPYING           bios            config.cc        doc          logio.cc   param_names.h     win32usbres.rc
  LICENSE           bochs.h         config.guess     docs-html    logio.h    patches           wxbochs.rc
  Makefile.in       build           config.h.in      extplugin.h  ltmain.sh  pc_system.cc
  PARAM_TREE.txt    bx_debug        config.sub       gdbstub.cc   main.cc    pc_system.h
  README            bxdisasm.cc     configure        gui          memory     plugin.cc
  README-wxWidgets  bxthread.cc     configure.ac     host         misc       plugin.h
  TESTFORM.txt      bxthread.h      cpu              install-sh   msrs.def   qemu-queue.h
  TODO              bxversion.h.in  cpudb.h          instrument   osdep.cc   win32_enh_dbg.rc
  user$ _

Note: This is just an example output of a checkout of specific version of the Bochs trunk and folder. Depending on the checkout command and revision, you most likely will see more/other files.

Tip: If you have write access to the Bochs GIT tree, see the Developers Guide for instructions.

The GIT checkout process (above) gives you a directory called Bochs that contains the very latest source code. I will refer to this directory as $BOCHS. In this directory there's also a subdirectory called ".git" which tells the GIT software where the code was checked out, what version you have, and where to go for future updates.

3.2.2. Getting the Latest Version

Most developers use GIT to always give them the latest source code. The minute that any developer checks in a change, they are available to everyone else through GIT. You just have to type git pull in the $BOCHS directory, and GIT will retrieve any files and directories that have been changed since you did a checkout. If you update regularly, each update takes a short time because it downloads only the files that changed. See also Getting a release version.

The git pull command tells you if any new files have been downloaded from the server, and it also tells you if you have modified any of the GIT-controlled files. As it checks through the source directories, it will list files that have changed.

3.2.3. Getting a Release Version

You can also use the GIT checkout command to get the Bochs source code for any release since March 2000. The command is

  user$ git clone --branch tagname https://github.com/bochs-emu/Bochs.git
The tagname tells which release you want, and it can be one of the following:

Table 3-1. Bochs Release Tags

Bochs versionRelease tag for GITRelease date
2.8REL_2_8_FINALMarch 10, 2024
2.7REL_2_7_FINALAugust 1, 2021
2.6.11 (bugfix)REL_2_6_11_FINALJanuary 5, 2020
2.6.10 (intermediate)REL_2_6_10_FINALDecember 1, 2019
2.6.9 (intermediate)REL_2_6_9_FINALApril 9, 2017
2.6.8 (intermediate)REL_2_6_8_FINALMay 3, 2015
2.6.7 (intermediate)REL_2_6_7_FINALNovember 2, 2014
2.6.6 (bugfix)REL_2_6_6_FINALJune 15, 2014
2.6.5 (intermediate)REL_2_6_5_FINALJune 1, 2014
2.6.2 (bugfix)REL_2_6_2_FINALMay 26, 2013
2.6.1 (intermediate)REL_2_6_1_FINALApril 7, 2013
2.6REL_2_6_FINALSeptember 2, 2012
2.5.1 (bugfix)REL_2_5_1_FINALJanuary 6, 2012
2.5REL_2_5_FINALNovember 27, 2011
2.4.6REL_2_4_6_FINALFebruary 22, 2011
2.4.5REL_2_4_5_FINALApril 25, 2010
2.4.2REL_2_4_2_FINALNovember 12, 2009
2.4.1REL_2_4_1_FINALJune 7, 2009
2.4REL_2_4_FINALMay 3, 2009
2.3.7REL_2_3_7_FINALJune 3, 2008
2.3.6REL_2_3_6_FINALDecember 24, 2007
2.3.5REL_2_3_5_FINALSeptember 16, 2007
2.3REL_2_3_FINALAugust 27, 2006
2.2.6 (intermediate2)REL_2_2_6_FINALJanuary 29, 2005
2.2.5 (intermediate1)REL_2_2_5_FINALDecember 30, 2005
2.2.1 (bugfix1)REL_2_2_1_FINALJuly 8, 2005
2.2REL_2_2_FINALMay 28, 2005
2.1.1 (bugfix1)REL_2_1_1_FINALFebruary 8, 2004
2.1REL_2_1_FINALJanuary 9, 2004
2.0.2 (bugfix2)REL_2_0_2_FINALJanuary 21, 2003
2.0.1 (bugfix1)REL_2_0_1_FINALJanuary 4, 2003
2.0REL_2_0_FINALDecember 21, 2002
1.4.1 (bugfix1)REL_1_4_1_FINALJune 22, 2002
1.4REL_1_4_FINALMarch 27, 2002
1.3REL_1_3_FINALDecember 10, 2001
1.2.1 (bugfix1)REL_1_2_1_FINALJune 12, 2001
1.2REL_1_2_FINALJune 3, 2001
1.1.2 (bugfix3)REL_1_1_2_BASEMay 16, 2001
1.1.1 (bugfix2)REL_1_1_1_BASEApril 9, 2001
1.1 (bugfix1)REL_1_1_BASEApril 6, 2001
1.0 (bochs-2000_0325a)REL-bochs-2000-03-25March 25, 2000

3.2.4. More about GIT and GitHub

The official GIT documentation can be found at https://git-scm.com/doc and the official GitHub docs are located at https://docs.github.com/en.

Notes

[1]

You can download GIT software and documentation from git-scm.com.

[2]

Cygwin is an open source Unix-like environment for Windows platforms, available at www.cygwin.com.