Commit 1b0bba30 authored by DerTeufel's avatar DerTeufel Committed by fire855
Browse files

debug boot: execute dmesg during early boot (2/2)

see system/core/init for commit (1/2)

logfiles can be found at:
system/dmesg.txt and /system/boot.txt

to use this, add these flags to BoardConfig.mk in device tree

DEBUG_BOOT := true
TARGET_SYSTEM_MINOR := 20 (this needs to match the system partition number of the device)

note: with selinux enforcing device can't boot up with this activated!
parent 24470ccf
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -184,3 +184,6 @@ include vendor/mad/config/media.mk
include vendor/mad/config/wifi.mk
include vendor/mad/config/telephony.mk
include vendor/mad/config/google_override.mk

# DEBUG_BOOT
include vendor/mad/config/debug_boot.mk

config/debug_boot.mk

0 → 100644
+4 −0
Original line number Diff line number Diff line
PRODUCT_PACKAGES += \
    busybox \
    log-kmsg.sh \
    init_orig

debug_boot/.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
mount_fs

debug_boot/Android.mk

0 → 100644
+41 −0
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)

ifeq ($(DEBUG_BOOT),true)

include $(CLEAR_VARS)
LOCAL_MODULE := init
LOCAL_SRC_FILES := init
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_TAGS := optional
ifneq ($(TARGET_SYSTEM_MINOR),)
SYSTEM_MINOR := $(TARGET_SYSTEM_MINOR)
$(shell (rm -f $(LOCAL_PATH)/mount_fs))
$(shell ($(LOCAL_PATH)/create_mount.sh $(LOCAL_PATH) $(SYSTEM_MINOR)))
$(shell (chmod 750 $(LOCAL_PATH)/mount_fs))
LOCAL_POST_INSTALL_CMD := $(hide) cp $(LOCAL_PATH)/mount_fs $(TARGET_ROOT_OUT)/mount_fs \
	$(shell (chmod 750 $(TARGET_ROOT_OUT)/init))
else
$(error $(LOCAL_PATH): Invalid TARGET_SYSTEM_MINOR specified for module $(LOCAL_MODULE))
endif
include $(BUILD_PREBUILT)


include $(CLEAR_VARS)
LOCAL_MODULE := busybox
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)/sbin
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)


include $(CLEAR_VARS)
LOCAL_MODULE := log-kmsg.sh
LOCAL_SRC_FILES := $(LOCAL_MODULE)
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)

endif

debug_boot/busybox

0 → 100755
+1.21 MiB

File added.

No diff preview for this file type.

Loading