Quote:
Originally Posted by Lmiller1708
Nope not yet... Just was able to see them.
How do we add the modules during the initramfs? I have a general Idea from the Rootfs, but I'm not getting it to work just yet...
|
I'm assuming you are using XDAndroid's initramfs. They do not mount data or system in initramfs, so you will have to manually add this to init. If you want to use NAND, you will do this and expand FRX04 to system:
Code:
/bin/mount -t yaffs2 /dev/block/mtdblock2 /system
/bin/mount -t yaffs2 /dev/block/mtdblock3 /data
If you want to do off the SD card, do this:
Code:
losetup /dev/block/loop0 $card/data.img
[ $? -eq 0 ] || fail "Failed to find $card/data.img on SD Card"
e2fsck -y /dev/block/loop0
mount -t ext2 -o relatime /dev/block/loop0 /data
losetup /dev/block/loop1 $card/system.ext2
[ $? -eq 0 ] || fail "Failed to reach system.ext2 on SD Card"
e2fsck -y /dev/block/loop1
mount -t ext2 -o relatime /dev/block/loop1 /system
Then you just need to mount lib and etc:
Code:
mount --bind /lib/froyo/hw /system/lib/hw
mount /data/etc /etc
cp -a /system/etc/* /etc
cp -ar /init.etc/* /etc/
cp "/init.cfg/init.$RCSCRIPT.rc" /etc/init.rc
Also, you may need this for CDMA board (put after the etc stuff):
Code:
if [ -d /sys/devices/platform/msm_sdcc.3 ]; then
/bin/sed -i -e 's:/devices/platform/msm_sdcc\.2:/devices/platform/msm_sdcc.3:g' /etc/vold.fstab
fi
And finally, you can use the code from rootfs to do the rest:
Code:
if [ -e "$card/modules-$(uname -r).tar.gz" ] && ! `strings /data/modules/wlan.ko 2>/dev/null | grep -q "vermagic=$(uname -r)"`; then
echo "Installing $card/modules-$(uname -r).tar.gz"
if [ ! -d "/data/modules" ] ; then
mkdir /data/modules
fi
tar xzf $card/modules-$(uname -r).tar.gz -C /data/modules
ln -s /data/modules /data/modules/`uname -r`
else
echo "Modules already unpacked for this kernel version -- skipping installation of $card/modules-$(uname -r).tar.gz"
fi
mount --bind /data/modules /lib/modules
mount --bind /data/modules /system/lib/modules
cp -R /etc/wifi/* /data/modules/
depmod
[ -f /etc/wifi/wlan.ko ] && rm /etc/wifi/wlan.ko
sed -i s/^#wifi/wifi/ /tmp/build.prop