Re: Qi vs U-boot (was Re: QtMoko v30; UBIFS; can't boot)

2010-12-29 Thread giacomo mariani

>> > Please tell me how to do this! I have no religious bind to Qi. To
>> > hell
>> with minimalism, let us all use the bootloader that is standard,
>> smart, configurable and well supported.
>>
>> I think easiest way is to use fw_setenv. I rethought, need relatively
>> trivial modification to u-boot to support loading plain file to env
>> variable with something like 'ext2loadvar location [var]'. But this
>> brain-dead by design idea

> The brain-dead idea is not mine :)
> /boot/grub/menu.lst

You can achive a "similar" result using editUenv.sh from 
http://code.google.com/p/edituenv/ (also based on devirginator).

It is quite rough, but may help. 

Cheers  
   Giacomo 


  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-28 Thread Radek Polak
Ivan Matveev wrote:

> My idea was to put NAND kernel options in to append-GTA02 file on
> "identity-ext2"(mtd5, dfu-util calls it "factory") NAND partition.
> The partition contains ext2 file system so we don't have to
> add jffs/ubifs support to Qi.
> Qi already mounts the partition and reads "usb" file from it.
> See:
> radekp-qi-b214400/src/cpu/s3c2442/gta02.c
> char * append_device_specific_cmdline_gta02(char * cmdline)
> [...]
> if (!ext2fs_mount()) {
> [...]
> len = ext2fs_open("usb");
> Also Qi already has a parser for append-[device] files.
> So we cold just add "identity-ext2" partition to the list of partitions
> that Qi search for /boot/append-GTA2
> and immediately  have configurable kernel options for NAND boot.

Ahh oki, that makes sence then.

Regards

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Qi vs U-boot (was Re: QtMoko v30; UBIFS; can't boot)

2010-12-28 Thread Ivan Matveev
On Tue, 28 Dec 2010 16:45:56 +0300
Gennady Kupava  wrote:


> > Please tell me how to do this! I have no religious bind to Qi. To
> > hell
> with minimalism, let us all use the bootloader that is standard,
> smart, configurable and well supported.
> 
> I think easiest way is to use fw_setenv. I rethought, need relatively
> trivial modification to u-boot to support loading plain file to env
> variable with something like 'ext2loadvar location [var]'. But this
> brain-dead by design idea 

The brain-dead idea is not mine :)
/boot/grub/menu.lst

>require bootloader to support all possible
> fses (how does qi reads ubifs for kernel parameters, if it has no
> support for ubi?)

No it doesn't require jffs/ubifs support.
The "identity-ext2"(mtd5, dfu-util calls it "factory") NAND partition
contains ext2 fs. 
So on linux runing from NAND

echo "/dev/mtdblock5 /boot ext2 defaults" > /etc/fstab

Navigate to /boot, edit append-GTA02... 
Natural way for people used to PC bootloader like grub.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-28 Thread Ivan Matveev
On Tue, 28 Dec 2010 22:40:10 +0100
Radek Polak  wrote:

> Ivan Matveev wrote:
> 
> > That's the sources I'v looked at to learn how Qi uses NAND
> > partitions. Funny
> > find ./ -exec grep -H ubi '{}' ';'
> > finds nothing relevant. Am I looking at the right sources?
> 
> Ahh sorry, i forgot you need to be on the right branch:
> 
> https://github.com/radekp/qi/tree/qtmoko-v28

Thank you. 

> > I think it wold be ideal if Qi wold treat NAND as a regular
> > partition, i.e. wold read  kernel options from
> > identity-ext2/append-GTA2. I think I could implement that. Looking
> > for the place in the sources where Qi reads append-GTA02. Have a
> > little difficulty understanding the sources.
> 
> I might be wrong, but that would involve reading jffs2/ubifs/yaffs
> and whathever else filesystem. This goes quite against the idea of qi
> to keep it simple.

My idea was to put NAND kernel options in to append-GTA02 file on 
"identity-ext2"(mtd5, dfu-util calls it "factory") NAND partition. 
The partition contains ext2 file system so we don't have to
add jffs/ubifs support to Qi.
Qi already mounts the partition and reads "usb" file from it. 
See:
radekp-qi-b214400/src/cpu/s3c2442/gta02.c
char * append_device_specific_cmdline_gta02(char * cmdline)
[...]
if (!ext2fs_mount()) {
[...]
len = ext2fs_open("usb");
Also Qi already has a parser for append-[device] files.
So we cold just add "identity-ext2" partition to the list of partitions
that Qi search for /boot/append-GTA2
and immediately  have configurable kernel options for NAND boot.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-28 Thread Radek Polak
Ivan Matveev wrote:

> That's the sources I'v looked at to learn how Qi uses NAND partitions.
> Funny
> find ./ -exec grep -H ubi '{}' ';'
> finds nothing relevant. Am I looking at the right sources?

Ahh sorry, i forgot you need to be on the right branch:

https://github.com/radekp/qi/tree/qtmoko-v28

> I think it wold be ideal if Qi wold treat NAND as a regular partition,
> i.e. wold read  kernel options from identity-ext2/append-GTA2.
> I think I could implement that. Looking for the place in the sources
> where Qi reads append-GTA02. Have a little difficulty understanding
> the sources.

I might be wrong, but that would involve reading jffs2/ubifs/yaffs and 
whathever 
else filesystem. This goes quite against the idea of qi to keep it simple.

Regards

Radek

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Qi vs U-boot (was Re: QtMoko v30; UBIFS; can't boot)

2010-12-28 Thread Gennady Kupava
Hi, Ivan,

В Втр, 28/12/2010 в 06:04 +0300, Ivan Matveev пишет:
> Lets burn some linux.org.ru style flame!

Hey, such foreword spoils good talk, so i'll try to be short.

>> It's also possible to setup u-boot like qi, 'read kernel first from
sd part 1, boot if loads, then try from sd part 2, boot if loads, then
from nand'. All with 10 lines in config file. Just noone need it.

> No one needs the good stuff :).

Cause is that this stuff is not good :)

> Does every FR user have to develop a bootloader?

Process of changing configuration is not development. Process of looking
up something in C sources of Qi is development ;)

