resources: Merge branch 'stable' into 'develop'

Change-Id: Ib9f0fdc15ff4e5e73af2e6e3ccc9c3405d0a9205
diff --git a/src/gapbs/README.md b/src/gapbs/README.md
index 3994046..c8d34a3 100644
--- a/src/gapbs/README.md
+++ b/src/gapbs/README.md
@@ -28,10 +28,7 @@
 
 ```sh
 cd disk-image/
-wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip   # (if packer is not already installed)
-unzip packer_1.6.0_linux_amd64.zip # (if packer is not already installed)
-./packer validate gapbs/gapbs.json
-./packer build gapbs/gapbs.json
+./build.sh          # the script downloading packer binary and building the disk image
 ```
 
 After this process succeeds, the disk image can be found on the `src/gapbs/disk-image/gapbs-image/gapbs`.
@@ -55,7 +52,7 @@
 * The system has 3 GB `SingleChannelDDR4_2400` memory.
 * The script uses `x86-linux-kernel-4.19.83` and `x86-gapbs`, the disk image created from following the instructions in this `README.md`.
 
-The example script must be run with the `X86_MESI_Two_Level` binary. To build:
+The example script must be run with the `X86` binary. To build:
 
 ```sh
 git clone https://gem5.googlesource.com/public/gem5
diff --git a/src/gapbs/disk-image/build.sh b/src/gapbs/disk-image/build.sh
new file mode 100755
index 0000000..77cb63e
--- /dev/null
+++ b/src/gapbs/disk-image/build.sh
@@ -0,0 +1,10 @@
+PACKER_VERSION="1.7.8"
+
+if [ ! -f ./packer ]; then
+    wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip;
+    unzip packer_${PACKER_VERSION}_linux_amd64.zip;
+    rm packer_${PACKER_VERSION}_linux_amd64.zip;
+fi
+
+./packer validate gapbs/gapbs.json
+./packer build gapbs/gapbs.json
diff --git a/src/hack-back/README.md b/src/hack-back/README.md
index 0e8aaed..65ca7fa 100644
--- a/src/hack-back/README.md
+++ b/src/hack-back/README.md
@@ -24,6 +24,7 @@
   |___ gem5/                                # gem5 source code
   |
   |___ disk-image/
+  |      |___ build.sh                      # The script downloading packer binary and building the disk image
   |      |___ shared/                       # Auxiliary files needed for disk creation
   |      |___ hack-back/
   |            |___ hack-back-image/        # Will be created once the disk is generated
@@ -50,14 +51,7 @@
 
 ```sh
 cd disk-image
-# if packer is not already installed
-wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
-unzip packer_1.6.0_linux_amd64.zip
-
-# validate the packer script
-./packer validate hack-back/hack-back.json
-# build the disk image
-./packer build hack-back/hack-back.json
+./build.sh
 ```
 
 Once this process succeeds, the created disk image can be found on `hack-back/hack-back-image/hack-back`.
diff --git a/src/hack-back/disk-image/build.sh b/src/hack-back/disk-image/build.sh
new file mode 100755
index 0000000..6e6f011
--- /dev/null
+++ b/src/hack-back/disk-image/build.sh
@@ -0,0 +1,10 @@
+PACKER_VERSION="1.7.8"
+
+if [ ! -f ./packer ]; then
+    wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip;
+    unzip packer_${PACKER_VERSION}_linux_amd64.zip;
+    rm packer_${PACKER_VERSION}_linux_amd64.zip;
+fi
+
+./packer validate hack-back/hack-back.json
+./packer build hack-back/hack-back.json
diff --git a/src/npb/README.md b/src/npb/README.md
index 269ffd3..0ef8530 100644
--- a/src/npb/README.md
+++ b/src/npb/README.md
@@ -38,6 +38,7 @@
   |___ gem5/                               # gem5 source code
   |
   |___ disk-image/
+  |      |___ build.sh                     # The script downloading packer binary and building the disk image
   |      |___ shared/                      # Auxiliary files needed for disk creation
   |      |___ npb/
   |            |___ npb-image/             # Will be created once the disk is generated
@@ -67,14 +68,7 @@
 
 ```sh
 cd disk-image
