From 650f298804062131e1e633dc626642da62978dec Mon Sep 17 00:00:00 2001
From: Jens Wiklander <jens.wiklander@linaro.org>
Date: Wed, 5 Apr 2017 10:08:59 +0200
Subject: [PATCH] Slight change in EDK2 compiling

Slightly changes the way EDK2 is compiled by sourcing edksetup.sh
instead of just running it. When compiling EDK2 that script is supposed
to be sourced.

Also records a dependency to iasl in recend EDK2 builds

Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
---
 README.md | 10 +++++-----
 common.mk |  7 ++++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 718adcd..b922f77 100644
--- a/README.md
+++ b/README.md
@@ -119,11 +119,11 @@ target you will use in the end.
 ```bash
 $ sudo apt-get install android-tools-adb android-tools-fastboot autoconf \
 	automake bc bison build-essential cscope curl device-tree-compiler flex \
-	ftp-upload gdisk libattr1-dev libc6:i386 libcap-dev libfdt-dev libftdi-dev \
-	libglib2.0-dev libhidapi-dev libncurses5-dev libpixman-1-dev \
-	libssl-dev libstdc++6:i386 libtool libz1:i386 make mtools netcat \
-	python-crypto python-serial python-wand unzip uuid-dev xdg-utils \
-	xterm xz-utils zlib1g-dev
+	ftp-upload gdisk iasl libattr1-dev libc6:i386 libcap-dev libfdt-dev \
+	libftdi-dev libglib2.0-dev libhidapi-dev libncurses5-dev \
+	libpixman-1-dev libssl-dev libstdc++6:i386 libtool libz1:i386 make \
+	mtools netcat python-crypto python-serial python-wand unzip uuid-dev \
+	xdg-utils xterm xz-utils zlib1g-dev
 ```
 
 ## 7.2 Install Android repo
diff --git a/common.mk b/common.mk
index 4f43185..8d08228 100644
--- a/common.mk
+++ b/common.mk
@@ -2,6 +2,7 @@
 # Common definition to all platforms
 #
 
+SHELL := bash
 BASH ?= bash
 ROOT ?= $(shell pwd)/..
 
@@ -175,15 +176,15 @@ linux-cleaner-common: linux-defconfig-clean
 # Make sure edksetup.sh only will be called once and that we don't rebuild
 # BaseTools again and again.
 $(EDK2_PATH)/Conf/target.txt:
-	set -e && cd $(EDK2_PATH) && $(BASH) edksetup.sh && \
+	set -e && cd $(EDK2_PATH) && source edksetup.sh && \
 	$(MAKE) -j1 -C $(EDK2_PATH)/BaseTools
 
 edk2-common: $(EDK2_PATH)/Conf/target.txt
-	set -e && cd $(EDK2_PATH) && $(BASH) edksetup.sh && \
+	set -e && cd $(EDK2_PATH) && source edksetup.sh && \
 	$(call edk2-call)
 
 edk2-clean-common:
-	set -e && cd $(EDK2_PATH) && $(BASH) edksetup.sh && \
+	set -e && cd $(EDK2_PATH) && source edksetup.sh && \
 	$(call edk2-call) clean && \
 	$(MAKE) -j1 -C $(EDK2_PATH)/BaseTools clean && \
 	rm -f $(EDK2_PATH)/Conf/target.txt
-- 
GitLab