Author Topic: Bitbake On Qemu - Alpha  (Read 3158 times)

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Bitbake On Qemu - Alpha
« on: May 13, 2005, 10:14:03 am »
Lots of people (myself included) have said, I'd love to help make OZ better but don't have the time or know-how to set-up the build environment.

This mini-project attempts to help by making it as easy as running a QEMU virtual machine, logging in and typing 'bitbake oe-image'.

Requirements:
- QEMU  for Windows or Linux

- My Debian BitBake QEMU image (using Azureus):
magnet:?xt=urn:btih:7YPQB3DWM3ARTZE3JL4FMLKL7FT7MT5H
(this file will grow to be ~5.5GB as you build)  Note: This image file will likely be updated/replaced very soon.

- A fast computer would be helpful...

Instructions
- Uncompress the disk image (you can use 7-zip on Windows)
- Start QEMU with using the image file as your -hda
- I used 192MB, but you could proably get away with 96 to 128MB of QEMU RAM
- Optional: use -redir tcp:22::22 with QEMU and then you can ssh to localhost and get into the image using PuTTY, if you have an SSHd running on localhost either turn it off or change the port parameter mapping to something else.
- login with bitbake/bitbake
- edit ~/bb/build/conf/local.conf -> uncomment line TARGET_OS="linux" and save
- cd ~/bb/build
- bitbake oe-image
- in Windows I recommend using task manager to set the QEMU.exe task to low priority, then minimize and check back with QEMU every half an hour to see how it's progressing...  (it takes a long time to initially pull all the bb packages to local cache)

Update - May 30:
Bitbake 1.3.0 requires almost 256MB exactly to work as a build environment...  this is much reduced from the previous 700MB (RAM+SWAP) that was previously required...

Things move much faster when SWAP can be avoided on QEMU...

Hopefully, I'll be able to get a better bitbake image done soon...  just trying a build with the ASSUME_PROVIDES="virtual/gcc-arm-linux-2.95" as per the suggestion in this bug (This bug ( http://bugs.openembedded.org/show_bug.cgi?id=29 ) has kept me from building successfully lately, but hopefully adding), if this succeeds I'll clean and pack this image.
« Last Edit: May 30, 2005, 02:09:41 pm by ironstorm »

alan

  • Full Member
  • ***
  • Posts: 221
    • View Profile
Bitbake On Qemu - Alpha
« Reply #1 on: May 13, 2005, 11:17:06 am »
Thanks a mot Ironstorm ! i will use your image as soon as possible.

You say "This image file will likely be updated/replaced very soon.". Why that ? Should i better wait for next image ?
« Last Edit: May 13, 2005, 11:17:30 am by alan »

Gondola

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Bitbake On Qemu - Alpha
« Reply #2 on: May 13, 2005, 11:35:13 am »
How do I download your image?

