QtMoko v30; UBIFS; can't boot
imatveev13 at nm.ru
Mon Dec 27 16:16:19 CET 2010
On Mon, 27 Dec 2010 08:33:09 +0300
Gennady Kupava <gb at bsdmn.com> wrote:
> > I don't want to go back to u-boot.
> I disagree - going to Qi is going back, going to u-boot is going
> forward :)
I like Qi's minimalism, automatic setup of many options and text config
I'v tried u-boot just to be shure.
Per istructions at
Didn't edit environment.in because don't know what to put there.
If you switching from qi, just run boot your distro with Qi, do
cat /proc/cmdline and compare/update parameters in config file.
Cant do that because I can only boot from SD but the params will be
different then? So lets use the sample environment.in as it is.
./envedit.pl -s 262144 -f environment.in > u-boot_env.in
dfu-util -a u-boot -D u-boot_g2x_2.udfu
dfu-util -a u-boot_env -D u-boot_env.in
A press on the power button. FR emits a barely audible click and then
nothing, the screen stays blank.
OK, at least I'v removed supposedly offending options from u-boot_env
Lets try qi-v30.udfu again. TADA! It boots ubifs QtMoko from NAND.
So I think something was wrong with u-boot_env partition, params
stored in there or the partition size.
> > echo 'rootflags=compr=zlib' > p1/append-GTA02
> Are you sure qi is really reading this? i am sure it is not.
I agree. In Qi sources I could only find that it reads 'usb' file from
> No, you need ensure that this options REALLY passed to kernel
> somehow. I almost sure they not.
In this case I had to make sure some options are NOT passed to the
kernel :). All the right options are compiled in Qi.
> > Can I modify u-boot environment from QtMoko running from SD?
> u-boot can boot any known distro without problems, from sd, ubi or
> jffs2. in hard cases of unusual fses you can just put kernel to splash
> NAND partition (named 'depr' in your qi) and boot it with rootfs on
Thanks I'll keep that in mind in case of a hard case.
> I think it is also possible to make such config that appends kernel
> params load from file on external fs, like in qi, but who needs
I think its not external fs that matters but u-boot_env
dfu-util -a u-boot_env -U u-boot_env.in
Now we have u-boot_env.in file containing params. How do we study whats
inside? Strings? Errr. Oh yes we have envedit.pl. How do we use
it, and where is the doc? Run it with no params, it outputs
Look inside, there is:
-i file read environment from file (default: use empty "
-p print environment in human-readable form to stdout\n".
./envedit.pl -i u-boot_env.in4.problemed -p
warning: environment is 262144 bytes, expected 16384
CRC error: expected 0x7b25213d, got 0x8f4d6b85
Oh yes there is -s option.
./envedit.pl -s 262144 -i u-boot_env.in4.problemed -p
At last it works! But the output doesn't look like the environment.in.
How do I compile the output back in to u-boot_env.in4 after editing?
Can this be done from FR with no PC? nandump, edit, crc32, nandwrite?
If u-boot_env partition contained a decent ext2(like identity-ext2
partition does) you could download it with dfu-utl, mount, edit files,
put back to the phone.
On a booted FR you could just
mount -t ext2 /dev/mtdblock2 /mnt/whatever
Thank you for the discussion, it gave me a kick in the right direction.
More information about the community