Hi,

I want to run initramfs to update emmc if image available au usb storage
device script as follow

///////////////////////////////Installer.sh/////////////////////////////////////

#!/bin/sh

emmc="/dev/mmcblk1"
bootpart="p1"
mpoint="";

usbdev="/dev/sda1"
egiimage="/mnt/egi/sdcard.img.bz2"
echo "egiimage=$egiimage"

if ! [ -b "$usbdev" ]
then
echo "USB Block Device not found!! $usbdev"
exit 3
else
mount /dev/sda1 /mnt/egi/
if ! [ -e "$egiimage" ]
then
umount /mnt/egi
echo "Egi Image not found!!"
exit 3

fi
fi

if [ -b "$emmc" ]
then
echo "SD card detected!!"
#dd if=$egiimage of=/dev/mmcblk1
mpoint="/dev/mmcblk1"
else
echo "SD card not detected!!"
#dd if=$egiimage of=/dev/mmcblk0
mpoint="/dev/mmcblk0"
fi

# led blink logic
bzcat $egiimage | dd of=$mpoint

////////////////////////////////////////////////////////////////////////////

Above script tested and working fine when running from command line

For root file system I refer
https://embedjournal.com/custom-rfs-beaglebone-black/

whereas I used my busybox  and cross compiler which is used to build kernel
uImage.

I created soft link init in / to /bin/busybox

and added above script .Installer.sh to etc/inittab as:
----------------------------------------------------------------
null::sysinit:/bin/mount -a
null::sysinit:/bin/hostname -F /etc/hostname
null::respawn:/bin/cttyhack /bin/login root
null::restart:/sbin/reboot
null::wait:/root/Installer.sh

-------------------------------------------------------------

When usb is not connected and power up board it will be hanged at:

Freeing init memory: 8416K

My expectation is call main rootfs from /dev/mmcblk0p2 but it hangs. Even
if I comment Installer.sh from etc/inittab it keep hanging.

I guess my procedure is wrong. please anyone suggest how to do it.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CABOw_5ExQQYtQ1FcoRCRGr8qX90W1gGAZrweCPO8xapQeCUg9Q%40mail.gmail.com.

Reply via email to