am 670ccf2c
: Merge "GB Updates for init.rc and boot command line"
* commit '670ccf2c458ed02d2d1e548b48d2eec29cb3d958': GB Updates for init.rc and boot command line
This commit is contained in:
committed by
Android Git Automerger
commit
4bd05717e2
@@ -1,12 +1,5 @@
|
|||||||
LOCAL_PATH := $(call my-dir)
|
LOCAL_PATH := $(call my-dir)
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
LOCAL_MODULE := init.rc
|
|
||||||
LOCAL_SRC_FILES := init.rc
|
|
||||||
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
|
||||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|
||||||
include $(BUILD_PREBUILT)
|
|
||||||
|
|
||||||
ifeq ($(TARGET_PREBUILT_KERNEL),)
|
ifeq ($(TARGET_PREBUILT_KERNEL),)
|
||||||
LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel
|
LOCAL_KERNEL := prebuilt/android-x86/kernel/kernel
|
||||||
else
|
else
|
||||||
@@ -14,4 +7,5 @@ LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
$(LOCAL_KERNEL):kernel
|
$(LOCAL_KERNEL):kernel \
|
||||||
|
$(LOCAL_PATH)/init.rc:root/init.rc
|
||||||
|
@@ -13,8 +13,8 @@ TARGET_USERIMAGES_USE_EXT2 := true
|
|||||||
TARGET_BOOTIMAGE_USE_EXT2 := true
|
TARGET_BOOTIMAGE_USE_EXT2 := true
|
||||||
|
|
||||||
# For VirtualBox and likely other emulators
|
# For VirtualBox and likely other emulators
|
||||||
BOARD_INSTALLER_CMDLINE := init=/init console=ttyS0 console=tty0 androidboot.hardware=generic_x86 vga=788 verbose
|
BOARD_INSTALLER_CMDLINE := init=/init console=ttyS0 console=tty0 androidboot.hardware=generic_x86 vga=788 androidboot.console=tty0 verbose
|
||||||
BOARD_KERNEL_CMDLINE := init=/init console=tty0 console=ttyS0 androidboot.hardware=generic_x86 vga=788
|
BOARD_KERNEL_CMDLINE := init=/init console=tty0 console=ttyS0 androidboot.hardware=generic_x86 vga=788 androidboot.console=tty0 verbose
|
||||||
TARGET_USE_DISKINSTALLER := true
|
TARGET_USE_DISKINSTALLER := true
|
||||||
TARGET_DISK_LAYOUT_CONFIG := build/target/board/generic_x86/disk_layout.conf
|
TARGET_DISK_LAYOUT_CONFIG := build/target/board/generic_x86/disk_layout.conf
|
||||||
BOARD_BOOTIMAGE_MAX_SIZE := 8388608
|
BOARD_BOOTIMAGE_MAX_SIZE := 8388608
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
|
on early-init
|
||||||
|
start ueventd
|
||||||
|
|
||||||
on init
|
on init
|
||||||
|
|
||||||
@@ -6,20 +8,25 @@ sysclktz 0
|
|||||||
loglevel 3
|
loglevel 3
|
||||||
|
|
||||||
# setup the global environment
|
# setup the global environment
|
||||||
export PATH /sbin:/system/sbin:/system/bin:/system/xbin
|
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
|
||||||
export LD_LIBRARY_PATH /system/lib
|
export LD_LIBRARY_PATH /vendor/lib:/system/lib
|
||||||
export ANDROID_BOOTLOGO 1
|
export ANDROID_BOOTLOGO 1
|
||||||
export ANDROID_ROOT /system
|
export ANDROID_ROOT /system
|
||||||
export ANDROID_ASSETS /system/app
|
export ANDROID_ASSETS /system/app
|
||||||
export ANDROID_DATA /data
|
export ANDROID_DATA /data
|
||||||
export EXTERNAL_STORAGE /mnt/sdcard
|
export EXTERNAL_STORAGE /mnt/sdcard
|
||||||
export ASEC_MOUNTPOINT /mnt/asec
|
export ASEC_MOUNTPOINT /mnt/asec
|
||||||
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar
|
export LOOP_MOUNTPOINT /mnt/obb
|
||||||
|
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
|
||||||
|
|
||||||
# Backward compatibility
|
# Backward compatibility
|
||||||
symlink /system/etc /etc
|
symlink /system/etc /etc
|
||||||
symlink /sys/kernel/debug /d
|
symlink /sys/kernel/debug /d
|
||||||
|
|
||||||
|
# Right now vendor lives on the same filesystem as system,
|
||||||
|
# but someday that may change.
|
||||||
|
symlink /system/vendor /vendor
|
||||||
|
|
||||||
# create mountpoints
|
# create mountpoints
|
||||||
mkdir /mnt 0775 root system
|
mkdir /mnt 0775 root system
|
||||||
mkdir /mnt/sdcard 0000 system system
|
mkdir /mnt/sdcard 0000 system system
|
||||||
@@ -51,7 +58,9 @@ loglevel 3
|
|||||||
mkdir /mnt/asec 0700 root system
|
mkdir /mnt/asec 0700 root system
|
||||||
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
|
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
|
||||||
|
|
||||||
mount rootfs rootfs / ro remount
|
# Filesystem image public mount points.
|
||||||
|
mkdir /mnt/obb 0700 root system
|
||||||
|
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
|
||||||
|
|
||||||
write /proc/sys/kernel/panic_on_oops 1
|
write /proc/sys/kernel/panic_on_oops 1
|
||||||
write /proc/sys/kernel/hung_task_timeout_secs 0
|
write /proc/sys/kernel/hung_task_timeout_secs 0
|
||||||
@@ -80,16 +89,16 @@ loglevel 3
|
|||||||
# 5.0 %
|
# 5.0 %
|
||||||
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
|
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
|
||||||
|
|
||||||
|
on fs
|
||||||
# mount mtd partitions
|
# mount mtd partitions
|
||||||
# Hack...
|
mount ext4 /dev/block/sda6 /system rw
|
||||||
# We'll attempt to mount both as sdcard and harddisk...
|
mkdir /system/vendor
|
||||||
# Only one or the other will actually work... this way, we can
|
mount ext4 /dev/block/sda8 /data nosuid nodev
|
||||||
# use the same init.rc for both
|
mount ext4 /dev/block/sda7 /cache nosuid nodev
|
||||||
# Mount /system rw first to give the filesystem a chance to save a checkpoint
|
|
||||||
mount ext3 /dev/block/sda6 /system rw
|
on post-fs
|
||||||
mount ext3 /dev/block/sda6 /system ro remount
|
# once everything is setup, no need to modify /
|
||||||
mount ext3 /dev/block/sda8 /data
|
mount rootfs rootfs / ro remount
|
||||||
mount ext3 /dev/block/sda7 /cache nosuid nodev
|
|
||||||
|
|
||||||
# We chown/chmod /data again so because mount is run as root + defaults
|
# We chown/chmod /data again so because mount is run as root + defaults
|
||||||
chown system system /data
|
chown system system /data
|
||||||
@@ -166,6 +175,11 @@ loglevel 3
|
|||||||
chown root root /cache/lost+found
|
chown root root /cache/lost+found
|
||||||
chmod 0770 /cache/lost+found
|
chmod 0770 /cache/lost+found
|
||||||
|
|
||||||
|
# create data/drm directory
|
||||||
|
mkdir /data/drm 0774 drm drm
|
||||||
|
chown drm drm /data/drm
|
||||||
|
chmod 0774 /data/drm
|
||||||
|
|
||||||
on boot
|
on boot
|
||||||
# basic network init
|
# basic network init
|
||||||
ifup lo
|
ifup lo
|
||||||
@@ -179,32 +193,35 @@ on boot
|
|||||||
# killed by the kernel. These are used in ActivityManagerService.
|
# killed by the kernel. These are used in ActivityManagerService.
|
||||||
setprop ro.FOREGROUND_APP_ADJ 0
|
setprop ro.FOREGROUND_APP_ADJ 0
|
||||||
setprop ro.VISIBLE_APP_ADJ 1
|
setprop ro.VISIBLE_APP_ADJ 1
|
||||||
setprop ro.SECONDARY_SERVER_ADJ 2
|
setprop ro.PERCEPTIBLE_APP_ADJ 2
|
||||||
setprop ro.BACKUP_APP_ADJ 2
|
setprop ro.HEAVY_WEIGHT_APP_ADJ 3
|
||||||
setprop ro.HOME_APP_ADJ 4
|
setprop ro.SECONDARY_SERVER_ADJ 4
|
||||||
|
setprop ro.BACKUP_APP_ADJ 5
|
||||||
|
setprop ro.HOME_APP_ADJ 6
|
||||||
setprop ro.HIDDEN_APP_MIN_ADJ 7
|
setprop ro.HIDDEN_APP_MIN_ADJ 7
|
||||||
setprop ro.CONTENT_PROVIDER_ADJ 14
|
|
||||||
setprop ro.EMPTY_APP_ADJ 15
|
setprop ro.EMPTY_APP_ADJ 15
|
||||||
|
|
||||||
# Define the memory thresholds at which the above process classes will
|
# Define the memory thresholds at which the above process classes will
|
||||||
# be killed. These numbers are in pages (4k).
|
# be killed. These numbers are in pages (4k).
|
||||||
setprop ro.FOREGROUND_APP_MEM 1536
|
setprop ro.FOREGROUND_APP_MEM 2048
|
||||||
setprop ro.VISIBLE_APP_MEM 2048
|
setprop ro.VISIBLE_APP_MEM 3072
|
||||||
setprop ro.SECONDARY_SERVER_MEM 4096
|
setprop ro.PERCEPTIBLE_APP_MEM 4096
|
||||||
setprop ro.BACKUP_APP_MEM 4096
|
setprop ro.HEAVY_WEIGHT_APP_MEM 4096
|
||||||
setprop ro.HOME_APP_MEM 4096
|
setprop ro.SECONDARY_SERVER_MEM 6144
|
||||||
setprop ro.HIDDEN_APP_MEM 5120
|
setprop ro.BACKUP_APP_MEM 6144
|
||||||
setprop ro.CONTENT_PROVIDER_MEM 5632
|
setprop ro.HOME_APP_MEM 6144
|
||||||
setprop ro.EMPTY_APP_MEM 6144
|
setprop ro.HIDDEN_APP_MEM 7168
|
||||||
|
setprop ro.EMPTY_APP_MEM 8192
|
||||||
|
|
||||||
# Write value must be consistent with the above properties.
|
# Write value must be consistent with the above properties.
|
||||||
# Note that the driver only supports 6 slots, so we have HOME_APP at the
|
# Note that the driver only supports 6 slots, so we have combined some of
|
||||||
# same memory level as services.
|
# the classes into the same memory level; the associated processes of higher
|
||||||
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15
|
# classes will still be killed first.
|
||||||
|
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
|
||||||
|
|
||||||
write /proc/sys/vm/overcommit_memory 1
|
write /proc/sys/vm/overcommit_memory 1
|
||||||
write /proc/sys/vm/min_free_order_shift 4
|
write /proc/sys/vm/min_free_order_shift 4
|
||||||
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144
|
write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,8192
|
||||||
|
|
||||||
# Set init its forked children's oom_adj.
|
# Set init its forked children's oom_adj.
|
||||||
write /proc/1/oom_adj -16
|
write /proc/1/oom_adj -16
|
||||||
@@ -264,8 +281,22 @@ on boot
|
|||||||
|
|
||||||
## Daemon processes to be run by init.
|
## Daemon processes to be run by init.
|
||||||
##
|
##
|
||||||
|
service ueventd /sbin/ueventd
|
||||||
|
critical
|
||||||
|
|
||||||
service console /system/bin/sh
|
service console /system/bin/sh
|
||||||
console
|
console
|
||||||
|
disabled
|
||||||
|
user shell
|
||||||
|
group log
|
||||||
|
|
||||||
|
on property:ro.secure=0
|
||||||
|
start console
|
||||||
|
|
||||||
|
# Enable networking so that adb can connect
|
||||||
|
service netcfg /system/bin/netcfg eth0 dhcp
|
||||||
|
setprop property:ro.kernel.qemu 1
|
||||||
|
oneshot
|
||||||
|
|
||||||
# adbd is controlled by the persist.service.adb.enable system property
|
# adbd is controlled by the persist.service.adb.enable system property
|
||||||
service adbd /sbin/adbd
|
service adbd /sbin/adbd
|
||||||
@@ -300,18 +331,21 @@ service ril-daemon /system/bin/rild
|
|||||||
socket rild stream 660 root radio
|
socket rild stream 660 root radio
|
||||||
socket rild-debug stream 660 radio system
|
socket rild-debug stream 660 radio system
|
||||||
user root
|
user root
|
||||||
group radio cache inet misc audio
|
group radio cache inet misc audio sdcard_rw
|
||||||
|
|
||||||
service rcpvr /system/bin/sh /system/etc/rc.pvr start
|
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
|
||||||
oneshot
|
|
||||||
|
|
||||||
# service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
|
|
||||||
service zygote /system/bin/app_process -Xzygote -Xint:fast /system/bin --zygote --start-system-server
|
|
||||||
socket zygote stream 666
|
socket zygote stream 666
|
||||||
write /sys/power/wake_lock always_on
|
|
||||||
onrestart write /sys/android_power/request_state wake
|
onrestart write /sys/android_power/request_state wake
|
||||||
onrestart write /sys/power/state on
|
onrestart write /sys/power/state on
|
||||||
onrestart restart media
|
onrestart restart media
|
||||||
|
onrestart restart netd
|
||||||
|
|
||||||
|
service drm /system/bin/drmserver
|
||||||
|
user drm
|
||||||
|
group system root inet
|
||||||
|
|
||||||
|
service drmio /system/bin/drmioserver
|
||||||
|
user drmio
|
||||||
|
|
||||||
service media /system/bin/mediaserver
|
service media /system/bin/mediaserver
|
||||||
user media
|
user media
|
||||||
|
Reference in New Issue
Block a user