├── container.png ├── ubuntu_touch_architecture.png ├── ProposedArchitecture.md ├── ExistingArchitecture.md ├── Todo.md ├── lxc-system-config ├── README.md └── repodiff.patch /container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plasma-phone-packaging/CM/HEAD/container.png -------------------------------------------------------------------------------- /ubuntu_touch_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plasma-phone-packaging/CM/HEAD/ubuntu_touch_architecture.png -------------------------------------------------------------------------------- /ProposedArchitecture.md: -------------------------------------------------------------------------------- 1 | # Proposed Architecture 2 | 3 | - Cyanogenmod base, built with embedded target just adb and base items 4 | - Kernel with config options enabled to support lxc containers 5 | - Lxc container with KWin/Wayland and plasma mobile stuffs inside 6 | -------------------------------------------------------------------------------- /ExistingArchitecture.md: -------------------------------------------------------------------------------- 1 | # Current architecture of ubuntu touch 2 | 3 | ![Ubuntu touch Architecture](ubuntu_touch_architecture.png) 4 | 5 | ![Container Architecture](container.png) 6 | 7 | Stripping mir/unity stuffs as well as ubuntu libhybris, and installing upstream libhybris + kwin/wayland + plasma-mobile stuffs. Installing our own libhybris makes compat stuff available in android container effectively useless. As compat stuff is removed from upstream long ago. 8 | -------------------------------------------------------------------------------- /Todo.md: -------------------------------------------------------------------------------- 1 | # Todo items 2 | 3 | - [ ] Figure out deployment of lxc binaries 4 | - [ ] Document libhybris build requirements and stuff 5 | - [ ] Document some milestones 6 | - [ ] Write utility like ubuntu-device-flash for easier deployment 7 | - [x] investigate why stopping container messes up things 8 | - [x] investigate why qt binaries crashes 9 | - [x] investigate why input is not working 10 | - [ ] Remove surfaceflinger, messes with kwin and results in flicker 11 | -------------------------------------------------------------------------------- /lxc-system-config: -------------------------------------------------------------------------------- 1 | # this goes into /data/lxc/containers/system/config 2 | 3 | lxc.rootfs = /data/lxc/containers/system/rootfs 4 | lxc.utsname = armhf 5 | 6 | lxc.network.type = none 7 | lxc.mount.auto = cgroup 8 | 9 | lxc.devttydir = lxc 10 | lxc.pts = 1024 11 | lxc.arch = armhf 12 | 13 | lxc.kmsg = 0 14 | # todo, bind only required stuff 15 | lxc.mount.entry = /dev dev/ none bind,optional,create=dir 16 | lxc.mount.entry = /system system/ none bind,optional,create=dir 17 | lxc.mount.entry = /vendor vendor/ none bind,optional,create=dir 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CM 2 | 3 | rebase on CyanogenMod 4 | 5 | # Preparation 6 | 7 | - Get android/Cyanogenmod tree and setup devel env 8 | 9 | https://wiki.cyanogenmod.org/w/Build_for_hammerhead 10 | 11 | - Once initial build passes, flash $OUT/cm-....zip file with $OUT/recovery.img 12 | - Verify CM works 13 | 14 | ------ 15 | 16 | # Modify kernel to support all the features 17 | 18 | ``` 19 | CONFIG_CGROUP_DEVICE=y 20 | CONFIG_CPUSETS=y 21 | CONFIG_CGROUP_MEM_RES_CTLR=y 22 | CONFIG_CGROUP_PERF=y 23 | CONFIG_UTS_NS=y 24 | CONFIG_IPC_NS=y 25 | CONFIG_USER_NS=y 26 | CONFIG_PID_NS=y 27 | CONFIG_DEVPTS_MULTIPLE_INSTANCES=y 28 | ``` 29 | 30 | These are bare minimum to support containers, more can be required when we do further work 31 | 32 | once patched kernel config, 33 | 34 | ``` 35 | $ breakfast hammerhead 36 | including vendor/cm/vendorsetup.sh 37 | Looking for dependencies 38 | 39 | ============================================ 40 | PLATFORM_VERSION_CODENAME=REL 41 | PLATFORM_VERSION=5.1.1 42 | CM_VERSION= 43 | TARGET_PRODUCT=cm_hammerhead 44 | TARGET_BUILD_VARIANT=userdebug 45 | TARGET_BUILD_TYPE=release 46 | TARGET_BUILD_APPS= 47 | TARGET_ARCH=arm 48 | TARGET_ARCH_VARIANT=armv7-a-neon 49 | TARGET_CPU_VARIANT=krait 50 | TARGET_2ND_ARCH= 51 | TARGET_2ND_ARCH_VARIANT= 52 | TARGET_2ND_CPU_VARIANT= 53 | HOST_ARCH=x86_64 54 | HOST_OS=linux 55 | HOST_OS_EXTRA=Linux-4.5.0-1-ARCH-x86_64-with-glibc2.2.5 56 | HOST_BUILD_TYPE=release 57 | BUILD_ID=LMY49H 58 | OUT_DIR=/home/bshah/android/out 59 | ============================================ 60 | 61 | $ mka bootimage 62 | 63 | ``` 64 | 65 | - Once done, flash $OUT/boot.img and verify if it works 66 | 67 | # Stripping CM to bare minimum 68 | 69 | - Android provides embedded.mk file to setup really minimal android system 70 | 71 | https://android.googlesource.com/platform/build/+/master/target/product/embedded.mk 72 | 73 | - Adapt make files in device/lge/hammerhead to extend this instead of full-fleged phone system 74 | 75 | - And finally 76 | 77 | ``` 78 | $ brunch hammerhead 79 | ``` 80 | 81 | # Get lxc 82 | 83 | https://jenkins.linuxcontainers.org/view/LXC/view/LXC%20builds/job/lxc-build-android/ 84 | 85 | deploy it to /data 86 | 87 | # Create lxc container for pm rootfs 88 | 89 | http://mobile.neon.pangea.pub:8080/job/img_phone_xenial_armhf/lastSuccessfulBuild/artifact/result/livecd..rootfs.tar.gz 90 | 91 | - Create /data/lxc/containers/system/rootfs/ dir 92 | - Extract livecd..rootfs.tar.gz in /data/lxc/containers/system/rootfs/ dir 93 | 94 | - Create lxc config 95 | 96 | ``` 97 | root@hammerhead:/ # cat /data/lxc/containers/system/config 98 | lxc.rootfs = /data/lxc/containers/system/rootfs 99 | lxc.utsname = armhf 100 | 101 | lxc.network.type = none 102 | 103 | lxc.devttydir = lxc 104 | lxc.pts = 1024 105 | lxc.arch = armhf 106 | 107 | lxc.kmsg = 0 108 | lxc.mount.entry = /dev dev/ none bind,optional,create=dir 109 | lxc.mount.entry = /system system/ none bind,optional,create=dir 110 | lxc.mount.entry = /vendor vendor/ none bind,optional,create=dir 111 | ``` 112 | 113 | - Mount systemd and freezer cgroups 114 | 115 | ``` 116 | mkdir /sys/fs/cgroup/systemd/ 117 | busybox mount -n -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd/ 118 | mkdir /sys/fs/cgroup/freezer/ 119 | busybox mount -n -t cgroup -o none,name=freezer cgroup /sys/fs/cgroup/freezer/ 120 | 121 | ROOTFS=/data/lxc/containers/system/rootfs 122 | for i in $(busybox awk '!/^#/ { if ($4 == 1) print $1 }' /proc/cgroups); do 123 | if ! grep -q " $ROOTFS/$i " /proc/mounts; then 124 | mkdir -p $ROOTFS/$i 125 | busybox mount -n -t cgroup -o $i cgroup $ROOTFS/$i 126 | fi 127 | done 128 | 129 | ``` 130 | 131 | Then start container 132 | 133 | ``` 134 | export PATH=/data/lxc/lxc/bin:$PATH 135 | export LD_LIBRARY_PATH=/data/lxc/lxc/lib:$LD_LIBRARY_PATH 136 | root@hammerhead:/data/lxc/lxc # lxc-start -n system -F 137 | * Setting up X socket directories... 138 | ...done. 139 | 140 | Ubuntu Xenial Xerus (development branch) ubuntu-phablet console 141 | 142 | ubuntu-phablet login: phablet 143 | Last login: Wed May 12 08:39:00 UTC 1971 on lxc/console 144 | Welcome to Ubuntu Xenial Xerus (development branch) (GNU/Linux 3.4.0-cyanogenmod-g15e5a99-dirty armv7l) 145 | 146 | * Documentation: https://help.ubuntu.com/ 147 | phablet@ubuntu-phablet:~$ 148 | ``` 149 | 150 | # graphics and input 151 | 152 | ACTION=="add|change", KERNEL=="event[0-9]*", GROUP="android_input", MODE="0660", ENV{ID_INPUT_KEY}="1" 153 | 154 | 1. modify 65-android.rules udev rule as mentioned 155 | 2. sudo service udev start 156 | 3. sudo udevadm trigger --action=add 157 | 4. sudo service lightdm start 158 | 159 | - To start plasma-phone 160 | 161 | ``` 162 | sudo service lightdm start 163 | ``` 164 | 165 | # Bug: LXC container doesn't allow to console in 2nd time 166 | 167 | lxc-android-boot from lxc-android-config adds mount point for system and data partitions, however this breaks 2nd boot. To workaround, 168 | 169 | after rebooting 170 | 171 | ``` 172 | adb root 173 | adb shell 174 | rm /data/lxc/containers/system/rootfs/etc/init/lxc-android-boot.conf 175 | vi /data/lxc/containers/system/rootfs/etc/fstab 176 | ``` 177 | 178 | remove the all mount points that says added by lxc-android-boot except one with /vendor 179 | 180 | reboot phone 181 | 182 | **TODO** : document further 183 | -------------------------------------------------------------------------------- /repodiff.patch: -------------------------------------------------------------------------------- 1 | 2 | project bionic/ 3 | diff --git a/libc/bionic/libc_logging.cpp b/libc/bionic/libc_logging.cpp 4 | index 5655526..ffe91f6 100644 5 | --- a/libc/bionic/libc_logging.cpp 6 | +++ b/libc/bionic/libc_logging.cpp 7 | @@ -517,7 +517,7 @@ static int __libc_write_log(int priority, const char* tag, const char* msg) { 8 | vec[5].iov_base = const_cast(msg); 9 | vec[5].iov_len = strlen(msg) + 1; 10 | #else 11 | - int main_log_fd = TEMP_FAILURE_RETRY(open("/dev/log/main", O_CLOEXEC | O_WRONLY)); 12 | + int main_log_fd = TEMP_FAILURE_RETRY(open("/dev/alog/main", O_CLOEXEC | O_WRONLY)); 13 | if (main_log_fd == -1) { 14 | if (errno == ENOTDIR) { 15 | // /dev/log isn't a directory? Maybe we're running on the host? Try stderr instead. 16 | @@ -589,7 +589,7 @@ static int __libc_android_log_event(int32_t tag, char type, const void* payload, 17 | vec[2].iov_base = const_cast(payload); 18 | vec[2].iov_len = len; 19 | 20 | - int event_log_fd = TEMP_FAILURE_RETRY(open("/dev/log/events", O_CLOEXEC | O_WRONLY)); 21 | + int event_log_fd = TEMP_FAILURE_RETRY(open("/dev/alog/events", O_CLOEXEC | O_WRONLY)); 22 | #endif 23 | 24 | if (event_log_fd == -1) { 25 | diff --git a/libc/include/sys/_system_properties.h b/libc/include/sys/_system_properties.h 26 | index 0a842bd..ecfb3ac 100644 27 | --- a/libc/include/sys/_system_properties.h 28 | +++ b/libc/include/sys/_system_properties.h 29 | @@ -58,6 +58,8 @@ struct prop_msg 30 | }; 31 | 32 | #define PROP_MSG_SETPROP 1 33 | +#define PROP_MSG_GETPROP 2 34 | +#define PROP_MSG_LISTPROP 3 35 | 36 | /* 37 | ** Rules: 38 | diff --git a/libc/private/bionic_tls.h b/libc/private/bionic_tls.h 39 | index 56a61be..8960c49 100644 40 | --- a/libc/private/bionic_tls.h 41 | +++ b/libc/private/bionic_tls.h 42 | @@ -51,12 +51,12 @@ __BEGIN_DECLS 43 | enum { 44 | TLS_SLOT_SELF = 0, // The kernel requires this specific slot for x86. 45 | TLS_SLOT_THREAD_ID, 46 | - TLS_SLOT_ERRNO, 47 | + TLS_SLOT_ERRNO = 5, 48 | 49 | // These two aren't used by bionic itself, but allow the graphics code to 50 | // access TLS directly rather than using the pthread API. 51 | - TLS_SLOT_OPENGL_API = 3, 52 | - TLS_SLOT_OPENGL = 4, 53 | + TLS_SLOT_OPENGL_API = 6, 54 | + TLS_SLOT_OPENGL = 7, 55 | 56 | // This slot is only used to pass information from the dynamic linker to 57 | // libc.so when the C library is loaded in to memory. The C runtime init 58 | @@ -64,7 +64,7 @@ enum { 59 | // we reuse an existing location that isn't needed during libc startup. 60 | TLS_SLOT_BIONIC_PREINIT = TLS_SLOT_OPENGL_API, 61 | 62 | - TLS_SLOT_STACK_GUARD = 5, // GCC requires this specific slot for x86. 63 | + TLS_SLOT_STACK_GUARD = 8, // GCC requires this specific slot for x86. 64 | TLS_SLOT_DLERROR, 65 | 66 | TLS_SLOT_FIRST_USER_SLOT // Must come last! 67 | diff --git a/linker/linker.cpp b/linker/linker.cpp 68 | index 54867dc..55ca67a 100644 69 | --- a/linker/linker.cpp 70 | +++ b/linker/linker.cpp 71 | @@ -2401,11 +2401,11 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW( 72 | si->dynamic = nullptr; 73 | si->ref_count = 1; 74 | 75 | - ElfW(Ehdr)* elf_hdr = reinterpret_cast(si->base); 76 | - if (elf_hdr->e_type != ET_DYN) { 77 | - __libc_format_fd(2, "error: only position independent executables (PIE) are supported.\n"); 78 | - exit(EXIT_FAILURE); 79 | - } 80 | + //ElfW(Ehdr)* elf_hdr = reinterpret_cast(si->base); 81 | + //if (elf_hdr->e_type != ET_DYN) { 82 | + // __libc_format_fd(2, "error: only position independent executables (PIE) are supported.\n"); 83 | + // exit(EXIT_FAILURE); 84 | + //} 85 | 86 | // Use LD_LIBRARY_PATH and LD_PRELOAD (but only if we aren't setuid/setgid). 87 | parse_LD_LIBRARY_PATH(ldpath_env); 88 | 89 | project build/ 90 | diff --git a/target/product/embedded.mk b/target/product/embedded.mk 91 | index 2daa904..31a7e34 100644 92 | --- a/target/product/embedded.mk 93 | +++ b/target/product/embedded.mk 94 | @@ -51,8 +51,6 @@ PRODUCT_PACKAGES += \ 95 | libpower \ 96 | libstdc++ \ 97 | libstlport \ 98 | - libsurfaceflinger \ 99 | - libsurfaceflinger_ddmconnection \ 100 | libsysutils \ 101 | libui \ 102 | libutils \ 103 | @@ -66,7 +64,6 @@ PRODUCT_PACKAGES += \ 104 | service \ 105 | servicemanager \ 106 | sh \ 107 | - surfaceflinger \ 108 | toolbox \ 109 | libsigchain 110 | 111 | diff --git a/target/product/telephony.mk b/target/product/telephony.mk 112 | index 283875c..a92ed03 100644 113 | --- a/target/product/telephony.mk 114 | +++ b/target/product/telephony.mk 115 | @@ -18,9 +18,6 @@ 116 | # to products that have telephony hardware. 117 | 118 | PRODUCT_PACKAGES := \ 119 | - Dialer \ 120 | - InCallUI \ 121 | - Mms \ 122 | rild 123 | 124 | PRODUCT_COPY_FILES := \ 125 | 126 | project device/lge/hammerhead/ 127 | diff --git a/BoardConfig.mk b/BoardConfig.mk 128 | index a9f4b65..4a0711d 100644 129 | --- a/BoardConfig.mk 130 | +++ b/BoardConfig.mk 131 | @@ -26,7 +26,8 @@ TARGET_NO_BOOTLOADER := true 132 | BOARD_KERNEL_BASE := 0x00000000 133 | BOARD_KERNEL_PAGESIZE := 2048 134 | 135 | -BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 androidboot.bootdevice=msm_sdcc.1 136 | +BOARD_KERNEL_CMDLINE := console=tty0 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 androidboot.bootdevice=msm_sdcc.1 androidboot.selinux=permissive 137 | +#BOARD_KERNEL_CMDLINE := console=tty0 console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1 androidboot.bootdevice=msm_sdcc.1 138 | BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02900000 --tags_offset 0x02700000 139 | BOARD_KERNEL_IMAGE_NAME := zImage-dtb 140 | 141 | diff --git a/board-info.txt b/board-info.txt 142 | index 0c33ce5..1e0d521 100644 143 | --- a/board-info.txt 144 | +++ b/board-info.txt 145 | @@ -1,2 +1 @@ 146 | require board=hammerhead 147 | -require version-bootloader=HHZ12h 148 | diff --git a/cm.mk b/cm.mk 149 | index 2e8977d..e8ca350 100644 150 | --- a/cm.mk 151 | +++ b/cm.mk 152 | @@ -4,13 +4,18 @@ TARGET_SCREEN_WIDTH := 1080 153 | TARGET_BOOTANIMATION_HALF_RES := true 154 | 155 | # Inherit some common CM stuff. 156 | -$(call inherit-product, vendor/cm/config/common_full_phone.mk) 157 | +#$(call inherit-product, vendor/cm/config/common_full_phone.mk) 158 | 159 | # Enhanced NFC 160 | -$(call inherit-product, vendor/cm/config/nfc_enhanced.mk) 161 | +#$(call inherit-product, vendor/cm/config/nfc_enhanced.mk) 162 | + 163 | +# Inherit embedded configuration 164 | +$(call inherit-product, $(SRC_TARGET_DIR)/product/embedded.mk) 165 | +$(call inherit-product, ${SRC_TARGET_DIR}/product/telephony.mk) 166 | 167 | # Inherit device configuration 168 | -$(call inherit-product, device/lge/hammerhead/full_hammerhead.mk) 169 | +$(call inherit-product, device/lge/hammerhead/device.mk) 170 | +$(call inherit-product-if-exists, vendor/lge/hammerhead/hammerhead-vendor.mk) 171 | 172 | ## Device identifier. This must come after all inclusions 173 | PRODUCT_DEVICE := hammerhead 174 | @@ -19,6 +24,8 @@ PRODUCT_BRAND := google 175 | PRODUCT_MODEL := Nexus 5 176 | PRODUCT_MANUFACTURER := LGE 177 | 178 | +ANDROID_COMMON_BUILD_MK := false 179 | + 180 | PRODUCT_BUILD_PROP_OVERRIDES += \ 181 | PRODUCT_NAME=hammerhead \ 182 | BUILD_FINGERPRINT=google/hammerhead/hammerhead:5.1.1/LMY48M/2167285:user/release-keys \ 183 | diff --git a/fstab.hammerhead b/fstab.hammerhead 184 | index a582221..39455c1 100644 185 | --- a/fstab.hammerhead 186 | +++ b/fstab.hammerhead 187 | @@ -4,7 +4,7 @@ 188 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK 189 | 190 | /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait 191 | -/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata 192 | +/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata 193 | /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,nomblk_io_submit,noauto_da_alloc,errors=panic wait,check 194 | /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait 195 | /dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait 196 | diff --git a/init.hammerhead.rc b/init.hammerhead.rc 197 | index a08d015..e34c563 100644 198 | --- a/init.hammerhead.rc 199 | +++ b/init.hammerhead.rc 200 | @@ -138,7 +138,7 @@ on boot 201 | chown system system /sys/class/leds/green/on_off_ms 202 | chown system system /sys/class/leds/blue/on_off_ms 203 | chown system system /sys/class/leds/red/rgb_start 204 | - chmod 664 /sys/class/leds/lcd-backlight/brightness 205 | + chmod 666 /sys/class/leds/lcd-backlight/brightness 206 | 207 | on post-fs-data 208 | write /sys/kernel/boot_adsp/boot 1 209 | @@ -244,6 +244,7 @@ on post-fs-data 210 | chmod 0664 /sys/devices/virtual/graphics/fb0/rgb 211 | 212 | setprop vold.post_fs_data_done 1 213 | + start plasmalxc 214 | 215 | on charger 216 | # Booting modem 217 | @@ -322,6 +323,12 @@ on property:init.svc.bootanim=stopped 218 | on property:ro.debuggable=1 219 | start ssr_ramdump 220 | 221 | +service plasmalxc /data/lxc/containers/system/rootfs/sbin/init 222 | + user root 223 | + group root 224 | + oneshot 225 | + disabled 226 | + 227 | service rmt_storage /system/bin/rmt_storage 228 | class core 229 | user root 230 | 231 | project kernel/lge/hammerhead/ 232 | diff --git a/arch/arm/configs/cyanogenmod_hammerhead_defconfig b/arch/arm/configs/cyanogenmod_hammerhead_defconfig 233 | index 2ce6ca9..a81c1e3 100644 234 | --- a/arch/arm/configs/cyanogenmod_hammerhead_defconfig 235 | +++ b/arch/arm/configs/cyanogenmod_hammerhead_defconfig 236 | @@ -91,12 +91,12 @@ CONFIG_LOG_BUF_SHIFT=19 237 | CONFIG_CGROUPS=y 238 | CONFIG_CGROUP_DEBUG=y 239 | CONFIG_CGROUP_FREEZER=y 240 | -# CONFIG_CGROUP_DEVICE is not set 241 | -# CONFIG_CPUSETS is not set 242 | +CONFIG_CGROUP_DEVICE=y 243 | +CONFIG_CPUSETS=y 244 | CONFIG_CGROUP_CPUACCT=y 245 | CONFIG_RESOURCE_COUNTERS=y 246 | -# CONFIG_CGROUP_MEM_RES_CTLR is not set 247 | -# CONFIG_CGROUP_PERF is not set 248 | +CONFIG_CGROUP_MEM_RES_CTLR=y 249 | +CONFIG_CGROUP_PERF=y 250 | CONFIG_CGROUP_SCHED=y 251 | CONFIG_FAIR_GROUP_SCHED=y 252 | # CONFIG_CFS_BANDWIDTH is not set 253 | @@ -104,10 +104,10 @@ CONFIG_RT_GROUP_SCHED=y 254 | # CONFIG_BLK_CGROUP is not set 255 | # CONFIG_CHECKPOINT_RESTORE is not set 256 | CONFIG_NAMESPACES=y 257 | -# CONFIG_UTS_NS is not set 258 | -# CONFIG_IPC_NS is not set 259 | -# CONFIG_USER_NS is not set 260 | -# CONFIG_PID_NS is not set 261 | +CONFIG_UTS_NS=y 262 | +CONFIG_IPC_NS=y 263 | +CONFIG_USER_NS=y 264 | +CONFIG_PID_NS=y 265 | CONFIG_NET_NS=y 266 | # CONFIG_SCHED_AUTOGROUP is not set 267 | # CONFIG_SYSFS_DEPRECATED is not set 268 | @@ -822,7 +822,7 @@ CONFIG_IPV6_MULTIPLE_TABLES=y 269 | CONFIG_IPV6_SUBTREES=y 270 | # CONFIG_IPV6_MROUTE is not set 271 | # CONFIG_NETLABEL is not set 272 | -CONFIG_ANDROID_PARANOID_NETWORK=y 273 | +CONFIG_ANDROID_PARANOID_NETWORK=n 274 | CONFIG_NET_ACTIVITY_STATS=y 275 | CONFIG_NETWORK_SECMARK=y 276 | # CONFIG_NETWORK_PHY_TIMESTAMPING is not set 277 | @@ -1196,7 +1196,8 @@ CONFIG_NFC_BCM2079X=y 278 | # Generic Driver Options 279 | # 280 | CONFIG_UEVENT_HELPER_PATH="" 281 | -# CONFIG_DEVTMPFS is not set 282 | +CONFIG_DEVTMPFS=y 283 | +CONFIG_DEVTMPFS_MOUNT=y 284 | CONFIG_STANDALONE=y 285 | CONFIG_PREVENT_FIRMWARE_BUILD=y 286 | CONFIG_FW_LOADER=y 287 | @@ -1211,7 +1212,8 @@ CONFIG_REGMAP=y 288 | CONFIG_REGMAP_I2C=y 289 | CONFIG_REGMAP_SPI=y 290 | CONFIG_DMA_SHARED_BUFFER=y 291 | -# CONFIG_GENLOCK is not set 292 | +CONFIG_GENLOCK=y 293 | +CONFIG_GENLOCK_MISCDEVICE=y 294 | CONFIG_SYNC=y 295 | CONFIG_SW_SYNC=y 296 | # CONFIG_SW_SYNC_USER is not set 297 | @@ -1302,7 +1304,7 @@ CONFIG_QSEECOM=y 298 | # CONFIG_QFP_FUSE is not set 299 | CONFIG_QPNP_MISC=y 300 | CONFIG_TI_DRV2667=y 301 | -# CONFIG_EARJACK_DEBUGGER is not set 302 | +CONFIG_EARJACK_DEBUGGER=y 303 | CONFIG_FAN48632_BOOST=y 304 | # CONFIG_C2PORT is not set 305 | 306 | @@ -1491,7 +1493,7 @@ CONFIG_WLAN=y 307 | CONFIG_BCMDHD=y 308 | CONFIG_BCM4339=y 309 | CONFIG_BCMDHD_FW_PATH="/vendor/firmware/fw_bcmdhd.bin" 310 | -CONFIG_BCMDHD_NVRAM_PATH="/etc/wifi/bcmdhd.cal" 311 | +CONFIG_BCMDHD_NVRAM_PATH="/system/etc/wifi/bcmdhd.cal" 312 | # CONFIG_DHD_USE_STATIC_BUF is not set 313 | CONFIG_DHD_USE_SCHED_SCAN=y 314 | # CONFIG_BRCMFMAC is not set 315 | @@ -1664,7 +1666,7 @@ CONFIG_VT_CONSOLE_SLEEP=y 316 | CONFIG_HW_CONSOLE=y 317 | # CONFIG_VT_HW_CONSOLE_BINDING is not set 318 | CONFIG_UNIX98_PTYS=y 319 | -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set 320 | +CONFIG_DEVPTS_MULTIPLE_INSTANCES=y 321 | # CONFIG_LEGACY_PTYS is not set 322 | # CONFIG_SERIAL_NONSTANDARD is not set 323 | # CONFIG_N_GSM is not set 324 | @@ -2995,7 +2997,7 @@ CONFIG_ANDROID_RAM_CONSOLE=y 325 | CONFIG_PERSISTENT_TRACER=y 326 | CONFIG_ANDROID_TIMED_OUTPUT=y 327 | CONFIG_ANDROID_TIMED_GPIO=y 328 | -CONFIG_ANDROID_LOW_MEMORY_KILLER=y 329 | +CONFIG_ANDROID_LOW_MEMORY_KILLER=n 330 | CONFIG_ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES=y 331 | # CONFIG_ANDROID_SWITCH is not set 332 | # CONFIG_ANDROID_INTF_ALARM_DEV is not set 333 | 334 | project prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/ 335 | diff --git a/x86_64-linux/bin/ld b/x86_64-linux/bin/ld 336 | deleted file mode 100755 337 | index d05399c..0000000 338 | Binary files a/x86_64-linux/bin/ld and /dev/null differ 339 | diff --git a/x86_64-linux/bin/ld b/x86_64-linux/bin/ld 340 | new file mode 120000 341 | index 0000000..af8591b 342 | --- /dev/null 343 | +++ b/x86_64-linux/bin/ld 344 | @@ -0,0 +1 @@ 345 | +/usr/bin/ld.gold 346 | \ No newline at end of file 347 | 348 | project system/core/ 349 | diff --git a/rootdir/init.environ.rc.in b/rootdir/init.environ.rc.in 350 | index c32337a..9d91d60 100644 351 | --- a/rootdir/init.environ.rc.in 352 | +++ b/rootdir/init.environ.rc.in 353 | @@ -1,6 +1,6 @@ 354 | # set up the global environment 355 | on init 356 | - export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin 357 | + export PATH /data/lxc/lxc/bin:/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin 358 | export ANDROID_BOOTLOGO 1 359 | export ANDROID_ROOT /system 360 | export ANDROID_ASSETS /system/app 361 | @@ -8,6 +8,7 @@ on init 362 | export ANDROID_STORAGE /storage 363 | export ASEC_MOUNTPOINT /mnt/asec 364 | export LOOP_MOUNTPOINT /mnt/obb 365 | + export LD_LIBRARY_PATH /data/lxc/lxc/lib 366 | export BOOTCLASSPATH %BOOTCLASSPATH% 367 | export SYSTEMSERVERCLASSPATH %SYSTEMSERVERCLASSPATH% 368 | export LD_PRELOAD libsigchain.so%TARGET_LDPRELOAD% 369 | diff --git a/rootdir/init.rc b/rootdir/init.rc 370 | index 001ab13..c64f6a6 100644 371 | --- a/rootdir/init.rc 372 | +++ b/rootdir/init.rc 373 | @@ -64,6 +64,12 @@ on init 374 | chmod 0660 /sys/fs/cgroup/memory/sw/tasks 375 | chmod 0220 /sys/fs/cgroup/memory/cgroup.event_control 376 | 377 | + # Mount other cgroups 378 | + mkdir /sys/fs/cgroup/systemd 0750 root system 379 | + mount cgroup none /sys/fs/cgroup/systemd systemd 380 | + mkdir /sys/fs/cgroup/freezer 0750 root system 381 | + mount cgroup none /sys/fs/cgroup/freezer freezer 382 | + 383 | mkdir /system 384 | mkdir /data 0771 system system 385 | mkdir /cache 0770 system cache 386 | --------------------------------------------------------------------------------