Tool/software: Linux
Hi
I am trying to configure network initialisation on our board (based on a BeagelBoneBlack)
- using a small micron SPI NOR Flash chip for Rootfs
The issue I am seeing appears to tbe that the files necessary for the network initialisation look corrupted when mounted.
The SPI chip used requires that the mkfs.jffs2 is patched to allow small (<4K) erase blocks:
- I have added a patch to my bitbake build to do this and the mkfs.jffs2 runs without complaint
- the ROOTFS looks fine in both the directory it is created in and in the output .tar file
This issue comes once the jffs2 image is mounted:
- the filesizes of if-pre-up.d and interfaces within etc/network look bogus
- if i cat the files they look like binary rather than ASCII
- this causes a kernel panic if I run with this as my ROOTFS
Running the mkfs.jffs2 creation with verbose flag on the output for the relevant folder looks like
/etc/network d 0755 0 0:0 if-down.d d 0755 0 0:0 if-post-down.d d 0755 0 0:0 if-pre-up.d d 0755 0 0:0 if-up.d f 0644 791 ( 490) 0:0 interfaces /etc/network/if-down.d /etc/network/if-post-down.d /etc/network/if-pre-up.d f 0755 809 ( 487) 0:0 nfsroot
the sizes listed there look sensible
the command used is:
mkfs.jffs2 --root=/rootfs --faketime --output=/home/richard/projects/netw_rootfs.jffs2 --pad -l --eraseblock=0x1000 --no-cleanmarkers -q
once I mount this (even as read only) I can see that the information in /etc/network looks wrong
root@elle-board:~# mount -o ro -t jffs2 /dev/mtdblock4 tdir [ 89.737350] jffs2: notice: (86) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found. root@elle-board:~/tdir/etc/network# ls -l drwxr-xr-x 2 root root 0 Jan 1 00:00 if-down.d drwxr-xr-x 2 root root 0 Jan 1 00:00 if-post-down.d -rwxr-xr-x 111 1000 1000 506084 Jan 1 00:00 if-pre-up.d drwxr-xr-x 2 root root 0 Jan 1 00:00 if-up.d -rwxr-xr-x 1 1000 1000 118332 Jan 1 00:00 interfaces
I have attached my .config file incase this is something in the mounting of the filesystem rather than creation of the image
I would be grateful for any suggestions as to how to futher debug this.
Thanks for any help.
Best regards,
Richard