OSDN Git Service
(root)
/
android-x86
/
bootable-newinstaller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86
[android-x86/bootable-newinstaller.git]
/
initrd
/
init
diff --git
a/initrd/init
b/initrd/init
index
34e935a
..
dd775e6
100755
(executable)
--- a/
initrd/init
+++ b/
initrd/init
@@
-3,8
+3,6
@@
# By Chih-Wei Huang <cwhuang@linux.org.tw>
# and Thorsten Glaser <tg@mirbsd.org>
#
# By Chih-Wei Huang <cwhuang@linux.org.tw>
# and Thorsten Glaser <tg@mirbsd.org>
#
-# Last updated 2018/01/26
-#
# License: GNU Public License
# We explicitely grant the right to use the scripts
# with Android-x86 project.
# License: GNU Public License
# We explicitely grant the right to use the scripts
# with Android-x86 project.
@@
-65,7
+63,8
@@
try_mount()
RW=$1; shift
if [ "${ROOT#*:/}" != "$ROOT" ]; then
# for NFS roots, use nolock to avoid dependency to portmapper
RW=$1; shift
if [ "${ROOT#*:/}" != "$ROOT" ]; then
# for NFS roots, use nolock to avoid dependency to portmapper
- RW="nolock,$RW"
+ mount -o $RW,noatime,nolock $@
+ return $?
fi
case $(blkid $1) in
*TYPE=*ntfs*)
fi
case $(blkid $1) in
*TYPE=*ntfs*)
@@
-95,7
+94,6
@@
check_root()
mount --move /mnt /iso
mkdir /mnt/iso
mount -o loop /iso/$iso /mnt/iso
mount --move /mnt /iso
mkdir /mnt/iso
mount -o loop /iso/$iso /mnt/iso
- SRC=iso
fi
if [ -e /mnt/$SRC/$RAMDISK ]; then
zcat /mnt/$SRC/$RAMDISK | cpio -id > /dev/null
fi
if [ -e /mnt/$SRC/$RAMDISK ]; then
zcat /mnt/$SRC/$RAMDISK | cpio -id > /dev/null
@@
-113,10
+111,10
@@
check_root()
elif [ -e /mnt/$SRC/system.img ]; then
remount_rw
mount -o loop,noatime /mnt/$SRC/system.img system
elif [ -e /mnt/$SRC/system.img ]; then
remount_rw
mount -o loop,noatime /mnt/$SRC/system.img system
- elif [ -
d /mnt/$SRC/system
]; then
+ elif [ -
s /mnt/$SRC/system/build.prop
]; then
remount_rw
mount --bind /mnt/$SRC/system system
remount_rw
mount --bind /mnt/$SRC/system system
- elif [ -
e
/mnt/build.prop ]; then
+ elif [ -
z "$SRC" -a -s
/mnt/build.prop ]; then
mount --bind /mnt system
else
rm -rf *
mount --bind /mnt system
else
rm -rf *
@@
-140,6
+138,7
@@
debug_shell()
if [ -x system/bin/sh ]; then
echo Running MirBSD Korn Shell...
USER="($1)" system/bin/sh -l 2>&1
if [ -x system/bin/sh ]; then
echo Running MirBSD Korn Shell...
USER="($1)" system/bin/sh -l 2>&1
+ [ $? -ne 0 ] && /bin/sh 2>&1
else
echo Running busybox ash...
sh 2>&1
else
echo Running busybox ash...
sh 2>&1
@@
-154,6
+153,7
@@
echo -n Detecting Android-x86...
for c in `cat /proc/cmdline`; do
case $c in
iso-scan/filename=*)
for c in `cat /proc/cmdline`; do
case $c in
iso-scan/filename=*)
+ SRC=iso
eval `echo $c | cut -b1-3,18-`
;;
*)
eval `echo $c | cut -b1-3,18-`
;;
*)
@@
-180,8
+180,8
@@
if [ -n "$INSTALL" ]; then
zcat /src/install.img | ( cd /; cpio -iud > /dev/null )
fi
zcat /src/install.img | ( cd /; cpio -iud > /dev/null )
fi
-if [ -x system/bin/ln -a
\( -n "$DEBUG" -o -n "$BUSYBOX" \)
]; then
- mv /bin /lib .
+if [ -x system/bin/ln -a
-n "$BUSYBOX"
]; then
+ mv
-f
/bin /lib .
sed -i 's|\( PATH.*\)|\1:/bin|' init.environ.rc
rm /sbin/modprobe
busybox mv /sbin/* sbin
sed -i 's|\( PATH.*\)|\1:/bin|' init.environ.rc
rm /sbin/modprobe
busybox mv /sbin/* sbin
@@
-196,7
+196,10
@@
for s in `ls /scripts/* /src/scripts/*`; do
done
# ensure keyboard driver is loaded
done
# ensure keyboard driver is loaded
-[ -n "$INSTALL" -o -n "$DEBUG" ] && auto_detect &
+if [ -n "$INSTALL" -o -n "$DEBUG" ]; then
+ busybox modprobe -a atkbd hid-apple
+ auto_detect &
+fi
if [ 0$DEBUG -gt 0 ]; then
echo -e "\nType 'exit' to continue booting...\n"
if [ 0$DEBUG -gt 0 ]; then
echo -e "\nType 'exit' to continue booting...\n"