07-09-2012 11:09 PM
I followed instructions on the Xilinx wiki to generate rootfs for zynq but system booted up failed with the following messages:
Bad inittab entry at line 10
can't run '/etc/init.d/rcS': No such file or directory
I'm sure that the rcS file is present at /etc/init.d/ and with 777 permission level.
What's going wrong?
My “inittab” file
# Start an askfirst shell on the serial ports
# What to do when restarting the init process
# What to do before rebooting
::shutdown:/bin/umount -a -r
My “rcS” file
echo "Starting rcS..."
echo "++ Mounting filesystem"
mount -t proc none /proc
mount -t sysfs none /sys
mount -t tmpfs none /tmp
echo "++ Setting up mdev"
echo /sbin/mdev > /proc/sys/kernel/hotplug
mkdir -p /dev/pts
mkdir -p /dev/i2c
mkdif -t devpts devpts /dev/pts
echo "++ Starting telnet daemon"
telnetd -l /bin/sh
echo "++ Starting http daemon"
httpd -h /var/www
echo "++ Starting ftp daemon"
tcpsvd 0:21 ftpd ftpd -w /&
echo "rcS Complete"
07-10-2012 09:42 PM
Hi there i had the same problem before, before u make the rootfs image, try to got to the rcS file and make it executable,right click and "allow execute as program" then build the image and test it again :)... Tell me if that works, im also a newbie in this area,all da best
07-12-2012 04:40 PM
are you absolutely sure you even need to do this? after looking through the rootfs instructions, I realized that you can unzip and mount the image that xilinx provides, do modifications on it, and then unmount it, zip it back up, and load it on the boot medium (SD card in my case) with those changes intact. Here's the script I'm using. Don't run it in a non-empty directory.
if [ $1 == "8" ] ; then COUNT=8192
elif [ $1 == "16" ] ; then COUNT=16384
else echo "$1 is not a valid size for the output RAMDISK. " ; exit ; fi
read -p " Ramdisk size is $1 Megabytes. Target directory structure is housed in $2. Press [Enter] to go"
rm -r *
dd if=/dev/zero of=ramdisk8M.image bs=1024 count=$COUNT
mke2fs -F ramdisk8M.image -L "ramdisk8M" -b 1024 -m 0
tune2fs ramdisk8M.image -i 0
chmod 777 ramdisk8M.image
mount -o loop ramdisk8M.image ramdisk8M/
cp -R $2/* ramdisk8M
read -p "Press [Enter]..."