[coreboot] New patch to review for coreboot: 150f8ef No random directories

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Fri Jan 11 20:04:35 CET 2013


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2137

-gerrit

commit 150f8ef42e938571ba51a2617fbbc47cc2d46d21
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Fri Jan 11 11:02:58 2013 -0800

    No random directories
    
    Please, don't just add random directories for a single file because
    it seems convenient. There already is a chromeos directory, that should
    be used.
    
    Change-Id: I625292cac4cbffe31ff3e3d952b11cd82e4b151e
    Signed-off-by: Stefan Reinauer <reinauer at google.com>
---
 cros/build                           | 82 ------------------------------------
 src/vendorcode/google/chromeos/build | 82 ++++++++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 82 deletions(-)

diff --git a/cros/build b/cros/build
deleted file mode 100755
index 13f7d92..0000000
--- a/cros/build
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/sh
-
-SCRIPT="$0"
-SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
-
-OUTPUT="build/coreboot.rom"
-TMP_DIFF="$SCRIPT_DIR/.image-diff.bin"
-FLASHROM="/usr/local/sbin/flashrom"
-
-BL1_NAME="E5250.nbl1.bin"
-BL1_PATH="3rdparty/cpu/samsung/exynos5250/"
-BL1_URL="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/exynos-pre-boot-0.0.2-r8.tbz2"
-
-die() {
-  echo "$*" >&2
-  exit 1
-}
-
-create_diff_128k() {
-  local image_file="$1"
-  local diff_file="$2"
-  cp -f "$image_file" "$diff_file"
-  dd if=/dev/zero of=$diff_file bs=1 count=$((128*1024)) conv=notrunc
-}
-
-fast_flash_image() {
-  local image_file="$1"
-  local diff_file="$2"
-  dut-control spi2_buf_en:on spi2_buf_on_flex_en:on spi2_vref:pp1800
-  sudo ${FLASHROM} -p ft2232_spi:type=servo-v2,port=a -w "$image_file" -V \
-    --noverify --ignore-fmap --diff "$diff_file"
-  dut-control spi2_buf_en:off spi2_buf_on_flex_en:off spi2_vref:off
-}
-
-get_bl1() {
-  wget "${BL1_URL}" -O /tmp/bl1.tbz2
-  tar jxvf /tmp/bl1.tbz2
-  mkdir -p "${BL1_PATH}"
-  mv "exynos-pre-boot/firmware/${BL1_NAME}" "${BL1_PATH}"
-  rm -rf exynos-pre-boot
-  if [ ! -e "${BL1_PATH}/${BL1_NAME}" ]; then
-    echo "Error getting BL1"
-    exit 1
-  fi
-}
-
-merge_bl1() {
-  local outfile="$1"
-  local bl1="${BL1_PATH}/${BL1_NAME}"
-
-  if [ ! -e "$bl1" ]; then
-    get_bl1
-  fi
-
-  # use the new BL1 which supports 30KB BL2/SPL/Coreboot
-  local size="$(stat -c "%s" "$outfile")"
-  local bl1_size="$(stat -c "%s" "$bl1")"
-
-  [ "$bl1_size" = "$((0x2000))" ] || die "Incorrect BL1 input file."
-  dd if="$bl1" of=${outfile} conv=notrunc
-}
-
-is_servod_ready() {
-  ps -C servod >/dev/null 2>&1
-}
-
-main() {
-  make
-  merge_bl1 "$OUTPUT"
-  create_diff_128k "$OUTPUT" "$TMP_DIFF"
-  echo "OK: Generated image (with BL1) in $OUTPUT"
-  if is_servod_ready; then
-    echo "servod detected - flashing into device."
-    fast_flash_image "$OUTPUT" "$TMP_DIFF"
-    echo "OK: Generated and flashed 128k of image into device via servo."
-  else
-    echo "(servod is not running, flashing into device is skipped)"
-  fi
-}
-
-set -e
-main "$@"
diff --git a/src/vendorcode/google/chromeos/build b/src/vendorcode/google/chromeos/build
new file mode 100755
index 0000000..13f7d92
--- /dev/null
+++ b/src/vendorcode/google/chromeos/build
@@ -0,0 +1,82 @@
+#!/bin/sh
+
+SCRIPT="$0"
+SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
+
+OUTPUT="build/coreboot.rom"
+TMP_DIFF="$SCRIPT_DIR/.image-diff.bin"
+FLASHROM="/usr/local/sbin/flashrom"
+
+BL1_NAME="E5250.nbl1.bin"
+BL1_PATH="3rdparty/cpu/samsung/exynos5250/"
+BL1_URL="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/exynos-pre-boot-0.0.2-r8.tbz2"
+
+die() {
+  echo "$*" >&2
+  exit 1
+}
+
+create_diff_128k() {
+  local image_file="$1"
+  local diff_file="$2"
+  cp -f "$image_file" "$diff_file"
+  dd if=/dev/zero of=$diff_file bs=1 count=$((128*1024)) conv=notrunc
+}
+
+fast_flash_image() {
+  local image_file="$1"
+  local diff_file="$2"
+  dut-control spi2_buf_en:on spi2_buf_on_flex_en:on spi2_vref:pp1800
+  sudo ${FLASHROM} -p ft2232_spi:type=servo-v2,port=a -w "$image_file" -V \
+    --noverify --ignore-fmap --diff "$diff_file"
+  dut-control spi2_buf_en:off spi2_buf_on_flex_en:off spi2_vref:off
+}
+
+get_bl1() {
+  wget "${BL1_URL}" -O /tmp/bl1.tbz2
+  tar jxvf /tmp/bl1.tbz2
+  mkdir -p "${BL1_PATH}"
+  mv "exynos-pre-boot/firmware/${BL1_NAME}" "${BL1_PATH}"
+  rm -rf exynos-pre-boot
+  if [ ! -e "${BL1_PATH}/${BL1_NAME}" ]; then
+    echo "Error getting BL1"
+    exit 1
+  fi
+}
+
+merge_bl1() {
+  local outfile="$1"
+  local bl1="${BL1_PATH}/${BL1_NAME}"
+
+  if [ ! -e "$bl1" ]; then
+    get_bl1
+  fi
+
+  # use the new BL1 which supports 30KB BL2/SPL/Coreboot
+  local size="$(stat -c "%s" "$outfile")"
+  local bl1_size="$(stat -c "%s" "$bl1")"
+
+  [ "$bl1_size" = "$((0x2000))" ] || die "Incorrect BL1 input file."
+  dd if="$bl1" of=${outfile} conv=notrunc
+}
+
+is_servod_ready() {
+  ps -C servod >/dev/null 2>&1
+}
+
+main() {
+  make
+  merge_bl1 "$OUTPUT"
+  create_diff_128k "$OUTPUT" "$TMP_DIFF"
+  echo "OK: Generated image (with BL1) in $OUTPUT"
+  if is_servod_ready; then
+    echo "servod detected - flashing into device."
+    fast_flash_image "$OUTPUT" "$TMP_DIFF"
+    echo "OK: Generated and flashed 128k of image into device via servo."
+  else
+    echo "(servod is not running, flashing into device is skipped)"
+  fi
+}
+
+set -e
+main "$@"



More information about the coreboot mailing list