> Please tell me how to do this! I have no religious bind to Qi. To hell
with minimalism, let us all use the bootloader that is standard, smart,
configurable and well supported.

I think easiest way is to use fw_setenv. I rethought, need relatively
trivial modification to u-boot to support loading plain file to env
variable with something like 'ext2loadvar location [var]'. But this
brain-dead by design idea require bootloader to support all possible
fses (how does qi reads ubifs for kernel parameters, if it has no
support for ubi?)

> I'm waiting for Radek's comment on this. Qi's sources are not easy, no
stdlib functions.

Local Qi pontiff is Paul Fertser.

> Please do not be offended. I was frustrated by FR suddenly not booting.

It's impossible to offend me with good arguments.

Gennady.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Qi vs U-boot (was Re: QtMoko v30; UBIFS; can't boot)

2010-12-27 Thread Ben Thompson
On Tue, Dec 28, 2010 at 06:04:12AM +0300, Ivan Matveev wrote:
> Hi Gennady!
> Lets burn some linux.org.ru style flame!
> 
> > > > > 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 :)

Hello Everyone

Would I be correct in thinking that we are will all need to use u-boot
anyway one day as Qi is only compatible with the GTA2?

If we are moving to the GTA4 from Dr. N, I suppose we might as well
start dusting off our old u-boot configs and re-learning how it all
works.

By the way, does anyone else have any examples of the environemnt.in
config which they would like to share? I have tried to boot SHR using
Gennady's version but it did not work for me. It seemed to boot the
kernel but X did not load for some reason.

Thanks

