Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

OMAP-l138 lcdk : start Linux from NAND

$
0
0

Hi All,

I'm trying to boot my LCDK from NAND based on the a tar.gz shipped with the device SD card : omapl138-lcdk-fs.tar.gz. I remove Qt stuff and other things not important for me ( I see that this FS starts from NFS without any issues ). To convert it to ext2 filesystem I use the following script :

#!/bin/sh

nfs_dir=/home/developer/nfs/arago
images_dir=/home/developer/rdm/images

rootfs_size=77824
rootfs_name="rootfs.ext2"

if [ -d "${images_dir}" ]; then
# Safe execution fo the rm -rf
cd "${images_dir}"; cd ..
rm -rf -- images
fi

mkdir --verbose "${images_dir}"
cd "${images_dir}"
dd if=/dev/zero of="${rootfs_name}" bs=1k count="${rootfs_size}"
mke2fs -F -m0 "${rootfs_name}"
mount -t ext2 "${rootfs_name}" /mnt -o loop
tar -C "${nfs_dir}" -cf - . | tar -C /mnt -xf -
umount /mnt

gzip "${rootfs_name}"
cp "${rootfs_name}".gz /tftpboot

chown -R nobody /tftpboot
chmod -R 777 /tftpboot

As a result I get a *.gz of 28 M

Then I follow the instructions from Wiki :

    1. Download uImage(shipped with the SD, about 2M) and copy it to the NAND partition:
U-Boot> tftp 0xc0700000 uImage
U-Boot> nand erase 0x200000 0x200000
U-Boot> nand write.e 0xc0700000 0x200000 0x200000
    1. Download ramdisk, and copy it to NAND flash:
U-Boot> tftp 0xc1180000 rootfs.ext2.gz
U-Boot> nand erase 0x400000 0x1e00000
U-Boot> nand write.e 0xc1180000 0x400000 0x1e00000
    1. Set up the bootargs and bootcmd environment variables to boot from NAND flash:
U-Boot> setenv bootcmd 'nand read.e 0xc1180000 0x400000 0x1e00000; nboot.e 0xc0700000 0 0x200000; bootm'
U-Boot> setenv bootargs mem=32M console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0xc1180000,4M ip=192.168.2.10 

My kernel starts Ok but then I see the following error :
" RAMDISK: Couldn't find valid RAM disk image starting at 0.
List of all partitions:
No filesystem could mount root, tried:  ext3 ext2 cramfs vfat msdos
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)"

I've tried a tar.gz from here

 and my approach works fine, my target starts from NAND.

Any ideas of what could go wrong with SDK filesystem ? Thanks in advance...




Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>