Images, Sources, Rootfs!


peca said:
An here is my boot.txt (doesn't work neither with not without "0x" prefixes):
Try this version:
Code:
setenv bootargs debug root=/dev/mmcblk0p1 rw rootdelay=2 console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
ext2load mmc1 0 80300000 /boot/uImage-2.6.27.46-omap1
bootm 80300000

Sorry i didnt have the time to actually check, but atleast u-boots default environment parameters use ext2load mmc1 to load autoboot.txt, etc, so IMHO worth a shot. Also it seems that you can prepend hex values with 0x, but i dont think it is needed, so whatever...

EDIT: Have you installed HF3 to the NAND? - it (or some HF on the way, but atleast it) has an update to u-boot that allows ext2load to work (at all).
 
Last edited by a moderator:
urjaman said:
Mounting your NAND is rather simple, as root:
Code:
ubiattach /dev/ubi_ctrl -m 4
mount -t ubifs ubi0:rootfs /path/to/mount/point[code]
[/quote]

So if I want to make this permanent, I understand that /etc/fstab should accept the mount information - how about the first part?
(I want it for the wiki...)
http://pandorawiki.org/Creating_a_bootable_SD_card
 
Last edited by a moderator:
peca said:
Vitel said:
...The pandora rootfs works fine BTW.
Can You explain me (step by step) how You prepare SD card and extract rootfs to it? Just for comparison. My steps are closely described above. Thank You very much. :)
Login as root (su) and do the following:

Code:
fdisk
and create sdb1:
/dev/sdb1 1 5572 15754810+ 83 Linux
Code:
mkfs.ext2 /dev/sdb1
mount /dev/sdb1 /mnt/sd
tar xvpf pandora-rootfs.tar.bz2 -C /mnt/sd
cp ~/boot.txt /mnt/sd
 
Last edited by a moderator:
notaz said:
Try redoing the partition table too.
No success. I don't set partition as active (boot flag) at first, then activate it, but still the same result. It is 8 GB SunDisk. I try use older 1 GB SunDisk card an say result. Just moving files and preparing card.
EDIT Vitel: This is what I do :-( I do this on my Pandora, as I have only Win7 on my PC (and just working on it). If switching cads gets nothing, I can try boot Linux from USBflash and redo it from bigger computer. But I guess that this has nothing with rough power :)
 
Last edited by a moderator:
Try this boot.txt:
Code:
setenv bootargs debug root=/dev/mmcblk0p1 rw rootdelay=2 console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
ext2load mmc1 0:1 80300000 /boot/uImage-2.6.27.46-omap1
bootm 80300000

I had a hacker moment with u-boot over USB serial and the previous notation doesnt work (atleast with ext2ls, I didnt want to load anything).
 
peca said:
Trying... No way. This is weird. Can be used FAT? something like "vfatload mmc1..."?

Simplest workaround i can think of is to load the kernel from NAND, like this boot.txt
Code:
setenv bootargs debug root=/dev/mmcblk0p1 rw rootdelay=2 console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
ubi part boot && ubifsmount boot && ubifsload ${loadaddr} uImage && bootm ${loadaddr};

Thats cloned from the u-boot sourcecodes (eg. default NAND kernel boot), but with those bootargs the kernel should still mount root from SD.

FAT reading goes like fatload mmc1 0 <addr> <file> ... And yeah that 0:1 (dev:part) thing, it seems "0" == "0:1", but as I have 3 partitions with the first one FAT and rest as EXT2 then i needed to specify "0:2" to read (not "2", that was "2:1", OTOH maybe :2 would have done it)...
 
Last edited by a moderator:
Ha! Something else appears. Not success but closer. There is too many lines to type, but last one is important and I type few above it to illustrate:
Code:
...
UBI: max. allowed volumes:       1
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
...
UBIFS not mounted, use ubifs mount to mount volume first
And one dumb question I try use
Code:
setenv bootargs debug root=/dev/mmcblk0p1 rw rootdelay=2 console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
ubi part boot && ubifsmount boot && ubifsload ${80300000} uImage && bootm ${80300000};
and
Code:
setenv bootargs debug root=/dev/mmcblk0p1 rw rootdelay=2 console=ttyS0,115200n8 vram=6272K omapfb.vram=0:3000K
ubi part boot && ubifsmount boot && ubifsload 80300000 uImage && bootm 80300000;
I don't know if ${xxxx} is tohex function or not, but both version gets same result.
 
