Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update borqs boot.img to boot on charge #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added borqs_boot/boot.img
Binary file not shown.
Binary file added borqs_boot/borqs_unpacked/dt.img
Binary file not shown.
14 changes: 14 additions & 0 deletions borqs_boot/borqs_unpacked/img_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
kernel=kernel
ramdisk=ramdisk
dt=dt.img
page_size=2048
kernel_size=7352552
ramdisk_size=582644
dtb_size=5826560
base_addr=0x80000000
kernel_offset=0x00008000
ramdisk_offset=0x02000000
tags_offset=0x00000100
cmd_line='console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk'
board=""
format=gzip
Binary file added borqs_boot/borqs_unpacked/kernel
Binary file not shown.
Binary file added borqs_boot/borqs_unpacked/ramdisk.packed
Binary file not shown.
1 change: 1 addition & 0 deletions borqs_boot/borqs_unpacked/ramdisk/charger
13 changes: 13 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/default.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#
# ADDITIONAL_DEFAULT_PROPERTIES
#
ro.secure=1
ro.allow.mock.location=0
ro.debuggable=1
ro.zygote=zygote32
dalvik.vm.dex2oat-Xms=64m
dalvik.vm.dex2oat-Xmx=512m
dalvik.vm.image-dex2oat-Xms=64m
dalvik.vm.image-dex2oat-Xmx=64m
ro.dalvik.vm.native.bridge=0
persist.sys.usb.config=adb
604 changes: 604 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/file_contexts

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/fstab.qcom
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.

#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,encryptable=footer
/dev/block/zram0 none swap defaults zramsize=536870912
/devices/soc.0/7864900.sdhci/mmc_host /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,noemulatedsd
/dev/block/bootdevice/by-name/config /frp emmc defaults defaults
/devices/platform/msm_hsusb /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto
Binary file added borqs_boot/borqs_unpacked/ramdisk/init
Binary file not shown.
18 changes: 18 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/init.NKS.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on init
mkdir /carrier 0771 system system
mkdir /storage/usbotg 0000 system system
mount tmpfs tmpfs /storage/usbotg mode=0755,uid=0,gid=0
export REMOVABLE_STORAGE_PATH /storage/sdcard1/

on fs
wait /dev/block/bootdevice/by-name/carrier
mount ext4 /dev/block/bootdevice/by-name/carrier /carrier nosuid nodev barrier=1
restorecon_recursive /carrier

on post-fs-data
chown system system /carrier
chmod 0771 /carrier
service nks-c_core-sh /system/bin/sh /init.nks.early_boot.sh
class core
user root
oneshot
96 changes: 96 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/init.class_main.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/system/bin/sh
# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

#
# start ril-daemon only for targets on which radio is present
#
baseband=`getprop ro.baseband`
sgltecsfb=`getprop persist.radio.sglte_csfb`
datamode=`getprop persist.data.mode`

case "$baseband" in
"apq")
setprop ro.radio.noril yes
stop ril-daemon
esac

case "$baseband" in
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3")
start qmuxd
start ipacm-diag
start ipacm
case "$baseband" in
"svlte2a" | "csfb")
start qmiproxy
;;
"sglte" | "sglte2" )
if [ "x$sgltecsfb" != "xtrue" ]; then
start qmiproxy
else
setprop persist.radio.voice.modem.index 0
fi
;;
"dsda2")
setprop persist.radio.multisim.config dsda
esac

multisim=`getprop persist.radio.multisim.config`

if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
start ril-daemon2
elif [ "$multisim" = "tsts" ]; then
start ril-daemon2
start ril-daemon3
fi

case "$datamode" in
"tethered")
start qti
start port-bridge
;;
"concurrent")
start qti
start netmgrd
;;
*)
start netmgrd
;;
esac
esac

#
# Allow persistent faking of bms
# User needs to set fake bms charge in persist.bms.fake_batt_capacity
#
fake_batt_capacity=`getprop persist.bms.fake_batt_capacity`
case "$fake_batt_capacity" in
"") ;; #Do nothing here
* )
echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
;;
esac
13 changes: 13 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/init.environ.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# set up the global environment
on init
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export ANDROID_STORAGE /storage
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/com.borqsext.jar:/system/framework/qcmediaplayer.jar:/system/framework/oem-services.jar:/system/framework/qcom.fmradio.jar:/system/framework/org.codeaurora.Performance.jar:/system/framework/vcard.jar:/system/framework/tcmiface.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar
export SYSTEMSERVERCLASSPATH /system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar
export LD_PRELOAD libsigchain.so:libNimsWrap.so
33 changes: 33 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/init.mdm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/system/bin/sh
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

baseband=`getprop ro.baseband`
if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then
start mdm_helper
fi

9 changes: 9 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/init.nks.early_boot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export PATH=/system/bin

if [ -f /sys/devices/soc0/platform_version ]; then
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
else
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
fi
setprop ro.hardware.custom_version "$soc_hwver"

49 changes: 49 additions & 0 deletions borqs_boot/borqs_unpacked/ramdisk/init.qcom.bms.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/system/bin/sh
# Copyright (c) 2009-2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

target=`getprop ro.board.platform`

start_vm_bms()
{
if [ -e /dev/vm_bms ]; then
chown -h root.system /sys/class/power_supply/bms/current_now
chown -h root.system /sys/class/power_supply/bms/voltage_ocv
chmod 0664 /sys/class/power_supply/bms/current_now
chmod 0664 /sys/class/power_supply/bms/voltage_ocv
start vm_bms
fi
}

case "$target" in
"msm8916")
start_vm_bms
;;
"msm8909")
start_vm_bms
;;
esac
Loading