webOS Nation Forums >  webOS Developers >  webOS Development > QEMU boot thread.
QEMU boot thread.
  Reply
 
Thread Tools Display Modes
Old 06/11/2009, 01:02 PM   #1 (permalink)
Member
 
Posts: 786
Ok...who is working on it and what can non-Pre owners do to help?

I'm saving my pennies for a Pre, but I'd love to be able to play around with a virtual one, maybe even come up with some programs/mods.
ssrjazz is offline   Reply With Quote
Old 06/11/2009, 01:26 PM   #2 (permalink)
Member
 
Posts: 1
Well, i CAN load Palm's kernel using the beagle board emu of qemu-omap3 + xloader/uboot from beagleboard.
Bad thing: Stops after unpacking the kernel, not sure why...
Attached Images
File Type: png qemu.png (13.4 KB, 165 views) Email Attachment
thpani is offline   Reply With Quote
Old 06/11/2009, 02:55 PM   #3 (permalink)
Member
 
Posts: 786
What commandline options and files did you use to get that far?
ssrjazz is offline   Reply With Quote
Old 06/11/2009, 10:54 PM   #4 (permalink)
Member
 
Posts: 786
i managed to make a rootfs image file for qemu, but I'm still not sure how to get qemu to use it and boot off the castle kernel
ssrjazz is offline   Reply With Quote
Old 06/12/2009, 12:17 AM   #5 (permalink)
Member
 
SirataXero's Avatar
 
Posts: 1,729
Props! I was planning on starting a thread for starters... nice job.

I really hope you guys get qemu working, I want to start digging into WebOS ASAP and learn to program for it before I actually get my Pre.

Good luck!
SirataXero is offline   Reply With Quote
Old 06/12/2009, 09:00 AM   #6 (permalink)
Member
 
virox's Avatar
 
Posts: 89
Quote:
Originally Posted by SirataXero View Post
Props! I was planning on starting a thread for starters... nice job.

I really hope you guys get qemu working, I want to start digging into WebOS ASAP and learn to program for it before I actually get my Pre.

Good luck!
me too
virox is offline   Reply With Quote
Old 06/12/2009, 10:22 AM   #7 (permalink)
Member
 
Posts: 786
Just from what little I've messed with it, I'm quickly starting to think that we're pretty much SOL until Palm releases the Mojo SDK with it's emulator in it. Yes, there -is- a version of qemu that will emulate the omap processor, but the hardware it emulates is the Beagleboard.

Even if we could get the kernel to boot, WebOS might not know what to do with what hardware it finds - or even be able to display anything.
ssrjazz is offline   Reply With Quote
Old 06/12/2009, 02:58 PM   #8 (permalink)
Member
 
SirataXero's Avatar
 
Posts: 1,729
Quote:
Originally Posted by ssrjazz View Post
Just from what little I've messed with it, I'm quickly starting to think that we're pretty much SOL until Palm releases the Mojo SDK with it's emulator in it. Yes, there -is- a version of qemu that will emulate the omap processor, but the hardware it emulates is the Beagleboard.

Even if we could get the kernel to boot, WebOS might not know what to do with what hardware it finds - or even be able to display anything.
That's a downer.

SirataXero is offline   Reply With Quote
Old 06/14/2009, 12:40 PM   #9 (permalink)
Member
 
Posts: 37
So far, I've tried:
- pack the pre root fs as jffs2
- boot with n810 emulation + n810 kernel
...without success, but I'm sure it will work.
__________________
Ludo

www.palmopensource.com - The PalmOS/WebOS open source portal
Palm IIIx -> Palm Tungsten T -> Sharp Zaurus -> Pre? Android?
ldrolez is offline   Reply With Quote
Old 06/14/2009, 02:56 PM   #10 (permalink)
Member
 
Posts: 786
why jffs2? The filesystem on the pre itself is ext3.
ssrjazz is offline   Reply With Quote
Old 06/14/2009, 04:03 PM   #11 (permalink)
Member
 
Posts: 37
Because the n800 kernel has no support for ext3, only jffs2 so I try a N800 kernel+pre jffs2 kernel. (And I have already booted a N800 with qemu, so the kernel is ok).
__________________
Ludo

www.palmopensource.com - The PalmOS/WebOS open source portal
Palm IIIx -> Palm Tungsten T -> Sharp Zaurus -> Pre? Android?
ldrolez is offline   Reply With Quote
Old 06/15/2009, 10:44 AM   #12 (permalink)
Member
 
Posts: 37
- I've booted a Poky Linux distribution for the N800 with qemu.
- transfered some Pre's binaries to see what happens
- but some of them fail with an "Illegal instruction" error.

So it seems that Palm's webos is really optimized for ARMv7, but qemu's omap emulation is only ARMv6.
There's some v7 emulation in qemu with -cpu "cortex-a8" but I do not know how stable it is...
and what about a large framebuffer with the "cortex-a8" emu ? So I give up...
__________________
Ludo

