From 85770b23bbcc188d24e8caaaaeeb5fc3786d4b78 Mon Sep 17 00:00:00 2001 From: Ronald Chan Date: Wed, 20 Nov 2013 19:55:09 +1300 Subject: [PATCH] add CONFIG_BOX_KERNEL_AUTO command so changing default.cfg manually is not needed on 32-bit kernels --- configure | 7 +++++++ default.cfg | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/configure b/configure index f2a192c..f7bd482 100755 --- a/configure +++ b/configure @@ -45,5 +45,12 @@ if (Get("CONFIG_SUBMIT")) { } } +if (Get("CONFIG_BOX_KERNEL_AUTO")) { + # Auto-detect 64-bit kernel + if (Get("ARCH") eq "amd64") { + Set("CONFIG_BOX_KERNEL_AMD64" => 1); + } +} + Finish(); Log "\nConfigured, run `make' to build everything.\n"; diff --git a/default.cfg b/default.cfg index 259b391..0cb704b 100644 --- a/default.cfg +++ b/default.cfg @@ -10,7 +10,8 @@ # If you are running a 64-bit Linux kernel, you need to build a 64-bit # sandbox and decide whether your userspace is 32- or 64-bit. -Set("CONFIG_BOX_KERNEL_AMD64" => 1); +Set("CONFIG_BOX_KERNEL_AUTO" => 1); # auto-detect AMD64 +#Set("CONFIG_BOX_KERNEL_AMD64" => 1); #Set("CONFIG_BOX_USER_AMD64" => 1); ### Hard-coded configuration parameters of the process isolator ###