forked from Drive-Trust-Alliance/sedutil
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into drive_scan
- Loading branch information
Showing
25 changed files
with
300 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
scratch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM ubuntu:16.04 | ||
|
||
RUN dpkg --add-architecture i386 && apt update && apt install -y \ | ||
bc \ | ||
build-essential \ | ||
cpio \ | ||
dosfstools \ | ||
g++-multilib \ | ||
gdisk \ | ||
git-core \ | ||
libncurses5-dev \ | ||
libncurses5-dev:i386 \ | ||
python \ | ||
squashfs-tools \ | ||
sudo \ | ||
unzip \ | ||
wget \ | ||
locales \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN locale-gen en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
WORKDIR "/sedutil" | ||
|
||
CMD "/sedutil/images/autobuild.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Images | ||
|
||
## Docker | ||
|
||
Docker can be used as a repeatable build environment to build the images in an Ubuntu 16.04 container. Steps to reproduce from the `images` directory: | ||
|
||
|
||
### Step 1 - Build the Docker container | ||
|
||
docker build -t sedutil . | ||
|
||
### Step 2 - Run the build from within the Docker container | ||
|
||
Try the `autobuild.sh` script which runs automatically when no command is | ||
passed: | ||
|
||
docker run --rm -it -v $PWD/../:/sedutil --privileged sedutil | ||
|
||
Or, refer to `BUILDING` file and run manually in the Docker container by | ||
starting `bash`: | ||
|
||
docker run --rm -it -v $PWD/../:/sedutil --privileged sedutil bash | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
# Echo commands and abort on error | ||
set -ex | ||
|
||
# Optimal MAKEFLAGS argument if not already defined | ||
if [ -z ${MAKEFLAGS+x} ]; then | ||
# Add 1 assuming disk IO will block processes from time to time. | ||
export MAKEFLAGS=$((1 + $(grep processor /proc/cpuinfo | wc -l))) | ||
fi | ||
|
||
# Run everything from the path of this script despite how invoked | ||
cd "$( dirname "${BASH_SOURCE[0]}" )" | ||
|
||
source conf | ||
|
||
# Build buildroot before other tools as it provides the toolchain for linuxpba | ||
# and sedutil-cli. | ||
./getresources | ||
./buildpbaroot | ||
|
||
pushd ../LinuxPBA | ||
rm -rf dist build | ||
make CONF=Debug | ||
make CONF=Debug_x86_64 | ||
make CONF=Release | ||
make CONF=Release_x86_64 | ||
popd | ||
|
||
pushd ../linux/CLI | ||
rm -rf dist build | ||
make CONF=Debug_i686 | ||
make CONF=Debug_x86_64 | ||
make CONF=Release_i686 | ||
make CONF=Release_x86_64 | ||
popd | ||
|
||
# Build BIOS images (untested, probably subtly broken) | ||
#./buildbiospba Release | ||
#./buildbiospba Debug | ||
|
||
# Build UEFI images | ||
./buildUEFI64 Release | ||
./buildUEFI64 Debug | ||
|
||
# Rescue build | ||
./buildrescue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker build -t sedutil . | ||
docker run --rm -it -v $PWD/../:/sedutil --privileged sedutil $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
set -x | ||
set -ex | ||
## Get version information | ||
. conf | ||
## Make a clean start | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.