split package: split busybox to busybox-initramfs and busybox-system

This commit is contained in:
Stephan Raue 2009-09-21 02:52:39 +02:00
parent 0f32222346
commit f1a8996296
26 changed files with 50 additions and 31 deletions

View File

@ -35,7 +35,7 @@ case "$2" in
$SCRIPTS/install uClibc $SCRIPTS/install uClibc
$SCRIPTS/install gcc-final $SCRIPTS/install gcc-final
$SCRIPTS/install linux $2 $SCRIPTS/install linux $2
$SCRIPTS/install busybox $2 $SCRIPTS/install busybox-system
$SCRIPTS/install automountd $SCRIPTS/install automountd
echo $TARGET_ARCH > $INSTALL/etc/arch echo $TARGET_ARCH > $INSTALL/etc/arch

View File

@ -6,7 +6,7 @@ $SCRIPTS/build toolchain
$SCRIPTS/build module-init-tools $SCRIPTS/build module-init-tools
export INSTALL=$(kernel_path) export INSTALL=$(kernel_path)
$SCRIPTS/install busybox initramfs $SCRIPTS/install busybox-initramfs
$SCRIPTS/install uClibc initramfs $SCRIPTS/install uClibc initramfs
unset LDFLAGS unset LDFLAGS

View File

@ -56,4 +56,4 @@ dir /flash 755 0 0
dir /sysroot 755 0 0 dir /sysroot 755 0 0
dir /storage 755 0 0 dir /storage 755 0 0
file /init initramfs/init.initramfs 755 0 0 file /init initramfs/init 755 0 0

View File

@ -0,0 +1,23 @@
#!/bin/sh
. config/options
$SCRIPTS/build toolchain
$SCRIPTS/unpack busybox
PKG_DIR=`find $PACKAGES -type d -name $1`
if [ -f $PROJECT_DIR/$PROJECT/busybox/$1.conf ]; then
BUSYBOX_CFG_FILE=$PROJECT_DIR/$PROJECT/busybox/$1.conf
else
BUSYBOX_CFG_FILE=$ROOT/$PKG_DIR/config/$1.conf
fi
cd $BUILD/busybox*
# Build Busybox for initramfs
make distclean
cp $BUSYBOX_CFG_FILE .config
make oldconfig
ARCH=$TARGET_ARCH make install

View File