Ben

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Qi vs U-boot (was Re: QtMoko v30; UBIFS; can't boot)

2010-12-27 Thread Ivan Matveev
Hi Gennady!
Lets burn some linux.org.ru style flame!

> > > > 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 files. 
 
> "Automatic" setup is done by person who provide you with Qi. If
> someone start supply u-boot_env with distros, u-boot setup will be
> equally "automatic".

As always with "automatic" someone has to build the mechanism. Qi has
it already. Why shell I bother with u-boot numerous(poorly documented)
options? I know u-boot is more configurable, but I just want to  boot.
If I start developing an FR kernel I'l learn u-boot ways. A regular user
wold like a bootloader as configurable as grub, not a set of cryptic
scripts we have with u-boot. 

> It's also possible to setup u-boot like qi, 'read kernel first from sd
> part 1, boot if loads, then try from sd part 2, boot if loads, then
> from nand'. All with 10 lines in config file. Just noone need it.

No one needs the good stuff :).

> What 'text config files' in Qi you talking about? Does it have config
> files at all? If you mean ability to append kernel parameters this not
> like u-boot config files, only 1% of that flexibility.

I think if I 

wget http://www.bsdmn.com/openmoko/uboot/config/environment.in
less environment.in

I will see much more than 1% of kernel parameters in the file.
Can you give an example of a valuable non kernel parameter bootloader
parameter?

> Minimalism? 
1. 
>You mean that Qi works only on Freerunner, has no support
> to anything else? 

I do agree that Qi is not as supported as u-boot(thank you for
your advice on u-boot, sincerily). We shell spread word on Qi to make
it more popular and supported and make it an embedded grub.

2. 
> Or that you need to use NOR u-boot to flash
> something to NAND as qi can't do it? 

Decision to have 2 bootloders(NOR and NAND) in FR was a wise one 
and was a result of experience with neo1973 that was easy to brick by
flashing a bad bootloader. With this design one of the bootloaders can
afford to be minimalistic.

3. 
> Or that nothing except kernel
> parameters may be configured without recompilation? 

What else do we(users, application developers) need?

4. 
> Or that it can't  display anything on screen so you have to decode
> errors by amount of blinks? 

If you press power button at the right moment you will have
loglevel=8. You will see kernel debug, not bootloaders. Why should a
user care? Does every FR user have to develop a bootloader?

5. 
> Or that it adds 'quiet' kernel options by default, so you
> can't see boot logs?

See 4. on power button.

> > I'v tried u-boot just to be shure.
[...]
> > Didn't edit environment.in because don't know what to put there.
> 
> You must edit it to boot, mine is only example suitable only for my
> custom setup.

Well, I must edit environment.in. How shell I know what do I put there?
I'm no u-boot expert. Can you provide the catch all u-boot config? That
wold be a good u-boot advocacy.

> > From http://wiki.openmoko.org/wiki/U-boot-gena2x:
[...]
> > A press on the power button. FR emits a barely audible click and
> > then nothing, the screen stays blank.
> 
> This only may happen if you battery discharged or 'default' boot way
> is not setup properly. Try menu with power+aux like described on wiki.

The battery was full. There was no u-boot setup whatsoever only sample
environment.in.
 
> I think qi is NOT reading u-boot_env, so you just had different Qi
> version before.

I'm waiting for Radek's comment on this. Qi's sources are not easy, no
stdlib functions.

In the course of researching the 'no NAND QtMoko' situation I'v tried
the following combinations:

qi-s3c2442-master-hist_3b8513d8b3d9615e.udfu; uImage-v26.bin;
qtmoko-debian-v26.jffs2; did boot OK

qi-v28.ubifs.udfu; uImage-v28.bin; qtmoko-debian-v28.ubi; didn't boot

qi-v30.udfu; uImage-v30.bin; qtmoko-debian-v30.ubi; didn't boot

[...]
> > > 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 this...
> > I think its not external fs that matters but u-boot_env
> > format. 
 
