Merge "Create busybox symlinks during compile" into jb-wip

This commit is contained in:
Dees_Troy
2012-10-02 10:25:20 -05:00
committed by Gerrit Code Review
4 changed files with 15 additions and 26 deletions

View File

@@ -207,6 +207,20 @@ endif
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
# Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead
BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links)
exclude := tune2fs mke2fs mkdosfs gzip gunzip
RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS))))
$(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox
$(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Symlink: $@ -> $(BUSYBOX_BINARY)"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf $(BUSYBOX_BINARY) $@
ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS)
include $(CLEAR_VARS)
LOCAL_MODULE := verifier_test
LOCAL_FORCE_STATIC_EXECUTABLE := true

View File

@@ -71,15 +71,6 @@ LOCAL_GENERATED_SOURCES := $(GEN)
LOCAL_SRC_FILES := teamwin $(GEN)
include $(BUILD_PREBUILT)
#bbinstall.sh
include $(CLEAR_VARS)
LOCAL_MODULE := bbinstall.sh
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
#fix_permissions
include $(CLEAR_VARS)
LOCAL_MODULE := fix_permissions.sh

View File

@@ -1,14 +0,0 @@
#!/sbin/sh
if [ -f "/sbin/[" ];
then
exit
fi
for cmd in $(/sbin/busybox --list); do
/sbin/busybox ln -s /sbin/busybox /sbin/$cmd
done
ln -sf /sbin/pigz /sbin/gzip
ln -sf /sbin/unpigz /sbin/gunzip
rm /sbin/mkdosfs

View File

@@ -810,10 +810,8 @@ main(int argc, char **argv) {
DataManager_LoadDefaults();
printf("Starting the UI...");
gui_init();
printf("=> Installing busybox into /sbin\n");
system("/sbin/bbinstall.sh"); // Let's install busybox
printf("=> Linking mtab\n");
system("ln -s /proc/mounts /etc/mtab"); // And link mtab for mke2fs
system("ln -s /proc/mounts /etc/mtab"); // Link mtab for mke2fs
printf("=> Processing recovery.fstab\n");
if (!PartitionManager.Process_Fstab("/etc/recovery.fstab", 1)) {
LOGE("Failing out of recovery due to problem with recovery.fstab.\n");