[LEDE-DEV] [RFC 2/2] Add script to build common platforms.

greearb at candelatech.com greearb at candelatech.com
Thu May 26 14:20:48 PDT 2016


From: Ben Greear <greearb at candelatech.com>

The idea is to be able to allow newbies to easily build images
for common hardware.  These images should be user-friendly, including
luci and other tools that may aid debugging and use of the platform.

Signed-off-by: Ben Greear <greearb at candelatech.com>
---
 buildme.sh                            | 63 +++++++++++++++++++++++++++++++++++
 buildme_targets/x86_64/diffconfig.txt | 23 +++++++++++++
 2 files changed, 86 insertions(+)
 create mode 100755 buildme.sh
 create mode 100644 buildme_targets/x86_64/diffconfig.txt

diff --git a/buildme.sh b/buildme.sh
new file mode 100755
index 0000000..8a5833e
--- /dev/null
+++ b/buildme.sh
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+
+USAGE=$( cat <<EOF
+Usage:\n
+# -t:  Target\n
+# -l:  List available targets.\n
+# -h:  Show help and exit\n
+#\n
+#\n
+# Example:  Build an image for x86_64
+#  ./buildme.sh -t x86_64\n
+EOF
+)
+
+BMT=buildme_targets
+TARGET=UNKNOWN
+LIST_TARGETS=0
+
+while getopts "t:lh" flag
+  do
+  case $flag in
+      t) TARGET=$OPTARG;;
+      l) LIST_TARGETS=1;;
+      h) echo -e USAGE && exit 0;;
+
+      *) echo "Un-known option: $flag"; echo -e $USAGE;exit 1;;
+  esac
+done
+
+if [ $LIST_TARGETS == 1 ]
+then
+    ls $BMT
+    exit 0
+fi
+
+echo "Target dir: $BMT/$TARGET"
+
+if [ ! -d $BMT/$TARGET ]
+then
+    echo "ERROR:  Unknown target, try -l option?"
+    exit 1;
+fi
+
+set -x
+
+# Update feeds
+./scripts/feeds update -a || exit 1
+
+# Enable luci web interface
+./scripts/feeds install -d y luci || exit 1
+
+# Enable ethtool for driver info and stats and such
+./scripts/feeds install -d y ethtool || exit 1
+
+# Copy default config into place
+cp $BMT/$TARGET/diffconfig.txt .config || exit 1
+
+# Build complate .config file based on whatever is latest, etc.
+make defconfig || exit 1
+
+# Build
+make v=S -j 8
+
diff --git a/buildme_targets/x86_64/diffconfig.txt b/buildme_targets/x86_64/diffconfig.txt
new file mode 100644
index 0000000..3bfc308
--- /dev/null
+++ b/buildme_targets/x86_64/diffconfig.txt
@@ -0,0 +1,23 @@
+CONFIG_TARGET_x86=y
+CONFIG_TARGET_x86_64=y
+CONFIG_TARGET_x86_64_Generic=y
+CONFIG_ALL_NONSHARED=y
+CONFIG_BUSYBOX_CUSTOM=y
+CONFIG_BUSYBOX_CONFIG_ARP=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE=y
+CONFIG_BUSYBOX_CONFIG_LSPCI=y
+CONFIG_BUSYBOX_CONFIG_LSUSB=y
+CONFIG_BUSYBOX_CONFIG_MORE=y
+CONFIG_BUSYBOX_CONFIG_TELNET=y
+CONFIG_IMAGEOPT=y
+CONFIG_PACKAGE_hostapd-common-old=y
+CONFIG_PACKAGE_hostapd-utils=y
+CONFIG_PACKAGE_kmod-hwmon-core=y
+CONFIG_PACKAGE_kmod-libphy=y
+CONFIG_PACKAGE_kmod-skge=y
+CONFIG_PACKAGE_kmod-sky2=y
+CONFIG_PACKAGE_kmod-tg3=y
+# CONFIG_PER_FEED_REPO is not set
+CONFIG_TARGET_KERNEL_PARTSIZE=64
+CONFIG_TARGET_ROOTFS_PARTSIZE=1024
-- 
2.4.3




More information about the Lede-dev mailing list