Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: src/scripts/build_kernel.sh

Issue 549135: kernel: Use the debian infrastructure to construct kernel config files (Closed)
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/build_kernel.sh
diff --git a/src/scripts/build_kernel.sh b/src/scripts/build_kernel.sh
index 4efa4667b1534d1f050e1333fd7a701205c6d19d..0c451ed83219e89308fba0ed784a3dcb647f3472 100755
--- a/src/scripts/build_kernel.sh
+++ b/src/scripts/build_kernel.sh
@@ -19,12 +19,12 @@ SRC_ROOT=$(dirname $(readlink -f $(dirname "$0")))
. "${SRC_ROOT}/third_party/shflags/files/src/shflags"
KERNEL_DIR="$SRC_ROOT/third_party/kernel"
-DEFAULT_KCONFIG="${KERNEL_DIR}/files/chromeos/config/chromeos-intel-menlow"
+DEFAULT_KFLAVOUR="chromeos-intel-menlow"
# Flags
DEFAULT_BUILD_ROOT=${BUILD_ROOT:-"${SRC_ROOT}/build"}
-DEFINE_string config "${DEFAULT_KCONFIG}" \
- "The kernel configuration file to use."
+DEFINE_string flavour "${DEFAULT_KFLAVOUR}" \
+ "The kernel flavour to use."
DEFINE_integer revision 002 \
"The package revision to use"
DEFINE_string output_root "${DEFAULT_BUILD_ROOT}/x86/local_packages" \
@@ -49,12 +49,19 @@ mkdir -p "$FLAGS_output_root"
# to /tmp/kernel-pkg.conf when setting up the chroot env?
sudo cp "$KERNEL_DIR"/package/kernel-pkg.conf /etc/kernel-pkg.conf
+#
+# Generate the flavour config file.
+#
+flavour=$FLAGS_flavour
+(cd ${KERNEL_DIR}/files; debian/rules prepare-${flavour})
+
# Parse kernel config file for target architecture information. This is needed
# to determine the full package name and also to setup the environment for
# kernel build scripts which use "uname -m" to autodetect architecture.
-KCONFIG="$FLAGS_config"
+KCONFIG="${KERNEL_DIR}/files/debian/build/build-${flavour}/.config"
if [ ! -f "$KCONFIG" ]; then
- KCONFIG="$KERNEL_DIR"/files/chromeos/config/"$KCONFIG"
+ echo Major bummer. Could not find kernel config.
+ exit 1
fi
if [ -n $(grep 'CONFIG_X86=y' "$KCONFIG") ]
then
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698