summaryrefslogtreecommitdiffstats
path: root/init
Commit message (Collapse)AuthorAgeFilesLines
...
* load ro.recovery_id property from recovery partitionAndres Morales2015-05-084-1/+65
| | | | Change-Id: I9dc1f325e353375d9c1c8ed949636e2404601076
* stop including rootdir build.propAndres Morales2015-05-071-1/+0
| | | | | | merged with default.prop Change-Id: I18fcd37ddc63e3607278d0741181d0779118132d
* am ecf184c9: am 9c9280d8: Merge "init: get rid of the remaining double mounts"Nick Kralevich2015-04-263-43/+48
|\ | | | | | | | | * commit 'ecf184c901b78994773d687763c1478752e9375e': init: get rid of the remaining double mounts
| * init: get rid of the remaining double mountsNick Kralevich2015-04-253-43/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't double mount /dev and its subdirectories anymore. Instead, the first stage init is solely responsible for mounting it. Don't have init prepare the property space. This is the responsibility of the second stage init. Don't have SELinux use the property space to determine how we should be running. Instead, create a new function and extract the data we need directly from /proc/cmdline. SELinux needs this information in the first stage init process where the property service isn't available. Change-Id: I5b4f3bec79463a7381a68f30bdda78b5cc122a96
* | am 45a49d0e: am ccac2be8: Merge "init: use SELinux /dev/null if available"Nick Kralevich2015-04-261-14/+19
|\ \ | |/ | | | | | | * commit '45a49d0eb7e2e9fc3d2c48884c84f6a6c7397720': init: use SELinux /dev/null if available
| * init: use SELinux /dev/null if availableNick Kralevich2015-04-251-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SELinux provides it's own /dev/null character device at /sys/fs/selinux/null. This character device is exactly the same as /dev/null, including the same major/minor numbers, and can be used wherever /dev/null is used. Use /sys/fs/selinux/null instead of trying to create our own /dev/__null__ device. This moves us one step closer to eliminating all uses of mknod() by init. /sys/fs/selinux/null is only available once the /sys/fs/selinux filesystem is mounted. It's not available to the first stage init, so we still have to fall back to mknod then. Change-Id: Ic733767ea6220a130537de33cc478ae79578ce20
* | am b31c3a5a: am 178299fd: Merge "init: don\'t double mount /proc and /sys"Nick Kralevich2015-04-251-3/+8
|\ \ | |/ | | | | | | * commit 'b31c3a5a453cd9f472698068af9909e80a96ab2c': init: don't double mount /proc and /sys
| * Merge "init: don't double mount /proc and /sys"Nick Kralevich2015-04-251-3/+8
| |\
| | * init: don't double mount /proc and /sysNick Kralevich2015-04-251-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first stage init mounts /proc and /sys, and then the second stage init also mounts /proc and /sys on top of the existing mount. Only mount these two directories once, in the first stage init. Not yet fixed: the double mounting of /dev. Removing the double mounting doesn't work right now because both init stages are trying to create a property space, and if the double mount of /dev goes away, the property service in the second stage init fails to work. Change-Id: I13719027a47526d074390c2b1a605ad99fb43a8f
* | | am 6b6df173: am f8b0743e: Merge "init: fix write_file checkreqprot logic error"Nick Kralevich2015-04-252-8/+10
|\ \ \ | |/ / | | | | | | | | | * commit '6b6df1733711ace006e0f4f9d44c718f85d2f70d': init: fix write_file checkreqprot logic error
| * | init: fix write_file checkreqprot logic errorNick Kralevich2015-04-252-8/+10
| |/ | | | | | | | | | | | | | | | | write_file() returned -errno on error, not -1. Callers who check for -1 would falsely believe that the write was successful when it wasn't. Fixup write_file so that it return -1 on error consistent with other functions. Change-Id: Ic51aaf8678d8d97b2606bd171f11b3b11f642e39
* | am ecfb3664: am 8929c77a: Merge "init: remove mkdir /dev /proc /sys"Nick Kralevich2015-04-251-4/+0
|\ \ | |/ | | | | | | * commit 'ecfb3664fea6cbe39d94459ceb06a91f57006820': init: remove mkdir /dev /proc /sys
| * init: remove mkdir /dev /proc /sysNick Kralevich2015-04-251-4/+0
| | | | | | | | | | | | | | These directories are already present in the initial ramdisk, and these mkdir calls are no-ops. Change-Id: I528f9e96a3471de904845a2f9e09c1b6ff83a708
* | am ae3154e3: am 2899c94b: Merge "Switch init to epoll."Elliott Hughes2015-04-258-87/+60
|\ \ | |/ | | | | | | * commit 'ae3154e3968e991fb1e9a6b47bedd1e0819f7925': Switch init to epoll.
| * Switch init to epoll.Elliott Hughes2015-04-248-87/+60
| | | | | | | | | | | | | | | | | | | | | | Not just because it's what the cool kids are doing --- it also lets us simplify the inner loop and decouple it from whatever systems want to be woken to perform some activity if there's data to be read on some fd. Currently this is just used to clean up the existing signal handling, keychord, and property service code. Change-Id: I4d7541a2c4386957ad877df69e3be08b96a7dec5
* | am 0a4f0be2: am df5d4482: Merge "Clean up property service initialization."Elliott Hughes2015-04-252-43/+27
|\ \ | |/ | | | | | | * commit '0a4f0be2aaf697ca4b0938b31fc19bb007e87d0d': Clean up property service initialization.
| * Clean up property service initialization.Elliott Hughes2015-04-242-43/+27
| | | | | | | | | | | | | | | | | | | | | | All the code that was being delayed does is create a socket. We can do that straight away, avoid the overhead, and simplify our main loop. The keychord fd, on the other hand, seems a little tricky. It looks like /dev/keychord isn't immediately available, at least not on N9; we have to wait for ueventd to set us up the bomb. Change-Id: I020e75b8e4b233497707f0a3cbbb6038b714161f
* | am d503cc21: am b749be0b: Merge "Clean up init signal handling a little."Elliott Hughes2015-04-252-50/+46
|\ \ | |/ | | | | | | * commit 'd503cc21ec663b39e8d84feb373d3a287bb02d63': Clean up init signal handling a little.
| * Clean up init signal handling a little.Elliott Hughes2015-04-242-50/+46
| | | | | | | | | | | | | | We can set it up earlier, and error reporting like this helped me find the SELinux problem with the last change to this code. Change-Id: If0f38bc5ff0465c4030e2d39d34f31f49b2d8487
* | am bdf133de: am 662baefb: Merge "Setup signal handler before any exec command"Elliott Hughes2015-04-251-1/+3
|\ \ | |/ | | | | | | * commit 'bdf133de65a1fbb2d5e91fcd854d9824bcff4ea1': Setup signal handler before any exec command
| * Merge "Setup signal handler before any exec command"Elliott Hughes2015-04-251-1/+3
| |\
| | * Setup signal handler before any exec commandJohan Redestig2015-04-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes init deadlock when an exec command was called in an on-init section. The exec command handling relies on that the signal handler mechanism is working to know when to continue executing commands. Change-Id: Ib0ce75ffad7cf3bf926c93d0506b2fe3e5a92630
* | | am e6433c12: am a5669861: Merge "Revert "Revert "Remove now-unusable ↵Elliott Hughes2015-04-244-17/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | \'setcon\' command.""" * commit 'e6433c12456324812a9ea791da3bf462ee2476d7': Revert "Revert "Remove now-unusable 'setcon' command.""
| * | Revert "Revert "Remove now-unusable 'setcon' command.""Elliott Hughes2015-04-244-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b862bd00a4192d48c3ae82156d8c35b32283e9e4. This change was fine but an earlier change it depended on was broken. That change has been fixed and resubmitted. Bug: http://b/19702273 Change-Id: I17e565721026e48e2a73526f729f2481d4d6edb5
* | | am ec389902: am 132440b0: Merge "Revert "Revert "Make init re-exec itself ↵Elliott Hughes2015-04-241-14/+45
|\ \ \ | |/ / | | | | | | | | | | | | | | | for its SELinux domain transition.""" * commit 'ec389902980c88956ab8e3e630e3503cbb22d39b': Revert "Revert "Make init re-exec itself for its SELinux domain transition.""
| * | Revert "Revert "Make init re-exec itself for its SELinux domain transition.""Elliott Hughes2015-04-241-14/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4217374611ada50f33aee544f015f6f9dfbf7ced. It turns out that the kernel passes any unrecognized arguments on to init, and (at least) N6 and N9 have such arguments. My lazy check of argc was thus insufficient to recognize what stage of init we were in, so we'd skip to stage 2 and not set up SELinux. And apparently you can get a very long way with SELinux off... We'll fix that in a later change. Bug: 19702273 Change-Id: I43b3fb722fed35dd217cb529cbcac9a29aff4e4b
* | | am 92b82635: am 10936d1f: Merge "init: consider all platform devices for ↵Tom Cherry2015-04-241-10/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | find_platform_device" * commit '92b826357692988407018c5754584ef2da9e390e': init: consider all platform devices for find_platform_device
| * | init: consider all platform devices for find_platform_deviceTom Cherry2015-04-231-10/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain platforms list their platform devices with a path other than the current /devices or /devices/platform. Additionally, sometimes these paths are a platform device themselves. An example are devices with a path /devices/soc.0/... where /devices/soc.0 is also a platform devices. Instead of continuing to special case these path prefixes, we can consider the entire path, given that no mmc or usb devices create platform devices as subdevices, which they should not by their very nature. This keeps the symlinks for block devices named identically for current platform devices and places them in /dev/block/<full path to device> for devices in locations other than /devices or /devices/platform, eg /dev/block/platform/soc.0/7824900.sdhci This keeps the symlinks for character deviced named identically for all cases. Change-Id: Ifc8eedf1086db1826dbc8f7e96cdfcfa5da876b3
* | am 2db3cd3e: am 46fee19c: Merge "Revert "Make init re-exec itself for its ↵Nick Kralevich2015-04-241-45/+14
|\ \ | | | | | | | | | | | | | | | | | | SELinux domain transition."" * commit '2db3cd3e5e5957da4cf8429b7bbc9b6d36c934a5': Revert "Make init re-exec itself for its SELinux domain transition."
| * | Revert "Make init re-exec itself for its SELinux domain transition."Nick Kralevich2015-04-241-45/+14
| | | | | | | | | | | | | | | | | | | | | | | | shamu isn't booting. This reverts commit adf0d1bbfa4bc560c2106f14afa8258a11c48bf6. Change-Id: I89d568838cebbe14cc4a8ae3843f0f1ac54987af
* | | am ac699569: am f0b47920: Merge "Revert "Remove now-unusable \'setcon\' ↵Nick Kralevich2015-04-244-0/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | command."" * commit 'ac6995690a329fd07d434c7fce417d75b794df48': Revert "Remove now-unusable 'setcon' command."
| * | | Revert "Remove now-unusable 'setcon' command."Nick Kralevich2015-04-244-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporarily revert because device isn't booting. This reverts commit 7b15ac99f3bfef33c82ea109487c99a77b41ebfb. Change-Id: Ice986bac62e20c70f7bedf1744a617b97392ae8c
* | | | am 301691c2: am 659b7d63: Merge "Remove now-unusable \'setcon\' command."Elliott Hughes2015-04-244-17/+0
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit '301691c258cb7e1901eec835a55f227a5af8e5eb': Remove now-unusable 'setcon' command.
| * | | Remove now-unusable 'setcon' command.Elliott Hughes2015-04-234-17/+0
| |/ / | | | | | | | | | | | | Bug: http://b/19702273 Change-Id: Icd340c80ba074476dcc63f1c1dd5c61a5c768893
* | | am ef68fd3f: am d4656784: Merge "Make init re-exec itself for its SELinux ↵Elliott Hughes2015-04-241-14/+45
|\ \ \ | |/ / | | | | | | | | | | | | | | | domain transition." * commit 'ef68fd3f807438fd9aae3b8f104f3a85ef9eb699': Make init re-exec itself for its SELinux domain transition.
| * | Make init re-exec itself for its SELinux domain transition.Elliott Hughes2015-04-231-14/+45
| |/ | | | | | | Change-Id: I38adabe5789d671e3f7d21936071a758ec8cea8a
* | am 4048e091: am 710fd65e: Merge "Don\'t try to read /system/default.prop."Elliott Hughes2015-04-161-1/+0
|\ \ | |/ | | | | | | * commit '4048e0911244304e0d31cbc66531c26e99ee7752': Don't try to read /system/default.prop.
| * Don't try to read /system/default.prop.Elliott Hughes2015-04-151-1/+0
| | | | | | | | | | | | It doesn't exist. We use /system/build.prop. Change-Id: Ie635f9b3cc65de807f128339199b853db5a8eb2f
* | Merge "resolved conflicts for merge of 79f33846 to lmp-mr1-dev-plus-aosp" ↵Ed Tam2015-04-134-4/+6
|\ \ | |/ |/| | | into lmp-mr1-dev-plus-aosp
| * resolved conflicts for merge of 79f33846 to lmp-mr1-dev-plus-aospEd Tam2015-04-134-4/+6
| |\ | | | | | | | | | Change-Id: I24c60a2747931917a3ea09b953905ce0f4145280
| | * fs_mgr: introduce fs_mgr_format to format wiped partitionsChris Fries2015-04-104-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move fastboot's format logic into fs_mgr, to consolidate the knowledge about how to do this (and when to wipe metadata). Try to format these formattable paritions if they are wiped. If formatting fails, we will fall out to let recovery mode handle it. Bug: 20082763 Change-Id: I397cc197550e78d932e8a154fd234695c46dbe7b
| | * init: Fix memory corruption when sanitizing platform pathsChristopher R. Palmer2015-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes code that incorrectly increments s when it hits the terminator character of the string being sanitized. This means it will randomly start trashing memory beyond the end of the string being sanitized until it happens to hit two NULs (\0\0) which will break it out of the loop. (cherry picked from commit 07f3fee164bd7ba14ce9b2dd3818006f07162845) Bug: 18885357 Change-Id: If6b01fe2b9bd5985f08f1278deb03b311d0170dc
| | * property_service: Added vendor build properties to load_all_propsDaniel Rosenberg2014-11-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel Rosenberg <drosen@google.com> (cherry picked from commit b95122205dba535215ff6b011ef8009933c55d3b) Bug: 18281574 Change-Id: Id1f1c4e9e0d1bfbcae3995fb7966d18bf7d6e06d
* | | Fix memory leak in parse_actionTom Cherry2015-04-131-0/+7
|/ / | | | | | | Change-Id: I3ed1da5674ae0b4ac50c1925e4f63af7f1748483
* | Revert "Revert "fs_mgr_verity: Add support for squashfs""Mohamad Ayyash2015-04-081-0/+1
| | | | | | | | | | | | This reverts commit 7b97c7a3fa0f1bdae5b45a70f625ff48f9dab0c1. Change-Id: Id47e70479fe9247b7936f2e54d4dbfbb4f63f635
* | Merge "Revert "fs_mgr_verity: Add support for squashfs""Mohamad Ayyash2015-04-081-1/+0
|\ \
| * | Revert "fs_mgr_verity: Add support for squashfs"Mohamad Ayyash2015-04-081-1/+0
| | | | | | | | | | | | | | | | | | This reverts commit 807f47004f03653997edbe3c83d46350cb056cd4. Change-Id: I2d7972c0828c842b44747dd08fbe44668f2a55db
* | | Merge "fs_mgr_verity: Add support for squashfs"Mohamad Ayyash2015-04-081-0/+1
|\ \ \ | |/ /
| * | fs_mgr_verity: Add support for squashfsMohamad Ayyash2015-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Cleanup the code to get filesystem size in a block device - Add support to reading size of squashfs in a block device Change-Id: I3848a705ed4dc2fc9afad20331f0fdecfee545c5 Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
* | | Merge "Set verity mode as the verified property value"Sami Tolvanen2015-04-071-2/+3
|\ \ \ | |/ / |/| |