Commit c08e7725 authored by Ryan Jackson's avatar Ryan Jackson

Lots of changes. Here are some of the significant ones:

- Cleanup of filesystem layout
- Some patches to make busybox's adduser and addgroup commands a bit more
  compatible with the standard useradd and groupadd commands
- Wrappers for ((user|group)(add|del))
- Getopt perl module added
- Working sudo setup
- Portmap added to support NFS mounts with locking.
- Syslog added, but not currently configured. Primarily intended for
  troubleshooting strange problems.
- Fixes to permissions
- rc.mounts, rc.localize, and rc.accounts work now.
parent 7e860d79
......@@ -9,7 +9,7 @@ STAGING_DIR = $(PWD)/buildroot/build_i386/staging_dir
INITRAMFS = $(PWD)/initramfs.gz
BOOT_PATH = $(PWD)/boot
MODULES := busybox zlib linux dropbear testbed hdparm target_template sudo e2fsprogs openssl wget perl
MODULES := busybox zlib linux dropbear testbed hdparm target_template sudo e2fsprogs openssl wget perl portmap
INSTALL_MODULES := $(addsuffix -install,$(MODULES))
EXTRACT_MODULES := $(addsuffix -extract,$(MODULES))
PATCH_MODULES := $(addsuffix -patch,$(MODULES))
......
......@@ -9,3 +9,8 @@ fi
chmod 1777 "$target_dir/tmp"
chmod 1777 "$target_dir/var/tmp"
chmod 0700 "$target_dir/root/.ssh"
chmod 0600 "$target_dir/etc/shadow"
chmod u+s "$target_dir/bin/busybox"
chmod u+s "$target_dir/usr/bin/sudo"
chmod 0440 "$target_dir/etc/sudoers"
diff -u -r busybox-1.13.1.orig/include/usage.h busybox-1.13.1/include/usage.h
--- busybox-1.13.1.orig/include/usage.h 2008-11-09 10:28:17.000000000 -0700
+++ busybox-1.13.1/include/usage.h 2008-12-30 17:30:33.000000000 -0700
@@ -29,8 +29,12 @@
#define adduser_full_usage "\n\n" \
"Add an user\n" \
"\nOptions:" \
- "\n -h DIR Home directory" \
- "\n -g GECOS GECOS field" \
+ "\n -d DIR Home directory" \
+ "\n -c GECOS GECOS field" \
+ "\n -g GID primary GID for user" \
+ "\n -u UID UID for user" \
+ "\n -p PASSWD encrypted user passwd" \
+ "\n -c GECOS GECOS field" \
"\n -s SHELL Login shell" \
"\n -G GROUP Add user to existing group" \
"\n -S Create a system user" \
diff -u -r busybox-1.13.1.orig/loginutils/addgroup.c busybox-1.13.1/loginutils/addgroup.c
--- busybox-1.13.1.orig/loginutils/addgroup.c 2008-11-09 10:28:17.000000000 -0700
+++ busybox-1.13.1/loginutils/addgroup.c 2008-12-30 17:30:53.000000000 -0700
@@ -158,9 +158,18 @@
/* check if group and user exist */
xuname2uid(argv[0]); /* unknown user: exit */
- xgroup2gid(argv[1]); /* unknown group: exit */
- /* check if user is already in this group */
gr = getgrnam(argv[1]);
+ if (!gr) {
+ gid = xatoul_range(argv[1], 0,
+ ((unsigned long)(gid_t)ULONG_MAX) >> 1);
+ gr = getgrgid(gid);
+ if (!gr)
+ xgroup2gid(argv[1]); /* unknown group: exit */
+ else
+ argv[1] = gr->gr_name;
+ }
+
+ /* check if user is already in this group */
for (; *(gr->gr_mem) != NULL; (gr->gr_mem)++) {
if (!strcmp(argv[0], *(gr->gr_mem))) {
/* user is already in group: do nothing */
diff -u -r busybox-1.13.1.orig/loginutils/adduser.c busybox-1.13.1/loginutils/adduser.c
--- busybox-1.13.1.orig/loginutils/adduser.c 2008-11-09 10:28:17.000000000 -0700
+++ busybox-1.13.1/loginutils/adduser.c 2008-12-30 17:30:44.000000000 -0700
@@ -10,10 +10,12 @@
#include "libbb.h"
-#define OPT_DONT_SET_PASS (1 << 4)
-#define OPT_SYSTEM_ACCOUNT (1 << 5)
-#define OPT_DONT_MAKE_HOME (1 << 6)
-
+#define OPT_DONT_SET_PASS (1 << 7)
+#define OPT_SYSTEM_ACCOUNT (1 << 8)
+#define OPT_DONT_MAKE_HOME (1 << 9)
+#define OPT_GID (1 << 2)
+#define OPT_UID (1 << 3)
+#define OPT_PASSWORD (1 << 4)
/* remix */
/* recoded such that the uid may be passed in *p */
@@ -24,36 +26,50 @@
if (getpwnam(p->pw_name))
bb_error_msg_and_die("login '%s' is in use", p->pw_name);
- if (option_mask32 & OPT_SYSTEM_ACCOUNT) {
- p->pw_uid = 0;
- max = 999;
+ if (option_mask32 & OPT_UID) {
+ if(getpwuid(p->pw_uid))
+ bb_error_msg_and_die("uid '%d' is in use", p->pw_uid);
+
} else {
- p->pw_uid = 1000;
- max = 64999;
- }
+ if (option_mask32 & OPT_SYSTEM_ACCOUNT) {
+ p->pw_uid = 0;
+ max = 999;
+ } else {
+ p->pw_uid = 1000;
+ max = 64999;
+ }
- /* check for a free uid (and maybe gid) */
- while (getpwuid(p->pw_uid) || (!p->pw_gid && getgrgid(p->pw_uid)))
- p->pw_uid++;
+ /* check for a free uid (and maybe gid) */
+ while (getpwuid(p->pw_uid) || (!p->pw_gid && getgrgid(p->pw_uid)))
+ p->pw_uid++;
- if (!p->pw_gid) {
+ if (p->pw_uid > max)
+ bb_error_msg_and_die("no free uids left");
+
+ }
+
+ if (!(option_mask32 & OPT_GID)) {
/* new gid = uid */
p->pw_gid = p->pw_uid;
if (getgrnam(p->pw_name))
bb_error_msg_and_die("group name '%s' is in use", p->pw_name);
}
- if (p->pw_uid > max)
- bb_error_msg_and_die("no free uids left");
}
-static void addgroup_wrapper(struct passwd *p)
+static void addgroup_wrapper(struct passwd *p, const char *usegroup)
{
char *cmd;
+ char *group;
+
+ group = strtok((char *)usegroup, ",");
- cmd = xasprintf("addgroup -g %u '%s'", (unsigned)p->pw_gid, p->pw_name);
- system(cmd);
- free(cmd);
+ while (group) {
+ cmd = xasprintf("addgroup '%s' '%s'", p->pw_name, group);
+ system(cmd);
+ free(cmd);
+ group = strtok(NULL, ",");
+ }
}
static void passwd_wrapper(const char *login) NORETURN;
@@ -68,8 +84,11 @@
#if ENABLE_FEATURE_ADDUSER_LONG_OPTIONS
static const char adduser_longopts[] ALIGN1 =
- "home\0" Required_argument "h"
- "gecos\0" Required_argument "g"
+ "home\0" Required_argument "d"
+ "comment\0" Required_argument "c"
+ "gid\0" Required_argument "g"
+ "uid\0" Required_argument "u"
+ "password\0" Required_argument "p"
"shell\0" Required_argument "s"
"ingroup\0" Required_argument "G"
"disabled-password\0" No_argument "D"
@@ -89,8 +108,13 @@
{
struct passwd pw;
const char *usegroup = NULL;
+ const char *uid_string = NULL;
+ const char *gid_string = NULL;
+ const char *password = NULL;
FILE *file;
+ memset(&pw, 0, sizeof(pw));
+
#if ENABLE_FEATURE_ADDUSER_LONG_OPTIONS
applet_long_options = adduser_longopts;
#endif
@@ -106,9 +130,26 @@
/* exactly one non-option arg */
opt_complementary = "=1";
- getopt32(argv, "h:g:s:G:DSH", &pw.pw_dir, &pw.pw_gecos, &pw.pw_shell, &usegroup);
+ getopt32(argv, "d:c:g:u:p:s:G:DSH", &pw.pw_dir, &pw.pw_gecos, &gid_string,
+ &uid_string, &password, &pw.pw_shell, &usegroup);
argv += optind;
+ if (uid_string)
+ pw.pw_uid = xatoul_range(uid_string, 0,
+ ((unsigned long)(uid_t)ULONG_MAX) >> 1);
+
+ if (gid_string)
+ pw.pw_gid = xatoul_range(gid_string, 0,
+ ((unsigned long)(gid_t)ULONG_MAX) >> 1);
+
+ if (password) {
+#if ENABLE_FEATURE_SHADOWPASSWDS
+ pw.pw_passwd = "x";
+#else
+ pw.pw_passwd = password;
+#endif
+ }
+
/* fill in the passwd struct */
pw.pw_name = argv[0];
die_if_bad_username(pw.pw_name);
@@ -116,9 +157,6 @@
/* create string for $HOME if not specified already */
pw.pw_dir = xasprintf("/home/%s", argv[0]);
}
- pw.pw_passwd = (char *)"x";
- pw.pw_gid = usegroup ? xgroup2gid(usegroup) : 0; /* exits on failure */
-
/* make sure everything is kosher and setup uid && maybe gid */
passwd_study(&pw);
@@ -137,8 +175,9 @@
file = fopen_or_warn(bb_path_shadow_file, "a");
if (file) {
//fseek(file, 0, SEEK_END);
- fprintf(file, "%s:!:%u:0:99999:7:::\n",
+ fprintf(file, "%s:%s:%u:0:99999:7:::\n",
pw.pw_name, /* username */
+ password ? password : "!",
(unsigned)(time(NULL) / 86400) /* sp->sp_lstchg */
/*0,*/ /* sp->sp_min */
/*99999,*/ /* sp->sp_max */
@@ -148,11 +187,9 @@
}
#endif
- /* add to group */
- /* addgroup should be responsible for dealing w/ gshadow */
- /* if using a pre-existing group, don't create one */
- if (!usegroup)
- addgroup_wrapper(&pw);
+ /* add to existing group */
+ if (usegroup)
+ addgroup_wrapper(&pw, usegroup);
/* Clear the umask for this process so it doesn't
* screw up the permissions on the mkdir and chown. */
@@ -169,7 +206,8 @@
}
}
- if (!(option_mask32 & OPT_DONT_SET_PASS)) {
+ if (!(option_mask32 & OPT_PASSWORD) &&
+ !(option_mask32 & OPT_DONT_SET_PASS)) {
/* interactively set passwd */
passwd_wrapper(pw.pw_name);
}
#
# Automatically generated make config: don't edit
# Busybox version: 1.13.1
# Fri Dec 12 16:42:17 2008
# Tue Dec 30 17:26:13 2008
#
CONFIG_HAVE_DOT_CONFIG=y
......@@ -70,7 +70,7 @@ CONFIG_INSTALL_APPLET_SYMLINKS=y
# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
CONFIG_PREFIX="/z/rdjackso/tmp/mfs/target/"
CONFIG_PREFIX="/home/rdjackso/testbed/mfs/linux_mfs/target/"
#
# Busybox Library Tuning
......@@ -386,14 +386,14 @@ CONFIG_FEATURE_SHADOWPASSWDS=y
CONFIG_USE_BB_PWD_GRP=y
CONFIG_USE_BB_SHADOW=y
CONFIG_USE_BB_CRYPT=y
# CONFIG_ADDGROUP is not set
# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
# CONFIG_DELGROUP is not set
# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
# CONFIG_FEATURE_CHECK_NAMES is not set
# CONFIG_ADDUSER is not set
# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set
# CONFIG_DELUSER is not set
CONFIG_ADDGROUP=y
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
CONFIG_DELGROUP=y
CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
CONFIG_FEATURE_CHECK_NAMES=y
CONFIG_ADDUSER=y
CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
CONFIG_DELUSER=y
CONFIG_GETTY=y
CONFIG_FEATURE_UTMP=y
CONFIG_FEATURE_WTMP=y
......@@ -406,9 +406,9 @@ CONFIG_PASSWD=y
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
# CONFIG_CRYPTPW is not set
# CONFIG_CHPASSWD is not set
# CONFIG_SU is not set
# CONFIG_FEATURE_SU_SYSLOG is not set
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
CONFIG_SU=y
CONFIG_FEATURE_SU_SYSLOG=y
CONFIG_FEATURE_SU_CHECKS_SHELLS=y
# CONFIG_SULOGIN is not set
CONFIG_VLOCK=y
......@@ -720,6 +720,9 @@ CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
# CONFIG_VCONFIG is not set
# CONFIG_WGET is not set
# CONFIG_FEATURE_WGET_STATUSBAR is not set
# CONFIG_FEATURE_WGET_AUTHENTICATION is not set
# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set
# CONFIG_ZCIP is not set
# CONFIG_TCPSVD is not set
# CONFIG_UDPSVD is not set
......@@ -854,7 +857,7 @@ CONFIG_FEATURE_SH_EXTRA_QUIET=y
#
# System Logging Utilities
#
# CONFIG_SYSLOGD is not set
CONFIG_SYSLOGD=y
# CONFIG_FEATURE_ROTATE_LOGFILE is not set
# CONFIG_FEATURE_REMOTE_LOG is not set
# CONFIG_FEATURE_SYSLOGD_DUP is not set
......@@ -862,5 +865,5 @@ CONFIG_FEATURE_SH_EXTRA_QUIET=y
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=
# CONFIG_LOGREAD is not set
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
# CONFIG_KLOGD is not set
CONFIG_KLOGD=y
# CONFIG_LOGGER is not set
......@@ -4,7 +4,7 @@ PERL_VERSION = 5.8.8
PERL_PATH = $(TARGET_BUILD_PATH)/perl-$(PERL_VERSION)
PERL_MODULES = Digest Errno Fcntl File IO PerlIO POSIX \
Socket Sys Time XS \
Socket Sys Time XS Getopt \
DynaLoader \
Carp Config Cwd English Env Errno Exporter \
FileHandle Shell Switch UNIVERSAL XSLoader \
......
......@@ -28,8 +28,8 @@ for module in $modules; do
fi
if [ -d "$module_dir" ]; then
find $module_dir -type f \! -name \*.t \! -name README \
\! -name Changes \! -name .exists | while read f; do
find $module_dir -type f \! -name \*.t \! -iname README \
\! -iname Changes \! -name .exists | while read f; do
install_file "$f" "$target_dir"
done
fi
......
include ../../variables.mk
PORTMAP_VERSION = 6.0
PORTMAP_PATH = $(TARGET_BUILD_PATH)/portmap-$(PORTMAP_VERSION)
.PHONY: extract patch config \
portmap install clean all
all: portmap
extract: $(PORTMAP_PATH)/.extract-stamp
patch: $(PORTMAP_PATH)/.patch-stamp
config: $(PORTMAP_PATH)/.config-stamp
portmap: config
PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
CC=$(TARGET_CC) \
NO_TCP_WRAPPER=true \
$(MAKE) -C $(PORTMAP_PATH) \
LDFLAGS=-fPIE
$(TARGET_CONFIGURE_OPTS) LD=i386-linux-uclibc-gcc
install:
install -m 755 $(PORTMAP_PATH)/portmap $(TARGET_PATH)/sbin
install -m 755 $(PORTMAP_PATH)/pmap_dump $(TARGET_PATH)/sbin
install -m 755 $(PORTMAP_PATH)/pmap_set $(TARGET_PATH)/sbin
install -m 755 $(SOURCE_PATH)/portmap/S45portmap \
$(TARGET_PATH)/etc/init.d
$(STRIPCMD) --strip-unneeded $(TARGET_PATH)/sbin/portmap
$(STRIPCMD) --strip-unneeded $(TARGET_PATH)/sbin/pmap_dump
$(STRIPCMD) --strip-unneeded $(TARGET_PATH)/sbin/pmap_set
clean:
rm -rf $(PORTMAP_PATH)
$(PORTMAP_PATH)/.extract-stamp:
mkdir -p $(TARGET_BUILD_PATH)
cd $(TARGET_BUILD_PATH); tar xzf $(SOURCE_PATH)/portmap/portmap-$(PORTMAP_VERSION).tar.gz
touch $@
$(PORTMAP_PATH)/.patch-stamp: $(PORTMAP_PATH)/.extract-stamp
$(SCRIPTS_PATH)/patch-kernel.sh $(PORTMAP_PATH) $(SOURCE_PATH)/portmap/ '*.patch'
touch $@
$(PORTMAP_PATH)/.config-stamp: $(PORTMAP_PATH)/.patch-stamp
touch $@
#--enable-elf-shlibs --enable-dynamic-e2fsck --disable-swapfs \
#--enable-elf-shlibs \
#!/bin/sh
#
# Starts portmap.
#
# Make sure the dropbearkey progam exists
[ -f /usr/bin/dropbearkey ] || exit 0
start() {
echo -n "Starting portmap: "
umask 077
start-stop-daemon -S -q --exec /sbin/portmap
echo "OK"
}
stop() {
echo -n "Stopping portmap: "
start-stop-daemon -K -q --exec /sbin/portmap
echo "OK"
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
exit $?
--- portmap-6.0/pmap_check.c.orig 2008-12-30 11:45:49.000000000 -0700
+++ portmap-6.0/pmap_check.c 2008-12-30 11:46:04.000000000 -0700
@@ -44,7 +44,9 @@
#include <netinet/in.h>
#include <rpc/rpcent.h>
#endif
+#ifdef DHOSTS_ACCESS
#include <tcpd.h>
+#endif
#include <arpa/inet.h>
#include <grp.h>
......@@ -5,8 +5,14 @@
udhcpc_opts="-q"
if [ -f /etc/emulab/paths.sh ]; then
. /etc/emulab/paths.sh
else
BOOTDIR=/etc/testbed
fi
LOCKDIR=/var/lock/udhcpc.lock
SUCCESS_FLAG=/etc/testbed/myip
SUCCESS_FLAG=$BOOTDIR/myip
start() {
interfaces=""
......
#! /bin/sh
create_home=0
cmdline=""
for arg in "$@"; do
case "$arg" in
-m) create_home=1 ;;
*) cmdline="$cmdline '$arg'" ;;
esac
done
if [ $create_home -ne 1 ]; then
cmdline="$cmdline -H"
fi
eval exec adduser $cmdline
......@@ -4,9 +4,15 @@
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
if [ -f /etc/emulab/paths.sh ]; then
. /etc/emulab/paths.sh
else
BOOTDIR=/etc/testbed
fi
LOCKDIR=/var/lock/udhcpc.lock
SUCCESS_FLAG=/etc/testbed/myip
SUCCESS_FLAG=$BOOTDIR/myip
RESOLV_CONF="/etc/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
......
......@@ -2,7 +2,7 @@ include ../../variables.mk
BUILDROOT := $(PWD)/$(BUILDROOT)
PROGS := imageunzip imagezip frisbee growdisk tmcc binoffset groklilo
PROGS := imageunzip imagezip frisbee growdisk tmcc.bin binoffset groklilo
BUILD_TARGETS := $(PROGS)
INSTALL_TARGETS := $(addsuffix -install,$(PROGS))
......@@ -24,7 +24,7 @@ TMCC_OBJ_PATH = $(TARGET_BUILD_PATH)/tmcc
CFLAGS = -Os
INSTALLED_BINS := $(addprefix $(TARGET_PATH)/usr/, \
$(addprefix bin/, binoffset imagezip imageunzip tmcc frisbee) \
$(addprefix bin/, binoffset imagezip imageunzip tmcc.bin frisbee) \
$(addprefix sbin/, groklilo growdisk))
all: $(BUILD_TARGETS)
......@@ -46,7 +46,15 @@ $(INSTALLED_BINS): $(TESTBED_BUILD_PATH)/$$(notdir $$@)
script-install:
mkdir -p $(TARGET_PATH)/etc/testbed
ln -sf $(TARGET_PATH)/etc/testbed $(TARGET_PATH)/etc/emulab
mkdir -p $(TARGET_PATH)/etc/testbed/rc
mkdir -p $(TARGET_PATH)/etc/emulab
mkdir -p $(TARGET_PATH)/usr/bin
mkdir -p $(TARGET_PATH)/usr/local/etc
mkdir -p $(TARGET_PATH)/var/emulab/logs
mkdir -p $(TARGET_PATH)/var/emulab/lock
mkdir -p $(TARGET_PATH)/var/emulab/boot
mkdir -p $(TARGET_PATH)/var/emulab/db
ln -sf /etc/testbed $(TARGET_PATH)/usr/local/etc/emulab
install -m 755 $(TMCD_PATH)/linux/control_interface $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/linux/rc.frisbee $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/linux/rc.ipod $(TARGET_PATH)/etc/testbed
......@@ -59,6 +67,25 @@ script-install:
install -m 755 $(TMCD_PATH)/linux/guess_linux_root_device $(TARGET_PATH)/etc/testbed
install -m 755 $(TESTBED_PATH)/install/newclient $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/common/paths.sh $(TARGET_PATH)/etc/emulab
install -m 755 $(TMCD_PATH)/common/paths.pm $(TARGET_PATH)/etc/emulab
install -m 644 $(TMCD_PATH)/common/libsetup.pm $(TARGET_PATH)/etc/testbed
install -m 644 $(TMCD_PATH)/common/libtestbed.pm $(TARGET_PATH)/etc/testbed
install -m 644 $(TMCD_PATH)/common/libtmcc.pm $(TARGET_PATH)/etc/testbed
install -m 644 $(TMCD_PATH)/linux/liblocsetup.pm $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/common/watchdog $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/common/update $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/common/tmcc.pl $(TARGET_PATH)/usr/bin/tmcc
ln -sf /usr/bin/tmcc $(TARGET_PATH)/etc/testbed/tmcc
install -m 755 $(TMCD_PATH)/common/config/librc.pm $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/common/config/rc.config $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/linux/rc.mfs $(TARGET_PATH)/etc/testbed
install -m 755 $(TMCD_PATH)/common/config/rc.misc $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.localize $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.mounts $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.accounts $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.hostnames $(TARGET_PATH)/etc/testbed/rc
install -m 755 $(TMCD_PATH)/common/config/rc.keys $(TARGET_PATH)/etc/testbed/rc
touch $(TARGET_PATH)/etc/emulab/ismfs
imageunzip-install: $(TARGET_PATH)/usr/bin/imageunzip
......@@ -72,7 +99,7 @@ binoffset-install: $(TARGET_PATH)/usr/bin/binoffset
groklilo-install: $(TARGET_PATH)/usr/sbin/groklilo
tmcc-install: $(TARGET_PATH)/usr/bin/tmcc
tmcc.bin-install: $(TARGET_PATH)/usr/bin/tmcc.bin
clean:
rm -rf $(TESTBED_BUILD_PATH)
......@@ -126,7 +153,7 @@ $(TESTBED_BUILD_PATH)/growdisk:
# $(TESTBED_PATH)/lib/libtb/log.c
# $(STRIPCMD) --strip-unneeded $@
$(TESTBED_BUILD_PATH)/tmcc:
$(TESTBED_BUILD_PATH)/tmcc.bin:
mkdir -p $(TESTBED_BUILD_PATH)
PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
$(CROSS_COMPILER_PREFIX)gcc \
......@@ -138,10 +165,10 @@ $(TESTBED_BUILD_PATH)/tmcc:
$(TESTBED_PATH)/lib/libtb/log.c
$(STRIPCMD) --strip-unneeded $@
$(MAKE) -C $(TMCD_PATH) \
CC=$(CROSS_COMPILER_PREFIX)gcc \
CFLAGS="$(CFLAGS) -I$(TESTBEDOBJ_PATH)" \
PATH=$(STAGING_DIR)/usr/bin:$(PATH) tmcc
# $(MAKE) -C $(TMCD_PATH) \
# CC=$(CROSS_COMPILER_PREFIX)gcc \
# CFLAGS="$(CFLAGS) -I$(TESTBEDOBJ_PATH)" \
# PATH=$(STAGING_DIR)/usr/bin:$(PATH) tmcc
$(TESTBED_BUILD_PATH)/frisbee: $(SYSROOT_ZLIB_SHARED)
PATH=$(STAGING_DIR)/usr/bin:$(PATH) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment