| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
read_file() used to append a new line character to the end of the buffer it
returns, because parse_config() isn't able to cope with input that's not
'\n'-terminated. Fix read_file() to be less insane, and push the workarounds
into the parse_config() callers.
Longer term we should rewrite parse_config().
Bug: http://b/21079470
Change-Id: Ie9d9a7adcd33b66621726aef20c4b8cc51c08be7
(cherry picked from commit eaa3b4ec6f79fe06163b8dd6fe8ba2581d3b9c0b)
|
|
|
|
|
|
|
|
|
|
|
| |
Useful for dynamic kernel module location.
This permits to use init rule like:
insmod ${persist.modules.location}/<module_name>
Change-Id: If7479bdcb4e69ea7666f52a0075c785be025c2e9
Signed-off-by: Emmanuel Berthier <emmanuel.berthier@intel.com>
(cherry picked from commit ac41230cbc10bae95a049282238adb03605579c2)
|
|
|
|
| |
Change-Id: I9dc1f325e353375d9c1c8ed949636e2404601076
|
|
|
|
|
|
| |
merged with default.prop
Change-Id: I18fcd37ddc63e3607278d0741181d0779118132d
|
|\
| |
| |
| |
| | |
* commit 'ecf184c901b78994773d687763c1478752e9375e':
init: get rid of the remaining double mounts
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| | |
* commit '45a49d0eb7e2e9fc3d2c48884c84f6a6c7397720':
init: use SELinux /dev/null if available
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| | |
* commit 'b31c3a5a453cd9f472698068af9909e80a96ab2c':
init: don't double mount /proc and /sys
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* commit '6b6df1733711ace006e0f4f9d44c718f85d2f70d':
init: fix write_file checkreqprot logic error
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| | |
* commit 'ecfb3664fea6cbe39d94459ceb06a91f57006820':
init: remove mkdir /dev /proc /sys
|
| |
| |
| |
| |
| |
| |
| | |
These directories are already present in the initial ramdisk, and
these mkdir calls are no-ops.
Change-Id: I528f9e96a3471de904845a2f9e09c1b6ff83a708
|
|\ \
| |/
| |
| |
| | |
* commit 'ae3154e3968e991fb1e9a6b47bedd1e0819f7925':
Switch init to epoll.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| | |
* commit '0a4f0be2aaf697ca4b0938b31fc19bb007e87d0d':
Clean up property service initialization.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| | |
* commit 'd503cc21ec663b39e8d84feb373d3a287bb02d63':
Clean up init signal handling a little.
|
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
| |
| |
| | |
* commit 'bdf133de65a1fbb2d5e91fcd854d9824bcff4ea1':
Setup signal handler before any exec command
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
\'setcon\' command."""
* commit 'e6433c12456324812a9ea791da3bf462ee2476d7':
Revert "Revert "Remove now-unusable 'setcon' command.""
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
for its SELinux domain transition."""
* commit 'ec389902980c88956ab8e3e630e3503cbb22d39b':
Revert "Revert "Make init re-exec itself for its SELinux domain transition.""
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
find_platform_device"
* commit '92b826357692988407018c5754584ef2da9e390e':
init: consider all platform devices for find_platform_device
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
SELinux domain transition.""
* commit '2db3cd3e5e5957da4cf8429b7bbc9b6d36c934a5':
Revert "Make init re-exec itself for its SELinux domain transition."
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
shamu isn't booting.
This reverts commit adf0d1bbfa4bc560c2106f14afa8258a11c48bf6.
Change-Id: I89d568838cebbe14cc4a8ae3843f0f1ac54987af
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
command.""
* commit 'ac6995690a329fd07d434c7fce417d75b794df48':
Revert "Remove now-unusable 'setcon' command."
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Temporarily revert because device isn't booting.
This reverts commit 7b15ac99f3bfef33c82ea109487c99a77b41ebfb.
Change-Id: Ice986bac62e20c70f7bedf1744a617b97392ae8c
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* commit '301691c258cb7e1901eec835a55f227a5af8e5eb':
Remove now-unusable 'setcon' command.
|
| |/ /
| | |
| | |
| | |
| | | |
Bug: http://b/19702273
Change-Id: Icd340c80ba074476dcc63f1c1dd5c61a5c768893
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
domain transition."
* commit 'ef68fd3f807438fd9aae3b8f104f3a85ef9eb699':
Make init re-exec itself for its SELinux domain transition.
|
| |/
| |
| |
| | |
Change-Id: I38adabe5789d671e3f7d21936071a758ec8cea8a
|
|\ \
| |/
| |
| |
| | |
* commit '4048e0911244304e0d31cbc66531c26e99ee7752':
Don't try to read /system/default.prop.
|
| |
| |
| |
| |
| |
| | |
It doesn't exist. We use /system/build.prop.
Change-Id: Ie635f9b3cc65de807f128339199b853db5a8eb2f
|
|\ \
| |/
|/|
| | |
into lmp-mr1-dev-plus-aosp
|
| |\
| | |
| | |
| | | |
Change-Id: I24c60a2747931917a3ea09b953905ce0f4145280
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Daniel Rosenberg <drosen@google.com>
(cherry picked from commit b95122205dba535215ff6b011ef8009933c55d3b)
Bug: 18281574
Change-Id: Id1f1c4e9e0d1bfbcae3995fb7966d18bf7d6e06d
|
|/ /
| |
| |
| | |
Change-Id: I3ed1da5674ae0b4ac50c1925e4f63af7f1748483
|
| |
| |
| |
| |
| |
| | |
This reverts commit 7b97c7a3fa0f1bdae5b45a70f625ff48f9dab0c1.
Change-Id: Id47e70479fe9247b7936f2e54d4dbfbb4f63f635
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 807f47004f03653997edbe3c83d46350cb056cd4.
Change-Id: I2d7972c0828c842b44747dd08fbe44668f2a55db
|
|\ \ \
| |/ / |
|