-# if packer is not already installed
-wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
-unzip packer_1.6.0_linux_amd64.zip
-
-# validate the packer script
-./packer validate npb/npb.json
-# build the disk image
-./packer build npb/npb.json
+./build.sh          # the script downloading packer binary and building the disk image
 ```
 
 Once this process succeeds, the created disk image can be found on `npb/npb-image/npb`.
diff --git a/src/npb/disk-image/build.sh b/src/npb/disk-image/build.sh
new file mode 100755
index 0000000..4ba51d4
--- /dev/null
+++ b/src/npb/disk-image/build.sh
@@ -0,0 +1,10 @@
+PACKER_VERSION="1.7.8"
+
+if [ ! -f ./packer ]; then
+    wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip;
+    unzip packer_${PACKER_VERSION}_linux_amd64.zip;
+    rm packer_${PACKER_VERSION}_linux_amd64.zip;
+fi
+
+./packer validate npb/npb.json
+./packer build npb/npb.json
diff --git a/src/parsec/README.md b/src/parsec/README.md
index 1bbbd71..801471d 100644
--- a/src/parsec/README.md
+++ b/src/parsec/README.md
@@ -20,6 +20,7 @@
   |___ gem5/                                   # gem5 folder
   |
   |___ disk-image/
+  |      |___ build.sh                         # the script downloading packer binary and building the disk image
   |      |___ shared/
   |      |___ parsec/
   |             |___ parsec-image/
@@ -46,8 +47,7 @@
 
 ```sh
 cd disk-image
-wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
-unzip packer_1.6.0_linux_amd64.zip
+./build.sh          # the script downloading packer binary and building the disk image
 ```
 
 In order to build the disk-image first the script needs to be validated. Run the following command to validate `disk-image/parsec/parsec.json`.
diff --git a/src/parsec/disk-image/build.sh b/src/parsec/disk-image/build.sh
new file mode 100755
index 0000000..df8f6a3
--- /dev/null
+++ b/src/parsec/disk-image/build.sh
@@ -0,0 +1,10 @@
+PACKER_VERSION="1.7.8"
+
+if [ ! -f ./packer ]; then
+    wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip;
+    unzip packer_${PACKER_VERSION}_linux_amd64.zip;
+    rm packer_${PACKER_VERSION}_linux_amd64.zip;
+fi
+
+./packer validate parsec/parsec.json
+./packer build parsec/parsec.json
diff --git a/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/libs/ssl/src/doc/ssleay.txt b/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/libs/ssl/src/doc/ssleay.txt
index c753129..78670d9 100644
--- a/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/libs/ssl/src/doc/ssleay.txt
+++ b/src/parsec/disk-image/parsec/parsec-benchmark/pkgs/libs/ssl/src/doc/ssleay.txt
@@ -1210,7 +1210,7 @@
 The following is the list of standard commands passed as the 
 second parameter to BIO_ctrl() and should be supported by 
 all BIO as best as possible.  Some are optional, some are 
-manditory, in any case, where is makes sense, a filter BIO 
+mandatory, in any case, where is makes sense, a filter BIO 
 should pass such requests to underlying BIO's.
 -	BIO_CTRL_RESET	- Reset the BIO back to an initial state.
 -	BIO_CTRL_EOF	- return 0 if we are not at the end of input, 
diff --git a/src/spec-2006/README.md b/src/spec-2006/README.md
index 7393434..2444dd8 100644
--- a/src/spec-2006/README.md
+++ b/src/spec-2006/README.md
@@ -31,6 +31,7 @@
   |___ gem5/                                   # gem5 folder
   |
   |___ disk-image/
+  |      |___ build.sh                         # the script downloading packer binary and building the disk image
   |      |___ shared/
   |      |___ spec-2006/
   |             |___ spec-2006-image/
@@ -58,10 +59,7 @@
 
 ```sh
 cd disk-image
-wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip #(download the packer binary)
-unzip packer_1.6.0_linux_amd64.zip
-./packer validate spec-2006/spec-2006.json #validate the Packer script
-./packer build spec-2006/spec-2006.json
+./build.sh          # the script downloading packer binary and building the disk image
 ```
 
 ## Simulating SPEC CPU2006 using an example script
diff --git a/src/spec-2006/disk-image/build.sh b/src/spec-2006/disk-image/build.sh
new file mode 100755
index 0000000..efdc3f6
--- /dev/null
+++ b/src/spec-2006/disk-image/build.sh
@@ -0,0 +1,10 @@
+PACKER_VERSION="1.7.8"
+
+if [ ! -f ./packer ]; then
+    wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip;
+    unzip packer_${PACKER_VERSION}_linux_amd64.zip;
+    rm packer_${PACKER_VERSION}_linux_amd64.zip;
+fi
+
+./packer validate spec-2006/spec-2006.json
+./packer build spec-2006/spec-2006.json
diff --git a/src/spec-2017/README.md b/src/spec-2017/README.md
index ed579e2..68f1a75 100644
--- a/src/spec-2017/README.md
+++ b/src/spec-2017/README.md
@@ -31,6 +31,7 @@
   |___ gem5/                                   # gem5 folder
   |
   |___ disk-image/
+  |      |___ build.sh                         # the script downloading packer binary and building the disk image
   |      |___ shared/
   |      |___ spec-2017/
   |             |___ spec-2017-image/
@@ -59,10 +60,7 @@
 
 ```sh
 cd disk-image
-wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip # download the packer binary
-unzip packer_1.6.0_linux_amd64.zip
-./packer validate spec-2017/spec-2017.json # validate the Packer script
-./packer build spec-2017/spec-2017.json
+./build.sh          # the script downloading packer binary and building the disk image
 ```
 
 ## Simulating SPEC CPU2017 using an example script
diff --git a/src/spec-2017/disk-image/build.sh b/src/spec-2017/disk-image/build.sh
new file mode 100755
index 0000000..9d35a90
--- /dev/null
+++ b/src/spec-2017/disk-image/build.sh
@@ -0,0 +1,10 @@
+PACKER_VERSION="1.7.8"
+
+if [ ! -f ./packer ]; then
+    wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip;
+    unzip packer_${PACKER_VERSION}_linux_amd64.zip;
+    rm packer_${PACKER_VERSION}_linux_amd64.zip;
+fi
+
+./packer validate spec-2017/spec-2017.json
+./packer build spec-2017/spec-2017.json
diff --git a/src/x86-ubuntu/README.md b/src/x86-ubuntu/README.md
index 7265038..d1f6f08 100644
--- a/src/x86-ubuntu/README.md
+++ b/src/x86-ubuntu/README.md
@@ -21,6 +21,7 @@
   |___ gem5/                                   # gem5 source code (to be cloned here)
   |
   |___ disk-image/
+  |      |___ build.sh                         # the script downloading packer binary and building the disk image
   |      |___ shared/                          # Auxiliary files needed for disk creation
   |      |___ x86-ubuntu/
   |            |___ x86-ubuntu-image/           # Will be created once the disk is generated
@@ -53,14 +54,7 @@
 
 ```sh
 cd disk-image
-# if packer (tool to build the disk) is not already installed
-wget https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
-unzip packer_1.6.0_linux_amd64.zip
-
-# validate the packer script
-./packer validate x86-ubuntu/x86-ubuntu.json
-# build the disk image
-./packer build x86-ubuntu/x86-ubuntu.json
+./build.sh          # the script downloading packer binary and building the disk image
 ```
 
 If you see errors or warnings from `packer validate` you can modify the file `disk-image/x86-ubuntu/x86-ubuntu.json` to update the file.
diff --git a/src/x86-ubuntu/disk-image/build.sh b/src/x86-ubuntu/disk-image/build.sh
new file mode 100755
index 0000000..e5e4978
--- /dev/null
+++ b/src/x86-ubuntu/disk-image/build.sh
@@ -0,0 +1,10 @@
+PACKER_VERSION="1.7.8"
+
+if [ ! -f ./packer ]; then
+    wget https://releases.hashicorp.com/packer/${PACKER_VERSION}/packer_${PACKER_VERSION}_linux_amd64.zip;
+    unzip packer_${PACKER_VERSION}_linux_amd64.zip;
+    rm packer_${PACKER_VERSION}_linux_amd64.zip;
+fi
+
+./packer validate boot-exit/boot-exit.json
+./packer build boot-exit/boot-exit.json