8 /bin/mount -o remount,rw / /
10 PATH=/sbin:/system/sbin:/bin:/system/bin:/system/xbin:/system/xbin/bb:/data/local/bin
12 /bin/echo "Rootfs loaded."
14 /bin/mount -t proc proc /proc
15 /bin/mount -t sysfs sys /sys
20 if [ $notnand = "0" ] ; then
21 echo "running from NAND"
22 /bin/mount -t yaffs2 /dev/block/mtdblock2 /system
23 /bin/mount -t yaffs2 /dev/block/mtdblock3 /data
28 # Try unpartitioned card
29 if [ ! -d /sys/block/mmcblk0/$partition ] ; then
33 if [ -f /sys/class/vogue_hw/gsmphone ] ; then
34 echo "GSM phone found"
37 #mkdir -m 0777 /sdcard
38 #fsck already done in initrd
39 mount -t vfat -o fmask=0000,dmask=0000,rw,flush,relatime,utf8 /dev/block/$partition /sdcard
40 [ $? -eq 0 ] || fail "Failed to mount the SD card. Cannot continue."
42 if [ ! -d /sdcard/cache ] ; then
47 mount /sdcard/cache /cache
49 CARD_PATH=`/bin/grep -o "rel_path=.*" /proc/cmdline | /bin/sed -e "s/.*rel_path=//g" -e "s/ .*//g"`
50 if [ "$CARD_PATH" = "" ];then
53 if [ -d /sdcard/$CARD_PATH ] ; then
54 card=/sdcard/$CARD_PATH
60 if [ $notnand = "1" ] ; then
62 if [ -f $card/data.gz ] ; then
63 echo "Please wait... extracting Data Image"
64 if [ -f $card/data.img ] ; then
67 gzip -df $card/data.gz
68 [ $? -eq 0 ] || fail "Failed to extract Data Image"
69 mv $card/data $card/data.img
73 if [ -d /sys/block/mmcblk0/mmcblk0p4 ] && /bin/grep -q -v no_partitions /proc/cmdline ; then
74 echo "Using partitioned system"
75 /bin/e2fsck -y /dev/block/mmcblk0p3
76 mount -t ext2 -o ro,relatime /dev/block/mmcblk0p3 /system
77 /bin/e2fsck -y /dev/block/mmcblk0p4
78 mount -t ext2 -o relatime /dev/block/mmcblk0p4 /data
80 echo "Using loopback filesystems"
81 if [ ! -f $card/data.img ] ; then
82 echo "Creating a new Data store"
83 dd if=/dev/zero of=$card/data.img bs=1048576 count=256
84 [ $? -eq 0 ] || fail "Failed to allocate the storage"
85 mke2fs -F $card/data.img
86 [ $? -eq 0 ] || fail "Failed to format the storage"
89 losetup /dev/block/loop0 $card/data.img
90 [ $? -eq 0 ] || fail "Failed to find data.img on SD Card"
91 e2fsck -y /dev/block/loop0
92 mount -t ext2 -o relatime /dev/block/loop0 /data
94 if [ -f $card/system.ext2 ] ; then
95 echo "Using uncompressed system"
96 losetup /dev/block/loop1 $card/system.ext2
97 [ $? -eq 0 ] || fail "Failed to reach system.ext2 on SD Card"
98 e2fsck -y /dev/block/loop1
99 mount -t ext2 -o relatime /dev/block/loop1 /system
100 [ $? -eq 0 ] || fail "Failed to mount /system"
102 [ -f $card/system.sqsh ] ; then
103 echo "Using SquashFS system"
104 losetup /dev/block/loop1 $card/system.sqsh
105 [ $? -eq 0 ] || fail "Failed to find system.sqsh on SD Card"
106 mount -t squashfs -o ro,relatime /dev/block/loop1 /system
107 [ $? -eq 0 ] || fail "Failed to mount /system"
110 losetup /dev/block/loop1 $card/system.img
111 [ $? -eq 0 ] || fail "Failed to find system.img on SD Card"
112 mount -t cramfs -o ro,relatime /dev/block/loop1 /system
113 [ $? -eq 0 ] || fail "Failed to mount /system"
118 if [ -f "$card/update.zip" ] && [ ! -f "/sdcard/cache/recovery/intent" ] && [ -z "$SQUASH" ]
120 RECOVERYCARD=$(echo $card | sed -e 's:/sdcard/:SDCARD\::')
122 echo "STARTING OTA UPDATE SYSTEM"
123 cp /init.cfg/init.recovery.rc /etc/init.rc
124 mkdir /cache/recovery
125 echo "--update_package=${RECOVERYCARD}/update.zip" >/cache/recovery/command
126 echo "--send_intent=complete" >>/cache/recovery/command
130 # If not updating, ensure old recovery.intent and update.zip files are removed so we can update again later.
131 rm -f /sdcard/cache/recovery/intent
132 rm -f $card/update.zip
134 if [ -d $card/AndroidApps ] ; then
135 echo Copying Applications
136 if [ ! -d /data/app ] ; then
137 mkdir -m 0771 /data/app
139 /bin/cp $card/AndroidApps/* /data/app
140 chown -R 1000:1000 /data/app
143 if [ ! -d $card/media ] ; then
144 echo You have no media folder, please extract the resources to your SD card android folder
150 if [ ! -d /data/etc ]; then
151 /bin/mkdir -m 0755 /data/etc
152 /bin/mkdir -p -m 0700 /data/mnt/secure
153 # /bin/mkdir -p -m 0700 /data/mnt/asec
154 mkdir -m 0770 /data/shared_prefs
155 chown 1000:1000 /data/shared_prefs
159 CHK_SYS=etc/event-log-tags
160 if [ ! -f /data/$CHK_SYS -o /system/$CHK_SYS -nt /data/$CHK_SYS ]; then
163 CHK_ROOT=etc/wifi/Fw1251r1c.bin
164 if [ ! -f /data/$CHK_ROOT -o /init.$CHK_ROOT -nt /data/$CHK_ROOT ]; then
169 mount --bind /data/mnt/secure /mnt/secure
170 #mount --bind /data/mnt/asec /mnt/asec
171 mount /data/shared_prefs /shared_prefs
173 if [ $NEW_SYSTEM -eq 1 ]; then
174 cp -ar /system/etc/* /data/etc
176 if [ $NEW_ROOT -eq 1 ]; then
177 cp -ar /init.etc/* /data/etc
182 LCDDENSITY=`/bin/grep -o "lcd.density=.*" /proc/cmdline | /bin/sed -e "s/.*lcd.density=//g" -e "s/ .*//g"`
184 if [ "$LCDDENSITY" != "" ] ; then
185 DENS2=`grep lcd_density /etc/default.prop | sed -e 's/.*=//'`
186 if [ "$LCDDENSITY" != "$DENS2" ]; then
187 echo Setting ro.sf.lcd_density=$LCDDENSITY
188 if [ -z "$DENS2" ]; then
189 echo "ro.sf.lcd_density=$LCDDENSITY" >> /etc/default.prop
191 sed -i /lcd_density/s/=.*/=$LCDDENSITY/ /etc/default.prop
196 mount /sdcard/cache /tmp
205 HW=`cat /proc/cpuinfo | grep Hardware`
208 echo "KAISER detected"
214 echo "POLARIS detected"
220 echo "DIAMOND detected"
226 echo "RAPHAEL detected"
232 echo "BLACKSTONE detected"
239 echo "TOPAZ detected"
246 echo "XPERIA detected"
253 echo "RHODIUM detected"
260 echo "VOGUE detected"
265 ### Fix su on some builds...
266 mount --bind /bin/su /system/bin/su 2> /dev/null
267 mount --bind /bin/su /system/xbin/su 2> /dev/null
272 echo "Checking for build type..."
273 if [ -f /system/hero.build ] ; then
274 echo "Hero build detected"
277 ln /data/app_s /system/app
279 elif [ -f /system/eclairhero.build ] ; then
280 echo "HERO 2.1 BUILD DETECTED -- ECLAIR"
281 RCSCRIPT="eclairhero"
282 RCCONFIG="eclairhero"
283 mount --bind /lib/eclair/hw /system/lib/hw
285 elif [ -f /system/eclair.build ] ; then
286 echo "Eclair build detected"
289 mount --bind /lib/eclair/hw /system/lib/hw
291 elif [ -f /system/froyo.build ] ; then
292 echo "Froyo build detected"
295 mount --bind /lib/froyo/hw /system/lib/hw
297 # vold: Fix sdcard device location for CDMA boards (thanks paalsteek)
298 if [ $NEW_SYSTEM -eq 1 -a -d /sys/devices/platform/msm_sdcc.3 ]; then
299 /bin/sed -i -e 's:/devices/platform/msm_sdcc\.2:/devices/platform/msm_sdcc.3:g' /etc/vold.fstab
302 elif [ -f /system/gingerbread.build ] ; then
303 echo "Gingerbread build detected"
304 RCSCRIPT="gingerbread"
305 RCCONFIG="gingerbread"
307 # vold: Fix sdcard device location for CDMA boards (thanks paalsteek)
308 if [ $NEW_SYSTEM -eq 1 -a -d /sys/devices/platform/msm_sdcc.3 ]; then
309 /bin/sed -i -e 's:/devices/platform/msm_sdcc\.2:/devices/platform/msm_sdcc.3:g' /etc/vold.fstab
312 elif [ -f /system/tattoo.build ] ; then
313 echo "Tattoo build detected"
317 elif [ -f /system/donut.build ] ; then
318 echo "Donut build detected"
321 mount --bind /lib/donut/hw /system/lib/hw
323 elif [ -d /system/lib/donut ] ; then
324 echo "Donut build detected"
328 elif [ -f /system/xrom.build ] ; then
329 echo "xROM build detected"
333 elif [ -f /system/rogers.build ] ; then
334 echo "Rogers build detected"
338 elif [ -f /system/cyanogen.build ] ; then
339 echo "cyanogen experimental detected.....eating donuts"
343 elif [ -f /system/custom.build ] ; then
344 echo "Custom init.rc detected"
345 cp /system/sysinit.rc /build.cfg/init.sysinit.rc
350 echo "Unknown Android build. Assuming Ion variant"
354 # for the fake sensors library
355 mount /lib/hw /system/lib/hw -o loop
356 chmod 666 /dev/input/event0
358 if [ $DIAMOND -eq 1 ] ; then
359 RCCONFIG="ion.diamond"
363 if [ $KAISER -eq 1 ] ; then
364 RCSCRIPT="$RCSCRIPT.kaiser"
367 if [ $NEW_ROOT -eq 1 -a $XPERIA -eq 1 ] ; then
368 echo "ro.sf.hwrotation=180" >> /etc/default.prop
370 echo "using /init.$RCSCRIPT.rc as init.rc"
371 echo "using $card/conf/$RCCONFIG.user.conf"
373 if [ $NEW_ROOT -eq 1 ]; then
374 cp "/init.cfg/init.$RCSCRIPT.rc" /etc/init.rc
377 #Assume this rootfs.img will be used only on "good" devices
378 #Meaning raph/diam/blac/
380 # echo /dev/block/mmcblk0p2 > /sys/devices/platform/usb_mass_storage/lun0/file
381 ifconfig usb0 192.168.20.1 up
382 busybox telnetd -b 192.168.20.1 -l /bin/sh
384 #mkdir -m 0777 /smodem
385 mknod /dev/urandom c 1 9
386 if [ -d /data/dropbear/ ] ; then
388 mknod /dev/random c 1 8
389 /bin/dropbear -r /data/dropbear/dropbear_rsa_host_key -s
392 if [ "$WIFI_TI" = "1" ] || [ "$WIFI_BCM" = "1" ];then
393 if [ -e "$card/modules-$(uname -r).tar.gz" ] && ! `strings /data/modules/mac80211.ko 2>/dev/null | grep -q "vermagic=$(uname -r)"`; then
394 echo "Installing $card/modules-$(uname -r).tar.gz"
395 if [ ! -d "/data/modules" ] ; then
398 tar xzf $card/modules-$(uname -r).tar.gz -C /data/modules
399 ln -s /data/modules /data/modules/`uname -r`
401 echo "Modules already unpacked for this kernel version -- skipping installation of $card/modules-$(uname -r).tar.gz"
404 mount --bind /data/modules /lib/modules
405 mount --bind /data/modules /system/lib/modules
407 if [ -f /etc/wifi/wlan.ko ]; then
408 cp -R /etc/wifi/* /data/modules/
413 if [ "`grep -c ^wifi /etc/default.prop`" != "2" ]; then
414 echo "wifi.interface = wlan0" >> /etc/default.prop
415 echo "wifi.supplicant_scan_interval = 45" >> /etc/default.prop
419 if [ -f /system/eclair.build ]
421 mount --bind /lib/eclair/libhardware_legacy.so /system/lib/libhardware_legacy.so
424 # fix PPP data device name
425 if [ $NEW_ROOT -eq 1 ]; then
426 if [ -f /dev/smd7 ]; then
431 sed -i s,PPPDEV,$PPPDEV, /etc/init.rc
434 if [ "$WIFI_TI" = "1" ];then
435 ip link set dev tiwlan0 name wlan0
438 if [ "$WIFI_BCM" = "1" ] ;then
439 ip link set dev eth0 name wlan0
441 # fyi: firmware is loaded from /etc/wifi/bcm432x/bcm4325-rtecdc.bin, nvram from /data/wifi-nvram.txt
443 if [ $NEW_ROOT -eq 1 ]; then
444 # init.rc: fix wpa_supplicant service
445 sed -i s/-Dtiwlan0/-Dwext/ /etc/init.rc
448 sed -i s/user\ wifi/#user\ wifi/ /etc/init.rc
449 sed -i s/group\ wifi/#group\ wifi/ /etc/init.rc
452 # extract nvram (todo: clean this up/integrate with TI calibration)
453 if [ ! -e /data/wifi-nvram.txt ]; then
454 for SKIP in 5744 4736;do
455 insmod /lib/modules/mtdchar.ko
456 mknod /dev/mtd0ro c 90 1
457 mkdir /lib/modules/$(uname -r)
459 dd if=/dev/mtd0ro of=/tmp/tempcal bs=8192 count=1 skip=$SKIP
462 rmdir /lib/modules/$(uname -r)
463 dd if=/tmp/tempcal of=/data/wifi-nvram.txt bs=1 count=466
466 if grep nocrc= /data/wifi-nvram.txt 2>&1 > /dev/null;then
470 if [ "$SKIP" = "5744" ];then
471 echo "CDMA Rhodium detected"
473 if [ "$SKIP" = "4736" ];then
474 echo "GSM Rhodium detected"
480 if [ -f "$card/conf/$RCCONFIG.user.conf" ]; then
481 /bin/userinit.sh -c "$card/conf/$RCCONFIG.user.conf"
483 echo "No user config files ($RCCONFIG) found on sdcard"
486 mount -tdebugfs none /dbgfs
487 #Activate baclight control
488 echo 3 > /sys/class/htc_hw/test
490 echo 40 >/sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
491 #Activate full charging
492 echo 2 > /dbgfs/htc_battery/charger_state
494 echo 1024 > /dbgfs/micropklt_dbg/sleep_leds
496 if /bin/grep -c 'physkeyboard=fuze' /proc/cmdline >/dev/null ; then
497 echo "USING RAPH110|FUZE LAYOUT"
498 cp -f /init.etc/keymaps/fuze_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
499 cp -f /init.etc/keymaps/fuze_microp-keypad.kl /etc/keymaps/microp-keypad.kl
500 cp -f /init.etc/keymaps/fuze_raph_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
501 elif /bin/grep -c 'physkeyboard=raph' /proc/cmdline >/dev/null ; then
502 echo "USING NEW RAPH LAYOUT"
503 cp -f /init.etc/keymaps/raphfix_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
504 elif /bin/grep -c 'physkeyboard=nordic_raph' /proc/cmdline >/dev/null ; then
505 echo "USING NEW NORDIC RAPH LAYOUT"
506 cp -f /init.etc/keymaps/raphfix_microp-keypad-swedish.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
507 elif /bin/grep -c 'physkeyboard=german_raph' /proc/cmdline >/dev/null ; then
508 echo "USING NEW GERMAN RAPH LAYOUT"
509 cp -f /init.etc/keymaps/microp-german.keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
510 elif /bin/grep -c 'physkeyboard=swiss_raph' /proc/cmdline >/dev/null ; then
511 echo "USING NEW SWISS RAPH LAYOUT"
512 cp -f /init.etc/keymaps/microp-swiss.keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
513 elif /bin/grep -c 'physkeyboard=tilt2' /proc/cmdline >/dev/null ; then
514 echo "USING EXPERIMENTAL TILT2 LAYOUT"
515 cp -f /init.etc/keymaps/tilt2_microp-keypad.kl /etc/keymaps/microp-keypad.kl
516 cp -f /init.etc/keymaps/tilt2_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
517 cp -f /init.etc/keymaps/tilt2_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
518 elif /bin/grep -c 'physkeyboard=rhod210' /proc/cmdline >/dev/null ; then
519 echo "USING EXPERIMENTAL RHOD210 LAYOUT"
520 cp -f /init.etc/keymaps/rhod210_microp-keypad.kl /etc/keymaps/microp-keypad.kl
521 cp -f /init.etc/keymaps/rhod210_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
522 cp -f /init.etc/keymaps/rhod210_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
523 elif /bin/grep -c 'physkeyboard=rhod100_de' /proc/cmdline >/dev/null ; then
524 echo "USING RHOD100 DE LAYOUT"
525 cp -f /init.etc/keymaps/rhod100_de_microp-keypad.kl /etc/keymaps/microp-keypad.kl
526 cp -f /init.etc/keymaps/rhod100_de_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
527 cp -f /init.etc/keymaps/rhod100_de_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
528 elif /bin/grep -c 'physkeyboard=rhod100_fr' /proc/cmdline >/dev/null ; then
529 echo "USING RHOD100 FR LAYOUT"
530 cp -f /init.etc/keymaps/rhod100_fr_microp-keypad.kl /etc/keymaps/microp-keypad.kl
531 cp -f /init.etc/keymaps/rhod100_fr_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
532 cp -f /init.etc/keymaps/rhod100_fr_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
533 elif /bin/grep -c 'physkeyboard=rhod100_it' /proc/cmdline >/dev/null ; then
534 echo "USING RHOD100 IT LAYOUT"
535 cp -f /init.etc/keymaps/rhod100_it_microp-keypad.kl /etc/keymaps/microp-keypad.kl
536 cp -f /init.etc/keymaps/rhod100_it_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
537 cp -f /init.etc/keymaps/rhod100_it_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
538 elif /bin/grep -c 'physkeyboard=rhod100_uk' /proc/cmdline >/dev/null ; then
539 echo "USING RHOD100 UK LAYOUT"
540 cp -f /init.etc/keymaps/rhod100_uk_microp-keypad.kl /etc/keymaps/microp-keypad.kl
541 cp -f /init.etc/keymaps/rhod100_uk_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
542 cp -f /init.etc/keymaps/rhod100_uk_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
543 elif /bin/grep -c 'physkeyboard=rhod100_nordic' /proc/cmdline >/dev/null ; then
544 echo "USING RHOD100 NORDIC LAYOUT"
545 cp -f /init.etc/keymaps/rhod100_nordic_microp-keypad.kl /etc/keymaps/microp-keypad.kl
546 cp -f /init.etc/keymaps/rhod100_nordic_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
547 cp -f /init.etc/keymaps/rhod100_nordic_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
548 elif /bin/grep -c 'physkeyboard=rhod400' /proc/cmdline >/dev/null ; then
549 echo "USING EXPERIMENTAL RHOD400 LAYOUT"
550 cp -f /init.etc/keymaps/rhod400_microp-keypad.kl /etc/keymaps/microp-keypad.kl
551 cp -f /init.etc/keymaps/rhod400_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
552 cp -f /init.etc/keymaps/rhod400_navi_pad.kl /etc/keymaps/raph_navi_pad.kl #does not exist, just following example
553 elif /bin/grep -c 'physkeyboard=rhod500' /proc/cmdline >/dev/null ; then
554 echo "USING EXPERIMENTAL RHOD500 LAYOUT"
555 cp -f /init.etc/keymaps/rhod500_microp-keypad.kl /etc/keymaps/microp-keypad.kl
556 cp -f /init.etc/keymaps/rhod500_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
557 cp -f /init.etc/keymaps/rhod500_navi_pad.kl /etc/keymaps/raph_navi_pad.kl #does not exist, just following example
558 elif /bin/grep -c 'physkeyboard=kovsq' /proc/cmdline >/dev/null ; then
559 echo "USING KOVSKY QWERTY LAYOUT"
560 cp -f /init.etc/keymaps/kovsky-qwerty.kl /etc/keymaps/microp-keypad.kl
561 cp -f /init.etc/keymaps/kovsky-qwerty.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
562 elif /bin/grep -c 'physkeyboard=kovsa' /proc/cmdline >/dev/null; then
563 echo "USING KOVSKY AZERTY LAYOUT"
564 cp -f /init.etc/keymaps/kovsky-azerty.kl /etc/keymaps/microp-keypad.kl
565 cp -f /init.etc/keymaps/kovsky-azerty.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
567 echo "USING OLD KEYMAP"
568 cp -f /init.etc/keymaps/oldqwerty_microp-keypad.kcm.bin /etc/keymaps/microp-keypad.kcm.bin
569 cp -f /init.etc/keymaps/oldqwerty_microp-keypad.kl /etc/keymaps/microp-keypad.kl
570 cp -f /init.etc/keymaps/oldqwerty_raph_navi_pad.kl /etc/keymaps/raph_navi_pad.kl
573 cp -af /init.etc/keymaps/qwerty.kcm.bin /init.etc/keymaps/qwerty.kl /etc/keymaps/
574 mount --bind /etc/keymaps /system/usr/keychars
575 mount --bind /etc/keymaps /system/usr/keylayout
577 for i in /sys/class/input/input* ; do
578 if [ "`cat $i/name`" = "tssc-manager" ] ; then
580 echo "Touchscreen device directory is $i"
584 if [ -f $card/ts-calibration ] ; then
585 echo "Using Saved Touchscreen Calibration"
586 echo 128,128,1903,128,128,1907,1903,1907,1024,1024 > $touchscreendir/calibration_screen
587 cat $card/ts-calibration > $touchscreendir/calibration_points
590 mknod /dev/graphics/fb0 c 29 0
592 echo; echo; echo; echo; echo; echo; echo; echo "Calibrating Touchscreen:"
593 echo "Click the Five Targets in order -- Top Left, Top Right, Middle, Bottom Left, Bottom Right"
594 echo "(Tap lightly. The screen is quite sensitive.)"
596 echo 0,0,0,0,0,0,0,0,0,0 | cmp -s $touchscreendir/calibration_points # determine if calibration is still null -- means failed calibration
597 if [ $? -eq 0 ] ; then
598 echo "Touchscreen Calibration Failed"
600 echo "Touchscreen Calibration Successful; Saving..."
601 cat $touchscreendir/calibration_points > $card/ts-calibration
605 mkdir /dev/msm_camera
606 mknod /dev/msm_camera/control0 c 250 0
607 mknod /dev/msm_camera/config0 c 250 1
608 mknod /dev/msm_camera/frame0 c 250 2
611 # Generate a "serial number" for the Android system to identify the device.
612 # Put it in /data so it survives reboots. Won't survive a factory reset, though.
613 [ -f "/data/serialno" ] || echo -e `cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w 12 | head -n 1` >/data/serialno
615 SERIALNO=$(cat /data/serialno)
616 cp /proc/cmdline /tmp/cmdline
617 sed -i -e "s:$: androidboot.serialno=${SERIALNO}:" /tmp/cmdline
618 mount --bind /tmp/cmdline /proc/cmdline