forked from NookieDevs/android_device_bn_encore
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated ramdisk packers (convenient scripts for debugging)
- Loading branch information
fattire
committed
Nov 30, 2011
1 parent
f2292c2
commit 9d0d820
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# ramdisk_packer.sh | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# /system == p2 | ||
# /data == p3 | ||
# /cache == p5 | ||
# | ||
# run this script from $OUT -- basically the place you found it. The | ||
# resulting file "ramdisk.img" can be renamed "uRamdisk" and placed | ||
# in mmcblk0p1 -- the vfat /boot partition. | ||
# | ||
# if you get an error about "mkimage" not being found, you'll need to | ||
# . build/envsetup.sh | ||
|
||
if [ ! -f $(which mkimage) ]; then echo "Y U NO Have mkimage?"; exit 0; fi | ||
|
||
ROOT=root | ||
INIT=root/init.encore.rc | ||
|
||
cd $ROOT | ||
find . -regex "./.*"| cpio -ov -H newc | gzip > ../repacked-ramdisk.cpio.gz | ||
mkimage -A ARM -T RAMDisk -n Image -d ../repacked-ramdisk.cpio.gz ../ramdisk.img | ||
rm ../repacked-ramdisk.cpio.gz | ||
echo -e "\n\nTo install this ramdisk on your device, boot into your NC, then:\n\n" | ||
echo "adb shell" | ||
echo "mkdir -p /data/mnt" | ||
echo "mount -t vfat /dev/block/mmcblk0p1 /data/mnt" | ||
echo "exit" | ||
echo "adb push ramdisk.img /data/mnt/uRamdisk" | ||
echo "adb reboot" | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters