make_netboot: Revise to work with Depthcharge.

The '' was designed for U-Boot, but all active projects
today are all using depthcharge. So, it should be safe to deprecate the
U-Boot logic:

 - The firmware name should be (Depthcharge) instead of
   nv_image*.bin (U-Boot style)
 - The copied kernel should be named as "vmlinuz", by Depthcharge's
   default configuration.

TEST=./ --board gale;
     boot vmlinuz image.

Change-Id: I7a98045873030ae3c7ff53b158b02f9d024f655e
Commit-Ready: Hung-Te Lin <>
Tested-by: Hung-Te Lin <>
Reviewed-by: Wei-Han Chen <>
diff --git a/ b/
index 63f6420..c7734fe 100755
--- a/
+++ b/
@@ -43,16 +43,12 @@
 mkdir -p netboot
 # Get netboot firmware.
-# TODO(nsanders): Set default IP here when userspace
-# env modification is available.
-# TODO(nsanders): ARM generic doesn't build chromeos-u-boot package.
-# When ARM generic goes away, delete the test.
-if ls "${SYSROOT}"/firmware/nv_image-*.bin >/dev/null 2>&1; then
-    echo "Copying netboot firmware nv_image-*.bin"
-    cp -v "${SYSROOT}"/firmware/nv_image-*.bin "netboot"
+if [ -f "${SYSROOT}${FIRMWARE_PATH}" ]; then
+  echo "Copying netboot firmware ${FIRMWARE_PATH}..."
+  cp -v "${SYSROOT}${FIRMWARE_PATH}" netboot/
-    echo "Skipping netboot firmware: " \
-        "${SYSROOT}/firmware/nv_image-*.bin not present?"
+  echo "Skipping netboot firmware: ${SYSROOT}${FIRMWARE_PATH} not present?"
 # Create temporary emerge root
@@ -69,17 +65,12 @@
 emerge_custom_kernel ${temp_build_path}
 # Place kernel image under 'netboot'
-echo "Generating netboot kernel vmlinux.uimg/vmlinux.bin"
-if [ "${ARCH}" = "arm" ]; then
-  cp "${temp_build_path}"/boot/vmlinux.uimg netboot/
-  cp netboot/vmlinux.uimg netboot/vmlinux.bin
+if [ -f "${temp_build_path}${KERNEL_PATH}" ]; then
+  echo "Generating netboot kernel ${KERNEL_PATH}"
+  cp -v "${temp_build_path}${KERNEL_PATH}" netboot/
-  # U-boot put kernel image at 0x100000. We load it at 0x3000000 because
-  # 0x3000000 is safe enough not to overlap with image at 0x100000.
-  mkimage -A x86 -O linux -T kernel -n "Linux kernel" -C none \
-      -d "${temp_build_path}"/boot/vmlinuz \
-      -a 0x03000000 -e 0x03000000 netboot/vmlinux.uimg
-  cp "${temp_build_path}"/boot/vmlinuz netboot/vmlinux.bin
+  echo "No ${KERNEL_PATH} found in your board."
 sudo rm -rf "${temp_build_path}"