diff --git a/apps/module.mk b/apps/module.mk index b3df0fc2..5b246a45 100644 --- a/apps/module.mk +++ b/apps/module.mk @@ -33,6 +33,8 @@ APP_SUBDIRS := ifeq ($(LOSCFG_SHELL), y) APP_SUBDIRS += shell +APP_SUBDIRS += mksh +APP_SUBDIRS += toybox endif ifeq ($(LOSCFG_USER_INIT_DEBUG), y) @@ -42,11 +44,3 @@ endif ifeq ($(LOSCFG_NET_LWIP_SACK_TFTP), y) APP_SUBDIRS += tftp endif - -#only enable for qemu now -ifeq ($(LOSCFG_PLATFORM_QEMU_ARM_VIRT_CA7), y) -ifeq ($(LOSCFG_SHELL), y) -APP_SUBDIRS += mksh -APP_SUBDIRS += toybox -endif -endif diff --git a/tools/scripts/make_rootfs/rootfsdir.sh b/tools/scripts/make_rootfs/rootfsdir.sh index ed3f690a..35c553e4 100755 --- a/tools/scripts/make_rootfs/rootfsdir.sh +++ b/tools/scripts/make_rootfs/rootfsdir.sh @@ -34,17 +34,18 @@ BIN_DIR=$1 LIB_DIR=$2 ROOTFS_DIR=$3 OUT_DIR=$4 +NEED_COPYTO_OUTDIR=(shell toybox mksh tftp) mkdir -p ${ROOTFS_DIR}/bin ${ROOTFS_DIR}/lib ${ROOTFS_DIR}/usr/bin ${ROOTFS_DIR}/usr/lib ${ROOTFS_DIR}/etc \ ${ROOTFS_DIR}/app ${ROOTFS_DIR}/data ${ROOTFS_DIR}/proc ${ROOTFS_DIR}/dev ${ROOTFS_DIR}/data/system ${ROOTFS_DIR}/data/system/param \ ${ROOTFS_DIR}/system ${ROOTFS_DIR}/system/internal ${ROOTFS_DIR}/system/external ${OUT_DIR}/bin ${OUT_DIR}/libs if [ -d "${BIN_DIR}" ] && [ "$(ls -A "${BIN_DIR}")" != "" ]; then cp -f ${BIN_DIR}/* ${ROOTFS_DIR}/bin - if [ -e ${BIN_DIR}/shell ] && [ "${BIN_DIR}/shell" != "${OUT_DIR}/bin/shell" ]; then - cp -f ${BIN_DIR}/shell ${OUT_DIR}/bin/shell - fi - if [ -e ${BIN_DIR}/tftp ] && [ "${BIN_DIR}/tftp" != "${OUT_DIR}/bin/tftp" ]; then - cp -f ${BIN_DIR}/tftp ${OUT_DIR}/bin/tftp - fi + for el in ${NEED_COPYTO_OUTDIR[@]} + do + if [ -e ${BIN_DIR}/$el ] && [ "${BIN_DIR}/$el" != "${OUT_DIR}/bin/$el" ]; then + cp -f ${BIN_DIR}/$el ${OUT_DIR}/bin/$el + fi + done fi cp -f ${LIB_DIR}/* ${ROOTFS_DIR}/lib cp -f ${LIB_DIR}/* ${OUT_DIR}/libs