www.palmopensource.com - The PalmOS/WebOS open source portal
Palm IIIx -> Palm Tungsten T -> Sharp Zaurus -> Pre? Android?
ldrolez is offline   Reply With Quote
Old 06/18/2009, 11:58 AM   #13 (permalink)
Member
 
Posts: 1
Quote:
Originally Posted by ldrolez View Post
Because the n800 kernel has no support for ext3, only jffs2 so I try a N800 kernel+pre jffs2 kernel. (And I have already booted a N800 with qemu, so the kernel is ok).
Actually, the n800 does in fact support ext3, and a whole veriaty of other filesystems including ext2, yaffs2, ntfs, nfs, cifs, fuse, isofs, jfs, xfs, udf, and reiserfs.

all you need are the proper kernel modules, witch i can send to you if you want
b-man is offline   Reply With Quote
Old 06/26/2009, 02:15 AM   #14 (permalink)
Member
 
Posts: 2
All,

If you make significant findings would you also please post them in the Wiki as well:

predev.wikidot.com / runningwebosinqemu
rulethirty is offline   Reply With Quote
Old 06/30/2009, 03:25 PM   #15 (permalink)
Member
 
Posts: 37
Thanks to the SDK leak, I have booted the webos x86 images with qemu.

So,
1- It seems that Luna only supports 32bpp framebuffers (24bpp does not work)
2- The powervr 3D acceleration is not used (good and bad news )

=> it may be more easy that I thought to boot the palm with qemu-system-arm, and test native arm applications on an emulator...
__________________
Ludo

www.palmopensource.com - The PalmOS/WebOS open source portal
Palm IIIx -> Palm Tungsten T -> Sharp Zaurus -> Pre? Android?
ldrolez is offline   Reply With Quote
Old 12/16/2009, 03:35 PM   #16 (permalink)
Member
 
Posts: 49
So is this and any other work towards Android on the Pre/dual boot pretty much abandoned? I haven't seen much if any talk about it since launch. Hopefully I am just looking in the wrong places?
skitzi is offline   Reply With Quote
Old 05/13/2010, 04:53 PM   #17 (permalink)
Member
 
scoutcamper's Avatar
 
Posts: 129
has anyone worked on this recently?
scoutcamper is offline   Reply With Quote
Old 06/10/2010, 12:53 PM   #18 (permalink)
Member
 
Posts: 25
Hello.I am also trying to boot webos-arm on qemu.I think the easier way is using beagle-arm (they are very similar).
here post my main ideas and things i am going /i have tried.Please some help and correction.
cualquiercosa327 is offline   Reply With Quote
Old 06/10/2010, 01:19 PM   #19 (permalink)
Member
 
Posts: 25
I used some info found in several websites (i add the links also) and created a filesystem similar to pre (i hope).I attach how i did and also the bzip2 file.

Pre's flash disk - WebOS Internals webpage is bad (sorry i could not post links)

The Pre's flash disk appears to the device as a MMC and uses the standard fdisk partition scheme, with a MBR-like structure in the first block. There

are three partitions:

1. type 0xf0 start 0x00000400 size 0x00002000 NVRAM and Tokens
2. type 0x83 start 0x00002400 size 0x00010000 /boot (ext3)
3. type 0x8e start 0x00012400 size 0x00f3dc00 Logical Volumes

The space between the MBR and the first partition are used to store the bootloader (Bootie). The /boot partition contains the linux kernel (in uImage

format), a copy of the bootloader and the minimal userland required to start the LVM and to pivot the root to /dev/mapper/store-root and perform the

"real" boot from there


Boot Manager (type 0xF0), located anywhere on the disk. It can be primary partition or a logical disk inside the extended partition. The boot manager
will be written to this partition.



Problem :the filesystem size is bad on this post!!it is imposible create ext2 or fat filesystem on 2 as example.

The right sizes was:
1./dev/mmcblk0p1 defined as a Linux/PA-RISC boot partition is only 4MB
2. /dev/mmcblk0p2 defined as a Linux partition and is 32MB mounted as /boot
3./dev/mmcblk0p3 defined as a Linux LVM partition is 7.62GB


I created a void file:
>dd if=/dev/zero of=mmcblk0 bs=32M count=250

used parted to partition:
>parted mmcblk0
>>mkpartfs primary ext2 0 4M
>>mkpartfs primary ext2 3998kB 32M
>>mkpartfs primary ext2 32,0MB 7.62GB
>>quit

use fdisk to change the kind of partition:
>fdisk
>>t 1 f0
>>t 2 83
>>l
Disposit. Inicio Comienzo Fin Bloques Id Sistema
mmcblk0p1 1 61 3888 f0 inicio Linux/PA-RISC
mmcblk0p2 62 488 27328 83 Linux
mmcblk0p3 489 106812 6804736 8e Linux LVM

(the name is similar to kernel seems use)

After give the format.The problem is a file and you can not do simply :
mkfs.ext3 mmcblk0p2

