diff options
author | Javier Ferrer <javi.f.o@gmail.com> | 2013-05-03 11:27:46 +0200 |
---|---|---|
committer | Javier Ferrer <javi.f.o@gmail.com> | 2013-05-03 11:27:46 +0200 |
commit | ba399555f3a6ba80c3814ed90bb2b01272bea810 (patch) | |
tree | 2c380bda461de2b13c3d0f06f94f3270ffce5834 | |
parent | c421809918b7106b40a81134f9fb5103146fc715 (diff) | |
download | kernel_samsung_smdk4412-ba399555f3a6ba80c3814ed90bb2b01272bea810.zip kernel_samsung_smdk4412-ba399555f3a6ba80c3814ed90bb2b01272bea810.tar.gz kernel_samsung_smdk4412-ba399555f3a6ba80c3814ed90bb2b01272bea810.tar.bz2 |
Correct md5sum executable on OSX hosts
On OSX hosts the md5sum executable is called md5 instead.
Change-Id: I0b8e3ab137136be6e45fd4b9f77f2c036e8b981a
-rw-r--r-- | arch/arm/mvp/mvpkm/Kbuild | 10 | ||||
-rw-r--r-- | arch/arm/mvp/mvpkm/lowmemkiller_variant.sh | 11 |
2 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mvp/mvpkm/Kbuild b/arch/arm/mvp/mvpkm/Kbuild index fc2fe96..7b2dc10 100644 --- a/arch/arm/mvp/mvpkm/Kbuild +++ b/arch/arm/mvp/mvpkm/Kbuild @@ -10,11 +10,19 @@ ccflags-$(CONFIG_VMWARE_MVP_DEBUG) += -DMVP_DEBUG asflags-y += -mfpu=neon -DLIB_ARM_VERSION=7 -DIN_MODULE -DGPLED_CODE asflags-y += -mfloat-abi=softfp +# Detect MD5SUM executable +HOST_OS := $(shell uname -s) +ifeq ($(HOST_OS),Darwin) + MD5SUM_EXEC := md5 +else + MD5SUM_EXEC := md5sum +endif + LOWMEMKILLER_PATH := $(srctree)/drivers/staging/android/lowmemorykiller.c ifeq ($(wildcard $(LOWMEMKILLER_PATH)),) $(error "Unable to find lowmemorykiller.c at $(LOWMEMKILLER_PATH)") endif -LOWMEMKILLER_MD5 := $(shell md5sum $(LOWMEMKILLER_PATH) | cut -f1 -d\ ) +LOWMEMKILLER_MD5 := $(shell $(MD5SUM_EXEC) $(LOWMEMKILLER_PATH) | cut -f1 -d\ ) LOWMEMKILLER_SUPPORT := $(srctree)/arch/arm/mvp/mvpkm/lowmemkiller_variant.sh LOWMEMKILLER_SHRINK_MD5 := $(shell $(SHELL) $(LOWMEMKILLER_SUPPORT) $(LOWMEMKILLER_PATH) | cut -f1 -d\ ) LOWMEMKILLER_VARIANT := $(shell $(SHELL) $(LOWMEMKILLER_SUPPORT) $(LOWMEMKILLER_PATH) | cut -f2 -d\ ) diff --git a/arch/arm/mvp/mvpkm/lowmemkiller_variant.sh b/arch/arm/mvp/mvpkm/lowmemkiller_variant.sh index 2c9ab50..0aab932 100644 --- a/arch/arm/mvp/mvpkm/lowmemkiller_variant.sh +++ b/arch/arm/mvp/mvpkm/lowmemkiller_variant.sh @@ -41,7 +41,16 @@ sed -i -e 's/.*\(intother_file.*other_file<\).*/;\1/' \ -e 's/[;][^;]*other_file[^;]*/#<#&#>#/g' \ -e 's/#>#[^#]*//g' $tmp_file -MD5=`md5sum $tmp_file | cut -f1 -d\ ` +# Detect MD5SUM executable +HOST_OS=`uname -s` +if [ "$HOST_OS" == "Darwin" ] +then + MD5SUM_EXEC=md5 +else + MD5SUM_EXEC=md5sum +fi + +MD5=`${MD5SUM_EXEC} $tmp_file | cut -f1 -d\ ` rm $tmp_file |