mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 22:51:03 +02:00
current mkimage are build in u-boot package and copied to sys-root ( a x86 binary).
move mkimage to hard-host-depends and remove dependency from u-boot to kernel. this will make use of mkimage on target possible in the future. Review URL: http://codereview.chromium.org/1613008
This commit is contained in:
parent
a81df76a06
commit
96e2b09b24
@ -21,8 +21,6 @@ DEFINE_string arch "" \
|
|||||||
"The target architecture (\"arm\" or \"x86\")."
|
"The target architecture (\"arm\" or \"x86\")."
|
||||||
DEFINE_string board "$DEFAULT_BOARD" \
|
DEFINE_string board "$DEFAULT_BOARD" \
|
||||||
"The board to build an image for."
|
"The board to build an image for."
|
||||||
DEFINE_string board_root "" \
|
|
||||||
"The build directory, needed to find tools for ARM."
|
|
||||||
|
|
||||||
# Usage.
|
# Usage.
|
||||||
FLAGS_HELP=$(cat <<EOF
|
FLAGS_HELP=$(cat <<EOF
|
||||||
@ -70,10 +68,6 @@ else
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$FLAGS_board_root" ]]; then
|
|
||||||
FLAGS_board_root="/build/${FLAGS_board}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Only now can we die on error. shflags functions leak non-zero error codes,
|
# Only now can we die on error. shflags functions leak non-zero error codes,
|
||||||
# so will die prematurely if 'set -e' is specified before now.
|
# so will die prematurely if 'set -e' is specified before now.
|
||||||
set -e
|
set -e
|
||||||
@ -130,7 +124,7 @@ if [[ "$ARCH" = "arm" ]]; then
|
|||||||
"setenv bootargs ${BOOTARGS}\n" \
|
"setenv bootargs ${BOOTARGS}\n" \
|
||||||
"mmc read 1 C0008000 $KERNEL_OFFSET $KERNEL_SECS_HEX\n" \
|
"mmc read 1 C0008000 $KERNEL_OFFSET $KERNEL_SECS_HEX\n" \
|
||||||
"bootm C0008000" > ${MBR_SCRIPT}
|
"bootm C0008000" > ${MBR_SCRIPT}
|
||||||
MKIMAGE="${FLAGS_board_root}/u-boot/mkimage"
|
MKIMAGE="/usr/bin/mkimage"
|
||||||
if [[ -f "$MKIMAGE".gz ]]; then
|
if [[ -f "$MKIMAGE".gz ]]; then
|
||||||
sudo gunzip "$MKIMAGE".gz
|
sudo gunzip "$MKIMAGE".gz
|
||||||
fi
|
fi
|
||||||
|
@ -422,8 +422,7 @@ cleanup
|
|||||||
|
|
||||||
# Create the GPT-formatted image
|
# Create the GPT-formatted image
|
||||||
${SCRIPTS_DIR}/build_gpt.sh \
|
${SCRIPTS_DIR}/build_gpt.sh \
|
||||||
--arch=${ARCH} --board=${FLAGS_board} --board_root=${BOARD_ROOT} \
|
--arch=${ARCH} --board=${FLAGS_board} "${OUTPUT_DIR}" "${OUTPUT_IMG}"
|
||||||
"${OUTPUT_DIR}" "${OUTPUT_IMG}"
|
|
||||||
|
|
||||||
# Clean up temporary files.
|
# Clean up temporary files.
|
||||||
rm -f "${ROOT_FS_IMG}" "${STATEFUL_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \
|
rm -f "${ROOT_FS_IMG}" "${STATEFUL_IMG}" "${OUTPUT_DIR}/vmlinuz.image" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user