summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChirayu Desai <chirayudesai1@gmail.com>2014-11-11 17:15:14 +0530
committerChirayu Desai <chirayudesai1@gmail.com>2014-11-11 17:15:14 +0530
commit0bdc76646ccbd1c4ac33e22c47a593be3ed120ef (patch)
tree268696086394e8b18d7a9153a97bec1136fcca21
parent54180bdbd0d76a7f2e92440a079180e6bd7ff2b1 (diff)
move bootimg.mk to msm8974-common
Change-Id: Ib8afb150afabb8f32b1aee0dffbcd3a93225b928
-rw-r--r--BoardConfigCommon.mk2
-rw-r--r--combinedroot/init.sh75
-rw-r--r--custombootimg.mk46
3 files changed, 1 insertions, 122 deletions
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 1955e56..62f63d9 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -44,8 +44,8 @@ BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_PAGESIZE := 2048
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x01E00000
-BOARD_CUSTOM_BOOTIMG_MK := device/sony/shinano-common/custombootimg.mk
BOARD_KERNEL_SEPARATED_DT := true
+TARGET_DTB_EXTRA_FLAGS := --force-v2
# Qualcomm
BOARD_USES_QCOM_HARDWARE := true
diff --git a/combinedroot/init.sh b/combinedroot/init.sh
deleted file mode 100644
index 0fc3a0f..0000000
--- a/combinedroot/init.sh
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/sbin/busybox sh
-set +x
-_PATH="$PATH"
-export PATH=/sbin
-
-busybox cd /
-busybox date >>boot.txt
-exec >>boot.txt 2>&1
-busybox rm /init
-
-# include device specific vars
-source /sbin/bootrec-device
-
-# create directories
-busybox mkdir -m 755 -p /dev/block
-busybox mkdir -m 755 -p /dev/input
-busybox mkdir -m 555 -p /proc
-busybox mkdir -m 755 -p /sys
-
-# create device nodes
-busybox mknod -m 600 /dev/block/mmcblk0 b 179 0
-busybox mknod -m 600 ${BOOTREC_EVENT_NODE}
-busybox mknod -m 666 /dev/null c 1 3
-
-# mount filesystems
-busybox mount -t proc proc /proc
-busybox mount -t sysfs sysfs /sys
-
-# trigger amber LED
-busybox echo 255 > ${BOOTREC_LED_RED}
-busybox echo 0 > ${BOOTREC_LED_GREEN}
-busybox echo 255 > ${BOOTREC_LED_BLUE}
-
-# keycheck
-busybox cat ${BOOTREC_EVENT} > /dev/keycheck&
-busybox sleep 3
-
-# android ramdisk
-load_image=/sbin/ramdisk.cpio
-
-# boot decision
-if [ -s /dev/keycheck ] || busybox grep -q warmboot=0x77665502 /proc/cmdline ; then
- busybox echo 'RECOVERY BOOT' >>boot.txt
- # orange led for recoveryboot
- busybox echo 255 > ${BOOTREC_LED_RED}
- busybox echo 100 > ${BOOTREC_LED_GREEN}
- busybox echo 0 > ${BOOTREC_LED_BLUE}
- # recovery ramdisk
- busybox mknod -m 600 ${BOOTREC_FOTA_NODE}
- busybox mount -o remount,rw /
- busybox ln -sf /sbin/busybox /sbin/sh
- extract_elf_ramdisk -i ${BOOTREC_FOTA} -o /sbin/ramdisk-recovery.cpio -t / -c
- busybox rm /sbin/sh
- load_image=/sbin/ramdisk-recovery.cpio
-else
- busybox echo 'ANDROID BOOT' >>boot.txt
- # poweroff LED
- busybox echo 0 > ${BOOTREC_LED_RED}
- busybox echo 0 > ${BOOTREC_LED_GREEN}
- busybox echo 0 > ${BOOTREC_LED_BLUE}
-fi
-
-# kill the keycheck process
-busybox pkill -f "busybox cat ${BOOTREC_EVENT}"
-
-# unpack the ramdisk image
-busybox cpio -i < ${load_image}
-
-busybox umount /proc
-busybox umount /sys
-
-busybox rm -fr /dev/*
-busybox date >>boot.txt
-export PATH="${_PATH}"
-exec /init
diff --git a/custombootimg.mk b/custombootimg.mk
deleted file mode 100644
index 086bbe5..0000000
--- a/custombootimg.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-LOCAL_PATH := $(call my-dir)
-
-uncompressed_ramdisk := $(PRODUCT_OUT)/ramdisk.cpio
-$(uncompressed_ramdisk): $(INSTALLED_RAMDISK_TARGET)
- zcat $< > $@
-
-INITSH := device/sony/shinano-common/combinedroot/init.sh
-BOOTREC_DEVICE := $(PRODUCT_OUT)/recovery/bootrec-device
-
-DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX)
-INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img
-
-INSTALLED_BOOTIMAGE_TARGET := $(PRODUCT_OUT)/boot.img
-$(INSTALLED_BOOTIMAGE_TARGET): $(PRODUCT_OUT)/kernel $(uncompressed_ramdisk) $(recovery_uncompressed_ramdisk) $(INSTALLED_RAMDISK_TARGET) $(INITSH) $(BOOTREC_DEVICE) $(PRODUCT_OUT)/utilities/busybox $(PRODUCT_OUT)/utilities/extract_elf_ramdisk $(MKBOOTIMG) $(MINIGZIP) $(INTERNAL_BOOTIMAGE_FILES) $(DTBTOOL)
- $(call pretty,"Boot image: $@")
-
- $(hide) rm -fr $(PRODUCT_OUT)/combinedroot
- $(hide) mkdir -p $(PRODUCT_OUT)/combinedroot/sbin
-
- $(hide) mv $(PRODUCT_OUT)/root/logo.rle $(PRODUCT_OUT)/combinedroot/logo.rle
- $(hide) cp $(uncompressed_ramdisk) $(PRODUCT_OUT)/combinedroot/sbin/
- $(hide) cp $(recovery_uncompressed_ramdisk) $(PRODUCT_OUT)/combinedroot/sbin/
- $(hide) cp $(PRODUCT_OUT)/utilities/busybox $(PRODUCT_OUT)/combinedroot/sbin/
- $(hide) cp $(PRODUCT_OUT)/utilities/extract_elf_ramdisk $(PRODUCT_OUT)/combinedroot/sbin/
-
- $(hide) cp $(INITSH) $(PRODUCT_OUT)/combinedroot/sbin/init.sh
- $(hide) chmod 755 $(PRODUCT_OUT)/combinedroot/sbin/init.sh
- $(hide) ln -s sbin/init.sh $(PRODUCT_OUT)/combinedroot/init
- $(hide) cp $(BOOTREC_DEVICE) $(PRODUCT_OUT)/combinedroot/sbin/
-
- $(hide) $(MKBOOTFS) $(PRODUCT_OUT)/combinedroot/ > $(PRODUCT_OUT)/combinedroot.cpio
- $(hide) cat $(PRODUCT_OUT)/combinedroot.cpio | gzip > $(PRODUCT_OUT)/combinedroot.fs
-
- $(call append-dtb)
- $(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)")
- $(hide) $(DTBTOOL) --force-v2 -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/arm/boot/
-
- $(hide) $(MKBOOTIMG) --kernel $(PRODUCT_OUT)/kernel --ramdisk $(PRODUCT_OUT)/combinedroot.fs --cmdline "$(BOARD_KERNEL_CMDLINE)" --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) --dt $(INSTALLED_DTIMAGE_TARGET) $(BOARD_MKBOOTIMG_ARGS) -o $(INSTALLED_BOOTIMAGE_TARGET)
-
-INSTALLED_RECOVERYIMAGE_TARGET := $(PRODUCT_OUT)/recovery.img
-$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) \
- $(recovery_ramdisk) \
- $(recovery_kernel)
- @echo ----- Making recovery image ------
- $(hide) $(MKBOOTIMG) --kernel $(PRODUCT_OUT)/kernel --ramdisk $(PRODUCT_OUT)/ramdisk-recovery.img --cmdline "$(BOARD_KERNEL_CMDLINE)" --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) $(BOARD_MKBOOTIMG_ARGS) -o $(INSTALLED_RECOVERYIMAGE_TARGET)
- @echo ----- Made recovery image -------- $@