Accessing raw images with partitions "inside" is a bit tricky. Still this links explains it:

Basically you "simulate" a block device /dev/loop0 for your file with the command:

>losetup /dev/loop1 mmcblk0

if i do :
>fdisk -l /dev/loop1

Disco /dev/loop1: 8388 MB, 8388608000 bytes
4 cabezas, 32 sectores/pista, 128000 cilindros
Unidades = cilindros de 128 * 512 = 65536 bytes
Identificador de disco: 0x00080655

Disposit. Inicio Comienzo Fin Bloques Id Sistema
/dev/loop1p1 1 61 3888 f0 inicio Linux/PA-RISC
/dev/loop1p2 62 488 27328 83 Linux
/dev/loop1p3 489 106812 6804736 8e Linux LVM


now i need map the "partitions" for mount and/or give filesystem.(for mount you could do it easily with the offset on loop.

kpartx -av /dev/loop1

and now i have the partition as if they were on a hd!!!

>ls -alF /dev/mapper
total 0
drwxr-xr-x 2 root root 120 2010-06-10 18:45 ./
drwxr-xr-x 15 root root 4180 2010-06-10 18:45 ../
crw-rw---- 1 root root 10, 60 2010-04-05 11:54 control
brw-rw---- 1 root disk 252, 0 2010-06-10 18:45 loop1p1
brw-rw---- 1 root disk 252, 1 2010-06-10 18:45 loop1p2
brw-rw---- 1 root disk 252, 2 2010-06-10 18:45 loop1p3


format

>mkfs.ext3 /dev/mapper/loop1p1 // i dont know if they are ext but when insert bootloader could change this.

>mkfs.ext3 /dev/mapper/loop1p2


And finally the LVM part.
I had to install lvm2 ,be carefull when finished desinstall .i am not expert with lvm but when installed it wanna change something on initrd.

I wanna as LVM physical volume (PV) all partition loop1p3

>pvcreate /dev/mapper/loop1p3

and i need the name was store (it mount on /dev/store/...).create the (VG)

>vgcreate store /dev/mapper/loop1p3

finally the "partitions" (LV)

>lvcreate -L 456M -n root store
>lvcreate -L 256M -n var store
>lvcreate -L 56M -n update store
>lvcreate -L 40M -n log store
>lvcreate -L 128M -n swap store
>lvcreate -L 5,57G -n media store //the free space

now the /dev/mmcblk0p3 partition should be a Linux Volume Group that is sliced into six Logical Volumes

Format:
>mkfs.ext3 -v /dev/store/log
>mkfs.ext3 -v /dev/store/media
>mkfs.ext3 -v /dev/store/root
>mkfs.ext3 -v /dev/store/var
>mkfs.ext3 -v /dev/store/update
>mkswap /dev/store/swap

(i can see the "partitions" with pvdisplay )
and unmount

>lvremove store
(yes all questions)
//be carefull,i dont know how mount after.

>kpartx -d /dev/loop1
>losetup -d /dev/loop1

desinstall lvm2 for avoing problems
>apt-get remove lvm2

compress the file
>tar cvjf mmcblk0.tar.bz2 mmcblk0




//Also i think maybe i could be used qemu image and after conver to raw:

qemu-img convert -f vmdk converted.vmdk -O raw converted.raw


*if someone wanna the filesystem ask me pm,i could not share links already
mmcblk0.tar.bz2 ‎ (87,4 KB)

Last edited by cualquiercosa327; 06/10/2010 at 03:00 PM.
cualquiercosa327 is offline   Reply With Quote
Old 06/10/2010, 01:22 PM   #20 (permalink)
Member
 
Posts: 25
I think they are ,almost,two ways to do it.I did a first test ,before create the filesystem but it doesnt load

1) Load some some linux with little utils on ramdisk and our disk and try to use preware-bootstrap script.(the wget part should be ommited,downloading and add the files at hand)


2)Using nova-cust-image-castle.rootfs.tar.gz with loop device
(this was my first try)

The mount devices are:

The /dev/mmcblk0p3 partition is a Linux Volume Group that is sliced into six Logical Volumes:
/dev/store/root mounted on / (root) 456 MB
/dev/store/var mounted on /var 256MB
/dev/store/update mounts on /var/lib/update 56MB (not mounted)

/dev/store/media mounted /media/internal 6.69GB
/dev/store/swap Linux swap 128MB

/dev/store/log/ mounted on /var/log 40MB



mount -o loop,offset=16384 root.img m
cd m
tar xzvf ../nova-cust-image-castle.rootfs.tar.gz

The bootloader must be named mlo in the root directory: ("why?????")

cp boot/boot.bin mlo
cd ..
umount m

my test was some diferent,excuse me for copy/paste i had not here the commands i used but it was similar.

Last edited by cualquiercosa327; 06/10/2010 at 03:22 PM.
cualquiercosa327 is offline   Reply With Quote
Reply

 

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0