Is Anyone Looking Into Building Their Own Filesystem Image?


fells

Still Fresh
Joined
Jul 6, 2009
Messages
39
Now that we have the kernel/module patches for the hardware, I am pretty sure we can start looking at doing an openembedded target for the wiz. I'm assuming with the serial cable you can interrupt into the u-boot console to do the flashing, right?

Is anyone going down this path yet?
 
Yes. Though personally I hate openembedded and see no need for it on the Wiz.
 
Actually you can't interrupt u-boot (timeout is 0), but you can flash your own u-boot using their firmware upgrade mechanism.
 
Spent some time looking into the latest firmware dump. I was able to mount the /flash and /game portions of the bits that go to nand on my local machine -- but the jffs2/ubifs image (that presumably has the root filesystem, correct me if I'm wrong please) (wiz_ubifs.img) is giving me problems. I put up my kernel to 2.6.29 and got all the ubifs userland stuff working but I can't seem to get it mounted.

Code:
# ubiformat /dev/sdc -s 512 -f wiz_ubifs.img

Gets me an invalid device -- it wants to restore to a character device, not a block device.

The wiz_ubifs.img file has what I want in it (I am trying to disable the gp2xmenu on boot)

Code:
# strings wiz_ubifs.img | grep gp2xmenu
./gp2xmenu --boot --disable-autorun

And I was hoping I could just "extract" the ubifs image and then build it up again (using mkfs.ubifs or ubinize) after changing this script -- what, probably /etc/rc.local or something..

If anyone has any help here, it'd be appreciated. Thanks Orkie for the flash instructions.
 
You mean you have patched the kernel up to 2.6.29?

What we did for Open2x was to make a tiny filesystem on the SD card and boot onto that which formats the NAND and extracts a tar.
 
notaz said:
Actually you can't interrupt u-boot (timeout is 0), but you can flash your own u-boot using their firmware upgrade mechanism.

flash kernel image with bad CRC to get u-boot prompt.
 
Last edited by a moderator:
fells said:
Now that we have the kernel/module patches for the hardware, I am pretty sure we can start looking at doing an openembedded target for the wiz. I'm assuming with the serial cable you can interrupt into the u-boot console to do the flashing, right?

Is anyone going down this path yet?

yes, I am going down on similar path.
openembedded seems to be complicated, instead I am trying to build rootfs for wiz using matrix.
http://sandbox.movial.com/wiki/index.php/Matrix
 
Last edited by a moderator:
I will probably go for something very simple using Buildroot - it worked for Open2x, I already know how it works and at the end of the day it is a game machine, not a PDA so I don't really see the need for anything more than libs and basic shell (plus Samba or whatever is used to develop).
 
Yes, I will build my own kernel and rootfs ;)
Firstly I will locate the rootfs on a sd card to and use that as root=... via the kernel command line.
 
Toolchain done...
Kernel configuration done... ('tuning' will never end *g*)

The kernel is configured and works fine with the existing rootfs.

Next step will be the rootfs.
 
maggu2810 said:
Toolchain done...
Kernel configuration done... ('tuning' will never end *g*)

The kernel is configured and works fine with the existing rootfs.

Next step will be the rootfs.

maggu, awesome. Can you give more details how you are/plan to boot the kernel? Would you edit the current uboot to boot into a kernel on the SD card? Or is there some grub-like kernel selection thing in the current rootfs? Very interested in your findings.
 
Last edited by a moderator:
fells said:
maggu2810 said:
Toolchain done...
Kernel configuration done... ('tuning' will never end *g*)

The kernel is configured and works fine with the existing rootfs.

Next step will be the rootfs.

maggu, awesome. Can you give more details how you are/plan to boot the kernel? Would you edit the current uboot to boot into a kernel on the SD card? Or is there some grub-like kernel selection thing in the current rootfs? Very interested in your findings.

step 1: Make 2 partitions on SD card, vfat for uImage & ext2/ext3 for rootfs
step 2: Get access to u-boot prompt (this can be done by flashing kernel with bad CRC)
step 3: Change u-boot environment variables to load kernel from vfat partition on SD. Also modify bootargs to mount rootfs from other partition on SD.
 
Last edited by a moderator:
yoku said:
step 1: Make 2 partitions on SD card, vfat for uImage & ext2/ext3 for rootfs
step 2: Get access to u-boot prompt (this can be done by flashing kernel with bad CRC)
step 3: Change u-boot environment variables to load kernel from vfat partition on SD. Also modify bootargs to mount rootfs from other partition on SD.

This all requires a serial connection, I assume. Is there any way we can build a ubifs image that can get flashed as if it were a new firmware download (allowing people w/o serial hookups to get a new filesystem/kernel?)
 
Last edited by a moderator:
I will prepare it. Name the kernel uImageUP and modify it, that the internal command line is used and not the CMDLINE TAG.
So it should be possible to use the kernel and the rootfs from the SD card.
 
Prevent the kernel to use the cmdline tag (the bootargs given by u-boot): works

Use a rootfs from SD cards: works

---

Also working:

SD card inserted and the R not pressed while booting
--> normal startup

SD card inserted and the R is pressed while booting
--> use kernel and rootfs from SD card without writing (modifying) the NAND
 
maggu, this is great. Care to tell more? Are you just building the filesystem on your own and packing it as a jffs image on the SD card or is there something else going on?
 
fells said:
maggu, this is great. Care to tell more? Are you just building the filesystem on your own and packing it as a jffs image on the SD card or is there something else going on?

As yoku stated before "step 1: Make 2 partitions on SD card, vfat for uImage & ext2/ext3 for rootfs"...

I created a few partitions on a SD card.
The first parition is a FAT12 one with the uImageUP and a dummy update.gz.
The uImageUP will use the second partition of the SD card (I used ext2 FS) as rootfs. So no loopback image is used.
I tested Qt4 for embedded linux and it is working.

The next step will be, to find a suitable rootfs configuration.
 
Last edited by a moderator:
I think it is not very interesting. But with the working USB host, the kernel sources and wpa_supplicant I can use now WEB/WPA/WPA2 WLAN with my wiz.
So I can now use ssh and scp / sftp to have a shell and transfer files.

It is working fine.

So I can use gdbserver for debugging now.
 
Back
Top