From: Seung-Woo Kim Date: Mon, 23 Apr 2018 05:09:02 +0000 (+0900) Subject: script: Make the get_default_envs.sh script working with cross compile X-Git-Tag: submit/tizen/20180510.044512~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cb63a881f73cd7ebbf26e47d600da0a6d7aa4eb0;p=platform%2Fkernel%2Fu-boot.git script: Make the get_default_envs.sh script working with cross compile To support cross compile, partilly pick from mainline commit. Base commit: 0778e7c50ba1 ("script: Make the get_default_envs.sh script working with newest u-boot") Change-Id: I35d89cd30eafe83de648aec48e2698396bfaf3dc Signed-off-by: Seung-Woo Kim --- diff --git a/scripts/get_default_envs.sh b/scripts/get_default_envs.sh index 7955db60e5..22848de1dd 100755 --- a/scripts/get_default_envs.sh +++ b/scripts/get_default_envs.sh @@ -9,6 +9,8 @@ # usage: get_default_envs.sh > u-boot-env-default.txt set -ue +: "${OBJCOPY:=${CROSS_COMPILE:-}objcopy}" + ENV_OBJ_FILE="env_common.o" ENV_OBJ_FILE_COPY="copy_${ENV_OBJ_FILE}" @@ -24,7 +26,7 @@ cp ${env_obj_file_path} ${ENV_OBJ_FILE_COPY} # NOTE: objcopy saves its output to file passed in # (copy_env_common.o in this case) -objcopy -O binary -j ".rodata.default_environment" ${ENV_OBJ_FILE_COPY} +${OBJCOPY} -O binary -j ".rodata.default_environment" ${ENV_OBJ_FILE_COPY} # Replace default '\0' with '\n' and sort entries tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sort -u