- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
create rootfs for zynq
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
07-09-2012 11:09 PM
Hi,
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
::sysinit:/etc/init.d/rcS
# /bin/ash
#
# Start an askfirst shell on the serial ports
ttyPS0::respawn:-/bin/ash
# What to do when restarting the init process
::restart:/sbin/init
# What to do before rebooting
::shutdown:/bin/umount -a -r
My “rcS” file
#!/bin/sh
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
mdev -s
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"
keung
Re: create rootfs for zynq
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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
Re: create rootfs for zynq
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
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
mkdir ramdisk8M
mount -o loop ramdisk8M.image ramdisk8M/
cp -R $2/* ramdisk8M
read -p "Press [Enter]..."
umount ramdisk8M/
gzip ramdisk8M.image