> Seem i didn't describe my idea very well. I think it's possible to
> write such env for u-boot, that will read text 'append' portion of
> kernel params like qi does. So, you'll have similar fun of editing
> text files with kernel options, like you have in Qi.

Please tell me how to do this! I have no religious bind to Qi. To hell
with minimalism, let us all use the bootloader that is standard, smart,
configurable and well supported.

Gennady I admire yours contribution to the community. Please do not be
offended. I was frustrated by FR suddenly not booting.


Still I like Qi better. Small program that does
only 1 thing is the UNIX way 


___
Openmoko community mailing list
community@lists.openmoko.org
http

Re: QtMoko v30; UBIFS; can't boot

2010-12-27 Thread Ivan Matveev
On Mon, 27 Dec 2010 17:40:54 +0100
Radek Polak  wrote:

Hi Radek,
thank you for the great distrib! I'm using QtMoko since v20.

[...]
> As Gennady already pointed out, you should use qi which has ubifs
> boot parameters compiled in. Please flash this [1] 

That is the Qi vesion I use. 
The QtMoko v30 boot problem is solved by reloading u-boot_env
patition to Gennady's sample config. I think debian install.sh with Qi
option polluted u-boot_env kernel options. 
Does Qi read u-boot_env?

>qi or if you want
> to compile from sources you can use this [2] link.

That's the sources I'v looked at to learn how Qi uses NAND partitions.
Funny 
find ./ -exec grep -H ubi '{}' ';'
finds nothing relevant. Am I looking at the right sources?

I think it wold be ideal if Qi wold treat NAND as a regular partition,
i.e. wold read  kernel options from identity-ext2/append-GTA2.
I think I could implement that. Looking for the place in the sources
where Qi reads append-GTA02. Have a little difficulty understanding
the sources. 
In 
radekp-qi-c38b062/src/cpu/s3c2442/gta02.c
i see dynparts(NAND partitions) location and size appended to cmdline.

After 

len = ext2fs_open("usb");

Qi reads 'usb' file and appends g_ether parmas to cmdline.

Also there is
radekp-qi-c38b062/src/phase2.c
that looks like it can be reading append-[device] file.
Am I looking at the right place?

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-27 Thread Gennady Kupava
В Пнд, 27/12/2010 в 18:16 +0300, Ivan Matveev пишет:
> On Mon, 27 Dec 2010 08:33:09 +0300
> Gennady Kupava  wrote:
> 
> > Hi,
> > 
> > > 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
> files. 

"Automatic" setup is done by person who provide you with Qi. If someone
start supply u-boot_env with distros, u-boot setup will be equally
"automatic".

It's also possible to setup u-boot like qi, 'read kernel first from sd
part 1, boot if loads, then try from sd part 2, boot if loads, then from
nand'. All with 10 lines in config file. Just noone need it.

What 'text config files' in Qi you talking about? Does it have config
files at all? If you mean ability to append kernel parameters this not
like u-boot config files, only 1% of that flexibility.

Minimalism? You mean that Qi works only on Freerunner, has no support to
anything else? Or that you need to use NOR u-boot to flash something to
NAND as qi can't do it? Or that nothing except kernel parameters may be
configured without recompilation? Or that it can't display anything on
screen so you have to decode errors by amount of blinks? Or that it adds
'quiet' kernel options by default, so you can't see boot logs?

> I'v tried u-boot just to be shure.
> Per istructions at 
> http://wiki.openmoko.org/wiki/U-boot-gena2x
> I'v downloaded:
> http://www.bsdmn.com/openmoko/uboot/binary/u-boot_g2x_1.udfu
> http://www.bsdmn.com/openmoko/uboot/config/environment.in
> http://svn.openmoko.org/trunk/src/host/devirginator/crc32.pl
> http://svn.openmoko.org/trunk/src/host/devirginator/envedit.pl
> 
> Didn't edit environment.in because don't know what to put there.

You must edit it to boot, mine is only example suitable only for my
custom setup.

