Marco Trevisan (Treviño) wrote:
Rui Castro wrote:
The workaround to boot the uImage-tracking kernel from uBoot (setenv
bootcmd setenv ... ; saveenv) works, but when I poweroff neo and try
to boot again it doesn't work anymore; I have to do the hack again.
Maybe I'm doing something stupid here. It's the first time I mess with
uBoot shell.

Are you editing NOR or NAND uBoot? You have write access only to NAND...

I tried to make a jffs2 image from koolu source code, but I had no
luck. I compiled the sources successfully with "make
PRODUCT_TARGET=freerunner", then I tried to create a jffs2 image
following a very simplistic and probably wrong approach:

1. Created a directory newandroidfs,
2. Extracted the contents of out/target/product/freerunner/ramdisk.img
to that directory, using file-roller,
3. copied the files under out/target/product/freerunner/system to /system,
4. created a symlink /etc to /system/etc and a directory /sdcard (like
I saw in Sean's image)
5. and created a jffs2 image with the contents of the directory
newandroidfs using the command "mkfs.jffs2 --pad=0x700000 -o
newandroidfs.jffs2 -e 0x20000 -n -dnewandroidfs/"

Outcome of all this, red light flashing!!! It's kernel panic, right? :(

It should be...
Btw another way for getting working images, I guess that should be using
the Sean's image as base and then putting there only the files you've
changed with your patches after a recompilation...
Would it work?

If someone (have no ideia who :) ) did a simple tutorial about how to
produce the precious jffs2 image, that would make the testing of new
features a lot simpler.

I'm asking this too :P

I use a script to copy out of the opensource build into my NFS mounted area. Once there, I use another script to create the jffs2 image. You'll probably need to modify them to your environment.

Sean

#!/bin/sh

ANDROID_OUT=~/moko/android/opensource/out
ANDROID_DEVICE=freerunner
EXPORT_ROOT=/srv/export

Usage()
{
        echo "Usage: $0 release|debug"
}

CopyAndroid()
{
        if [ -d $1 ]
        then
                echo "Copying from... $1"
                sudo rm -rf $EXPORT_ROOT/root/dev
                sudo rm -rf $EXPORT_ROOT/root/system

                # Copy the image...
                cd $1
                tar cf - root | (cd $EXPORT_ROOT; sudo tar xf -)
                tar cf - system | (cd $EXPORT_ROOT/root; sudo tar xf -)

                # Change owner and permissions...
                cd $EXPORT_ROOT
                sudo chown -R root:root root
                sudo chmod -R 777 root
        else
                echo "$1 does not exist!"
        fi
}

if [ $# != 1 ]
then
        Usage
else
        case $1 in
            release)
                CopyAndroid $ANDROID_OUT/target/product/$ANDROID_DEVICE/
                ;;
            debug)
                CopyAndroid $ANDROID_OUT/debug/target/product/$ANDROID_DEVICE/
                ;;
            *)
                Usage
        esac
fi
#!/bin/sh

sudo mkfs.jffs2 --pad=0x700000 -o androidfs.jffs2 -e 0x20000 -n -droot/
_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to