mirror of
https://github.com/gtxaspec/wz_mini_hacks.git
synced 2024-11-22 13:37:19 +00:00
update v2 initramfs script source
This commit is contained in:
parent
66031b41f5
commit
76a8490c00
@ -1,29 +1,43 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# devtmpfs does not get automounted for initramfs
|
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
|
# devtmpfs does not get automounted for initramfs
|
||||||
mount -t devtmpfs devtmpfs /dev
|
mount -t devtmpfs devtmpfs /dev
|
||||||
mount -t proc proc /proc
|
mount -t proc proc /proc
|
||||||
mount -t sysfs sysfs /sys
|
mount -t sysfs sysfs /sys
|
||||||
|
|
||||||
|
#Required delay on T20/T31
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
|
echo "Check for T20 platform"
|
||||||
|
|
||||||
|
if [ -b /dev/mtdblock10 ]; then
|
||||||
|
|
||||||
|
echo "Found T20"
|
||||||
|
|
||||||
|
#T20: Need to export the sd card enable gpio manually
|
||||||
echo 43 > /sys/class/gpio/export
|
echo 43 > /sys/class/gpio/export
|
||||||
echo in > /sys/class/gpio/gpio43/direction
|
echo in > /sys/class/gpio/gpio43/direction
|
||||||
|
|
||||||
#wait for sd card init
|
#T20: Insert required delay for sd card init
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Not T20"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p /sdcard
|
mkdir -p /sdcard
|
||||||
mount -t vfat /dev/mmcblk0p1 /sdcard -o rw,umask=0000,dmask=0000
|
mount -t vfat /dev/mmcblk0p1 /sdcard -o rw,umask=0000,dmask=0000
|
||||||
|
|
||||||
|
initram_init() {
|
||||||
|
|
||||||
mkdir /v3
|
mkdir /v3
|
||||||
mount -t squashfs /dev/mtdblock2 /v3
|
mount -t squashfs /dev/mtdblock2 /v3
|
||||||
|
|
||||||
if [ ! -f /sdcard/wz_mini/etc/init.d/v3_init.sh ]; then
|
if [ ! -f /sdcard/wz_mini/etc/init.d/v3_init.sh ]; then
|
||||||
|
|
||||||
echo "v3_init not found, booting stock"
|
echo "wz_mini not found, booting stock"
|
||||||
|
|
||||||
mount --move /dev /v3/dev
|
mount --move /dev /v3/dev
|
||||||
mount --move /sys /v3/sys
|
mount --move /sys /v3/sys
|
||||||
@ -33,9 +47,10 @@ umount /sdcard
|
|||||||
|
|
||||||
exec busybox switch_root /v3 /linuxrc
|
exec busybox switch_root /v3 /linuxrc
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
echo "Loading wz_mini..."
|
||||||
|
|
||||||
mkdir -p /v3/dev
|
mkdir -p /v3/dev
|
||||||
mkdir -p /v3/sys
|
mkdir -p /v3/sys
|
||||||
|
|
||||||
@ -51,3 +66,20 @@ mount --move /sdcard /v3/opt
|
|||||||
exec busybox switch_root /v3 /opt/wz_mini/etc/init.d/v3_init.sh
|
exec busybox switch_root /v3 /opt/wz_mini/etc/init.d/v3_init.sh
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -f /sdcard/wz_mini/wz_mini.conf ]; then
|
||||||
|
|
||||||
|
source /sdcard/wz_mini/wz_mini.conf
|
||||||
|
|
||||||
|
if [[ "$DEBUG_INITRAMFS_ENABLED" == "true" ]]; then
|
||||||
|
/bin/sh
|
||||||
|
#exit 0
|
||||||
|
else
|
||||||
|
echo "initramfs debug disabled"
|
||||||
|
initram_init
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
initram_init
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user