> From http://wiki.openmoko.org/wiki/U-boot-gena2x:
> "
> 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.

This only may happen if you battery discharged or 'default' boot way is
not setup properly. Try menu with power+aux like described on wiki.

> OK, at least I'v removed supposedly offending options from u-boot_env
> partition. 
> 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.

I think qi is NOT reading u-boot_env, so you just had different Qi
version before.

> 
> > > 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
> 'identity-ext2' partition.
> 
> > 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
> > sd.
> 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
> > this...
> I think its not external fs that matters but u-boot_env
> format. 

Seem i didn't describe my idea very well. I think it's possible to write
such env for u-boot, that will read text 'append' portion of kernel
params like qi does. So, you'll have similar fun of editing text files
with kernel options, like you have in Qi.

> 
> 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
> '���6'. 
> Look inside, there is:
> -i fileread 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 o

Re: QtMoko v30; UBIFS; can't boot

2010-12-27 Thread Timo Juhani Lindfors
> Ivan Matveev wrote:
>> I like Qi's minimalism, automatic setup of many options and text config
>> files.

The minimalism is kind of spoiled by the various Qi binaries that are
flying around since it is not possible to configure Qi enough without
recompiling it...


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-27 Thread Radek Polak
Ivan Matveev wrote:

> I like Qi's minimalism, automatic setup of many options and text config
> files.

As Gennady already pointed out, you should use qi which has ubifs boot 
parameters compiled in. Please flash this [1] qi or if you want to compile from 
sources you can use this [2] link.

Regards

Radek

[1] http://sourceforge.net/projects/qtmoko/files/Experimental/qi-
v30.udfu/download

[2] https://github.com/radekp/qi

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-27 Thread Martix
2010/12/27 Ivan Matveev :
> Can this be done from FR with no PC? nandump, edit, crc32, nandwrite?
> Oh my...
>
> 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
> edit files...

Hi,
you can edit u-boot environment from u-boot console.
see: http://wiki.openmoko.org/wiki/User:Martix/U-Boot_environment

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-27 Thread Ivan Matveev
On Mon, 27 Dec 2010 08:33:09 +0300
Gennady Kupava  wrote:

> Hi,
> 
> > 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
files. 
I'v tried u-boot just to be shure.
Per istructions at 
http://wiki.openmoko.org/wiki/U-boot-gena2x
I'v downloaded:
http://www.bsdmn.com/openmoko/uboot/binary/u-boot_g2x_1.udfu
http://www.bsdmn.com/openmoko/uboot/config/environment.in
http://svn.openmoko.org/trunk/src/host/devirginator/crc32.pl
http://svn.openmoko.org/trunk/src/host/devirginator/envedit.pl

Didn't edit environment.in because don't know what to put there.

From http://wiki.openmoko.org/wiki/U-boot-gena2x:
"
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
partition. 
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
'identity-ext2' partition.

> 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
> sd.
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
> this...
I think its not external fs that matters but u-boot_env
format. 

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
'���6'. 
Look inside, there is:
-i fileread 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?
Oh my...

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
edit files...

Thank you for the discussion, it gave me a kick in the right direction.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-26 Thread Gennady Kupava
Hi,

> 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 :)

> echo 'rootflags=compr=zlib' > p1/append-GTA02

Are you sure qi is really reading this? i am sure it is not.

> No joy. 
> Same result: kernel complains that lzo is not compiled in. 

It is really not compiled in, and it is OK, you have no need in lzo ATM
in qtmoko.

> Maybe it misses some modules? Maybe I shell put them in "identity-ext2"?
> Have to research more...

No, you need ensure that this options REALLY passed to kernel somehow. I
almost sure they not.

> 
> BTW tried Gennadys script to decode u-boot
> environment(http://www.bsdmn.com/openmoko/gpsfix/env/envedit.pl).
> It complains that crc32 function is not defined.

It is not mine, it is part of
http://svn.openmoko.org/trunk/src/host/devirginator/ and uses crc32 from
it, it's not good idea to get random files from server and complain they
not working :)