Do I have to install Azureus? I already have a BitTorrent client.
[span style=\'font-size:8pt;line-height:100%\']Nokia 770, running latest firmware.
1GB RS-MMC sandisk card
Garmin Etrex Legend GPS/USB Earthmate GPS
Rooted, with an SSH server, VNC viewer, etc.
[/span]

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Bitbake On Qemu - Alpha
« Reply #3 on: May 13, 2005, 11:37:51 am »
Quote
"This image file will likely be updated/replaced very soon.". Why that ?

I plan to fix that TARGET_OS line and it will also be moved from hosting of the file off my home PC to a server...   So, no I wouldn't wait if I were you...

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Bitbake On Qemu - Alpha
« Reply #4 on: May 13, 2005, 11:40:19 am »
Quote
How do I download your image?
Do I have to install Azureus? I already have a BitTorrent client.

You need a client that supports reading Magnet URIs...  I created the torrent using Azuerus 2.3.0 which does magnet...  You might be able to find other clients that do magnet also...

Gondola

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Bitbake On Qemu - Alpha
« Reply #5 on: May 13, 2005, 05:31:54 pm »
Edit:

I updated my version of the JRE and now it's downloading at 40 kB/s.
« Last Edit: May 13, 2005, 05:43:00 pm by Gondola »
[span style=\'font-size:8pt;line-height:100%\']Nokia 770, running latest firmware.
1GB RS-MMC sandisk card
Garmin Etrex Legend GPS/USB Earthmate GPS
Rooted, with an SSH server, VNC viewer, etc.
[/span]

Gondola

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Bitbake On Qemu - Alpha
« Reply #6 on: May 13, 2005, 09:51:39 pm »
Quote
Edit:

I updated my version of the JRE and now it's downloading at 40 kB/s.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=79674\"][{POST_SNAPBACK}][/a][/div]

Under Windows XP with 2 gigs of RAM and an AMD 3400+ I was unable to execute QEMU from the commandline, but the qemumenu.bat file was able to successfully launch the image.

I su'd to root and tried to use the commands you listed, but apparently the bitbake user's environment is set up for the task.  I created some temp files as root that blew up my attempted build, too... so let that be a warning to ye all!

Handling bitbake files...3% done.
[span style=\'font-size:8pt;line-height:100%\']Nokia 770, running latest firmware.
1GB RS-MMC sandisk card
Garmin Etrex Legend GPS/USB Earthmate GPS
Rooted, with an SSH server, VNC viewer, etc.
[/span]

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Bitbake On Qemu - Alpha
« Reply #7 on: May 14, 2005, 02:28:11 am »
Unfortuantely, I don't get the build going... it fails with the following message... (not sure if I'm supposed to set DISTRO to familiar --- I'm trying to build OZ)

Code: [Select]
bitbake@debian-bitbake:~/bb/build$ bitbake opie-image
NOTE: Using cache in '/home/bitbake/bb/build/tmp/cache'
NOTE: Parsing finished. 2286 cached, 0 parsed, 47 skipped, 0 masked.
NOTE: Building provider hash: [####################] (100%)
NOTE: build 200505140023: started

OE Build Configuration:
TARGET_ARCH   = "arm"
TARGET_OS     = "linux"
MACHINE       = "collie"
DISTRO        = ""
TARGET_FPU    = ""

NOTE: package gnu-config-native-0.1cvs20050513: started
NOTE: package gnu-config-native-0.1cvs20050513-r3: task do_fetch: started
NOTE: package gnu-config-native-0.1cvs20050513-r3: task do_fetch: completed
NOTE: package gnu-config-native-0.1cvs20050513-r3: task do_patch: started
NOTE: Applying patch 'config-guess-uclibc.patch'
ERROR: function do_patchcmd failed
ERROR: log data follows (/home/bitbake/bb/build/tmp/work/gnu-config-native-0.1cv                                                                                                                     s20050513-r3/temp/log.do_patchcmd.774)
| Replacing patch config-guess-uclibc.patch with new version
| Applying patch config-guess-uclibc.patch
| patching file config.guess
| Hunk #1 succeeded at 138 (offset 2 lines).
| Hunk #2 FAILED at 840.
| Hunk #3 FAILED at 849.
| Hunk #4 succeeded at 891 (offset 16 lines).
| Hunk #5 FAILED at 910.
| Hunk #6 FAILED at 929.
| Hunk #7 FAILED at 971.
| 5 out of 7 hunks FAILED -- rejects in file config.guess
| Patch config-guess-uclibc.patch does not apply (enforce with -f)
NOTE: Task failed:
NOTE: package gnu-config-native-0.1cvs20050513-r3: task do_patch: failed
ERROR: TaskFailed event exception, aborting
NOTE: package gnu-config-native-0.1cvs20050513: failed
ERROR: Build of opie-image failed

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Bitbake On Qemu - Alpha
« Reply #8 on: May 14, 2005, 12:19:22 pm »
Quote
| Patch config-guess-uclibc.patch does not apply (enforce with -f)

The above was reported in the IRC channel by someone else also...  I've filed a bug http://bugs.openembedded.org/show_bug.cgi?id=2 hopefully it will get fixed soon.

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
Bitbake On Qemu - Alpha
« Reply #9 on: May 15, 2005, 11:30:25 am »
Try setting the following in your local.conf:

MACHINE = "collie"
TARGET_OS = "linux"
DISTRO = "openzaurus"

This should stop it from trying to create a uclibc based image. I think.


Si
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

ironstorm

  • Jr. Member
  • **
  • Posts: 86
    • View Profile
    • http://
Bitbake On Qemu - Alpha
« Reply #10 on: May 30, 2005, 02:10:32 pm »
Updated initial post with progress...