${loadaddr} refers to an environment variable, it should be already set. (I'm already getting tired of this weird stuff...)
 
urjaman said:
Drop the console= part in bootargs and you should have atleast some output regardless of the rootfs, no?
Thank you. Now I have the stage4 running on pandora :)
 
Last edited by a moderator:
This boot.txt works:
Code:
setenv bootargs root=/dev/mmcblk0p1 rw rootdelay=2 vram=6272K omapfb.vram=0:3000K
ubi part boot && ubifsmount boot && ubifsload ${loadaddr} uImage && bootm ${loadaddr} && boot
I get it from Pandora: Running firmware from SD card instead of NAND (flash) and updated it as Sinot's suggests in comment there.
--
But I really like to use kernell from SD card, not from only NAND. Maybe in the future. I'm satisfied for a while. :)
--
Edit: We have proverb: "Don't say hoop-la till jump over."
I'll guess that it successfully booting at 15:30. At 18:30 still "booting". I make snapshot:

It scroll time by time and stop again.

Now I giving up for a while. I'll ask friend to help me. He has Pandora too and understand Linux much more (actually it is his job). Dunno, why I not ask him yet. I'll get back with result.
 
I have 2 questions, but it looks like your earlier post regarding how to use ubifs probably tells me enough for me to try again to use ubifs on my flash. The remaining question is about ext2/ext3/ext4. All of the comments in this thread seem to say that the main flash filesystem has to be ext2, but I've *seen* comments regarding the fact that ext3 will work, and also, I tried to use the mkfs.ext4 on my pandora and it seemed to format the flash ... but my mount doesn't seem to recognize -t ext4. So either I have the wrong mount command or maybe the kernel doesn't know about ext4, or even that only ext3 will work here. I recall reading somewhere that, for reading only, an ext3 filesystem can be treated as an ext2, with no oll effects (it's the writing to the journal, on disk writes, which is uniquely ext3.)

So, is there any way to get ext4 to work as a Pandora filesystem, on flash?

Oh, lastly, about ubifs: folks seem to use the term "flash" in making a ubi filesystem, why is that?
 
^
UBIFS is a filesystem designed to live on a flash (the NAND chip).
ext{2|3|4} are filesystems designed with hard-drive in mind (optimized to read by sector etc...)

You usually don't format a flash memory. You only re-install a new image on it (that what does a flasher tool).
As far as I know the only images valid are still provided by OPT and are UBIFS formated (thanks god)

cheers :)
 
chuckr said:
I have 2 questions, but it looks like your earlier post regarding how to use ubifs probably tells me enough for me to try again to use ubifs on my flash. The remaining question is about ext2/ext3/ext4. All of the comments in this thread seem to say that the main flash filesystem has to be ext2, but I've *seen* comments regarding the fact that ext3 will work, and also, I tried to use the mkfs.ext4 on my pandora and it seemed to format the flash ... but my mount doesn't seem to recognize -t ext4. So either I have the wrong mount command or maybe the kernel doesn't know about ext4, or even that only ext3 will work here. I recall reading somewhere that, for reading only, an ext3 filesystem can be treated as an ext2, with no oll effects (it's the writing to the journal, on disk writes, which is uniquely ext3.)

So, is there any way to get ext4 to work as a Pandora filesystem, on flash?

Oh, lastly, about ubifs: folks seem to use the term "flash" in making a ubi filesystem, why is that?
"use ubifs on my flash" That sounds ambiguous. Do you mean the onboard NAND (thats a real raw flash device aka MTD device) or some other under the hood (abstracted as a block device using a controller chip) flash device like SD or USB MS? Just noting because UBI (and so UBIFS) works only on MTD devices. Then you start to talk about "main flash" and "ext2" and I'm WTF'd. Then you say "format the flash" and I'm again puzzled. The pandora kernel in use currently is old (2.6.27). The tree has some version of ext4dev, but it's obvioysly not enabled. Ext2 and ext3 work (on block devices) as expected.

Lastly, people (propably) aren't making an ubi filesystem, they're writing an already existing UBIFS image to the NAND, eg. "flashing".

My suggestion: say "flash" only as a verb meaning writing of NAND. Use "NAND" when talking about the integrated MTD device. Say "SD" or "USB stick"/"USB MS" when talking about these abstracted flash memory containment devices. I atleast would understand what we're talking about.
 
Last edited by a moderator:
Back
Top