> 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 sd.

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 this...

If you need some help in u-boot setup, you can join #qtmoko at freenode
irc.

If you really enjoy Qi, use radek's qi from qtmoko site
http://sourceforge.net/projects/qtmoko/files/Experimental or fix kernel
parameters in qi source code and recompile it.

Gennady


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-26 Thread Ivan Matveev
To: community@lists.openmoko.org
Subject: Re: QtMoko v30; UBIFS; can't boot
Date: Mon, 27 Dec 2010 03:30:57 +0300
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; i486-pc-linux-gnu)
Organization: MoniCar


> Btw, don't know where this is set in qi, but you may try u-boot:
> http://wiki.openmoko.org/wiki/U-boot-gena2x  

Thank you for your replies. I don't want to go back to u-boot.
I think my problem started after I'v installed debian to SD per
instructions found at http://wiki.debian.org/DebianOnFreeRunner with
install.sh(http://pkg-fso.alioth.debian.org/freerunner/install.sh). 
I'v told the install.sh to configure Qi. Probably that was the mistake.
Now I'm trying to figure out what can be configured wrong. 
I'v read the script... Its long... Can't find anything suspicious.

According to this:
http://wiki.openmoko.org/wiki/Qi#Installation
Qi...is mount the "identity" partition and get from there the globally
unique MAC address for the USB over Ethernet function instead of the
random one that is otherwise used (If this doesn't work (like with a
GTA01) you may use kernel-commandline parameters g_ether.dev_addr= and
g_ether.host_addr= for the mac in device and host mode of the usb-ether
module). 

bad kernel options can be in "identity" or in u-boot environment
partitions.

QtMoko v30 booted from SD.

neo:~# cat /proc/mtd
dev:size   erasesize  name
mtd0: 0020 0001 "physmap-flash.0"
mtd1: 0004 0002 "qi"
mtd2: 0004 0002 "depr-ub-env"
mtd3: 0080 0002 "kernel"
mtd4: 000a 0002 "depr"
mtd5: 0004 0002 "identity-ext2"
mtd6: 0f6a 0002 "rootfs"

mount -t ext2 /dev/mtdblock5 p1

ls p1
bt  imei  lost+found  sn  usb  wlan

echo 'rootflags=compr=zlib' > p1/append-GTA02

No joy. 
Same result: kernel complains that lzo is not compiled in. 
Maybe it misses some modules? Maybe I shell put them in "identity-ext2"?
Have to research more...

BTW tried Gennadys script to decode u-boot
environment(http://www.bsdmn.com/openmoko/gpsfix/env/envedit.pl).
It complains that crc32 function is not defined.

Can I modify u-boot environment from QtMoko running from SD?

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-26 Thread Ivan Matveev
From: Ivan Matveev 
To: community@lists.openmoko.org
Subject: Re: QtMoko v30; UBIFS; can't boot
Date: Mon, 27 Dec 2010 03:30:57 +0300
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; i486-pc-linux-gnu)
Organization: MoniCar


> Btw, don't know where this is set in qi, but you may try u-boot:
> http://wiki.openmoko.org/wiki/U-boot-gena2x  

Thank you for your replies. I don't want to go back to u-boot.
I think my problem started after I'v installed debian to SD per
instructions found at http://wiki.debian.org/DebianOnFreeRunner with
install.sh(http://pkg-fso.alioth.debian.org/freerunner/install.sh). 
I'v told the install.sh to configure Qi. Probably that was the mistake.
Now I'm trying to figure out what can be configured wrong. 
I'v read the script... Its long... Can't find anything suspicious.

According to this:
http://wiki.openmoko.org/wiki/Qi#Installation
Qi...is mount the "identity" partition and get from there the globally
unique MAC address for the USB over Ethernet function instead of the
random one that is otherwise used (If this doesn't work (like with a
GTA01) you may use kernel-commandline parameters g_ether.dev_addr= and
g_ether.host_addr= for the mac in device and host mode of the usb-ether
module). 