@ -0,0 +1,11 @@
#!/bin/sh
. config/options
$SCRIPTS/unpack linux
PKG_DIR=`find $PACKAGES -type d -name $1`
mkdir -p $INSTALL/initramfs
cp -PR $BUILD/busybox*/_install-initramfs/* $INSTALL/initramfs
cp $PKG_DIR/scripts/init $INSTALL/initramfs

View File

@ -3,22 +3,17 @@
. config/options . config/options
$SCRIPTS/build toolchain $SCRIPTS/build toolchain
$SCRIPTS/unpack busybox
PKG_DIR=`find $PACKAGES -type d -name $1` PKG_DIR=`find $PACKAGES -type d -name $1`
if [ -f $PROJECT_DIR/$PROJECT/$1/$1.conf ]; then if [ -f $PROJECT_DIR/$PROJECT/busybox/$1.conf ]; then
BUSYBOX_CFG_FILE=$PROJECT_DIR/$PROJECT/$1/$1.conf BUSYBOX_CFG_FILE=$PROJECT_DIR/$PROJECT/busybox/$1.conf
else else
BUSYBOX_CFG_FILE=$ROOT/$PKG_DIR/config/$1.conf BUSYBOX_CFG_FILE=$ROOT/$PKG_DIR/config/$1.conf
fi fi
cd $PKG_BUILD cd $BUILD/busybox*
# Build Busybox for initramfs
make distclean
cp $ROOT/$PKG_DIR/config/$1-initramfs.conf .config
make oldconfig
ARCH=$TARGET_ARCH make install
# Build Busybox for system # Build Busybox for system
make distclean make distclean

View File

@ -1,7 +1,7 @@
# #
# Automatically generated make config: don't edit # Automatically generated make config: don't edit
# Busybox version: 1.15.1 # Busybox version: 1.15.1
# Sun Sep 20 05:27:58 2009 # Sun Sep 20 22:22:39 2009
# #
CONFIG_HAVE_DOT_CONFIG=y CONFIG_HAVE_DOT_CONFIG=y
@ -416,8 +416,8 @@ CONFIG_FEATURE_NOLOGIN=y
CONFIG_FEATURE_SECURETTY=y CONFIG_FEATURE_SECURETTY=y
CONFIG_PASSWD=y CONFIG_PASSWD=y
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set # CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
# CONFIG_CRYPTPW is not set CONFIG_CRYPTPW=y
# CONFIG_CHPASSWD is not set CONFIG_CHPASSWD=y
CONFIG_SU=y CONFIG_SU=y
CONFIG_FEATURE_SU_SYSLOG=y CONFIG_FEATURE_SU_SYSLOG=y
CONFIG_FEATURE_SU_CHECKS_SHELLS=y CONFIG_FEATURE_SU_CHECKS_SHELLS=y

View File

@ -1,30 +1,22 @@
#!/bin/sh #!/bin/sh
. config/options . config/options
$SCRIPTS/unpack linux
$SCRIPTS/build busybox-hosttools
PKG_DIR=`find $PACKAGES -type d -name $1` PKG_DIR=`find $PACKAGES -type d -name $1`
if [ "$2" = initramfs ]; then ROOT_PWD="`$ROOT/$TOOLCHAIN/bin/mkpasswd $ROOT_PASSWORD`"
mkdir -p $INSTALL/$2
cp -PR $PKG_BUILD/_install-$2/* $INSTALL/$2
cp $PKG_DIR/scripts/init.$2 $INSTALL/$2 add_user root "$ROOT_PWD" 0 0 "Root User" "/storage" "/bin/sh"
fi
if [ "$2" = system ]; then
add_user root passwort 0 0 "Root User" "/storage" "/bin/sh"
add_group root 0 add_group root 0
cp -PR $PKG_BUILD/_install-$2/* $INSTALL cp -PR $BUILD/busybox*/_install-system/* $INSTALL
mkdir -p $INSTALL/bin mkdir -p $INSTALL/bin
ln -sf /bin/sh $INSTALL/bin/bash ln -sf /bin/sh $INSTALL/bin/bash
mkdir -p $INSTALL/etc mkdir -p $INSTALL/etc
# cp $PKG_DIR/config/passwd $INSTALL/etc
# cp $PKG_DIR/config/group $INSTALL/etc
cp $PKG_DIR/config/sysconfig $INSTALL/etc cp $PKG_DIR/config/sysconfig $INSTALL/etc
echo $ISSUE > $INSTALL/etc/issue echo $ISSUE > $INSTALL/etc/issue
@ -32,10 +24,8 @@ if [ "$2" = system ]; then
cp $PKG_DIR/scripts/udhcp.script $INSTALL/usr/share/udhcpc/default.script cp $PKG_DIR/scripts/udhcp.script $INSTALL/usr/share/udhcpc/default.script
mkdir -p $INSTALL/sbin mkdir -p $INSTALL/sbin
cp $PKG_DIR/scripts/init.system $INSTALL/sbin/init.system cp $PKG_DIR/scripts/init $INSTALL/sbin/init.system
# acpid specific # acpid specific
mkdir -p $INSTALL/etc/acpi/PWRF mkdir -p $INSTALL/etc/acpi/PWRF
cp $PKG_DIR/scripts/acpi_powerbtn $INSTALL/etc/acpi/PWRF/00000080 cp $PKG_DIR/scripts/acpi_powerbtn $INSTALL/etc/acpi/PWRF/00000080
fi