bad kernel options can be in "identity" or in u-boot environment
partitions.

QtMoko v30 booted from SD.

neo:~# cat /proc/mtd
dev:size   erasesize  name
mtd0: 0020 0001 "physmap-flash.0"
mtd1: 0004 0002 "qi"
mtd2: 0004 0002 "depr-ub-env"
mtd3: 0080 0002 "kernel"
mtd4: 000a 0002 "depr"
mtd5: 0004 0002 "identity-ext2"
mtd6: 0f6a 0002 "rootfs"

mount -t ext2 /dev/mtdblock5 p1

ls p1
bt  imei  lost+found  sn  usb  wlan

echo 'rootflags=compr=zlib' > p1/append-GTA02

No joy. 
Same result: kernel complains that lzo is not compiled in. 
Maybe it misses some modules? Maybe I shell put them in "identity-ext2"?
Have to research more...

BTW tried Gennadys script to decode u-boot
environment(http://www.bsdmn.com/openmoko/gpsfix/env/envedit.pl).
It complains that crc32 function is not defined.

Can I modify u-boot environment from QtMoko running from SD?

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-25 Thread Gennady Kupava
Btw, don't know where this is set in qi, but you may try u-boot:

http://wiki.openmoko.org/wiki/U-boot-gena2x

Gennady


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-25 Thread Gennady Kupava
В Сбт, 25/12/2010 в 19:10 +0300, Ivan Matveev пишет:
> Hello All, Radek
> 
> Trying 
> 
> 2010-12-06 03:03 qi-v30.udfu
> 2010-12-06 02:11 qtmoko-debian-v30.ubi
> 2010-12-06 03:03 uImage-v30.bin
> 
> qi complains that lzo compressor is mot compiled in ubifs.
> 
> 
> ___
> Openmoko community mailing list
> community@lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community


Hi, this means that kernel command line missing "rootflags=compr=zlib".

qtmoko kernel has lzo support not compiled in, so you have to choose
compressor in rootfs mount options.

I recommend also to use "rootflags=compr=zlib,no_chk_data_crc" to make
reads a bit faster.

Gennady.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-25 Thread W. B. Kranendonk


--- On Sat, 12/25/10, Ivan Matveev  wrote:
> > Trying 
> > 
> > 2010-12-06 03:03 qi-v30.udfu
> > 2010-12-06 02:11 qtmoko-debian-v30.ubi
> > 2010-12-06 03:03 uImage-v30.bin
> > 
> I am able to boot with SHR kernel
> uImage-2.6.34-r4-oe15-om-gta02.bin,
> but qpe crashes right after start with SHR kernel.

I have used "exactly the same" files with no problem (as others did, I guess); 
did you try checksumming/downloading the files once again?

Boudewijn


  

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: QtMoko v30; UBIFS; can't boot

2010-12-25 Thread Ivan Matveev
On Sat, 25 Dec 2010 19:10:31 +0300
Ivan Matveev  wrote:

> Hello All, Radek
> 
> Trying 
> 
> 2010-12-06 03:03 qi-v30.udfu
> 2010-12-06 02:11 qtmoko-debian-v30.ubi
> 2010-12-06 03:03 uImage-v30.bin
> 
> qi complains that lzo compressor is mot compiled in ubifs.
> 

it wasn't qi complaining, it was the kernel. 
I am able to boot with SHR kernel uImage-2.6.34-r4-oe15-om-gta02.bin,
but qpe crashes right after start with SHR kernel.

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


QtMoko v30; UBIFS; can't boot

2010-12-25 Thread Ivan Matveev
Hello All, Radek

Trying 

2010-12-06 03:03 qi-v30.udfu
2010-12-06 02:11 qtmoko-debian-v30.ubi
2010-12-06 03:03 uImage-v30.bin

qi complains that lzo compressor is mot compiled in ubifs.


___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community