zen.org Communal Weblog

April 10, 2005

Mac OS X on a Fujitsu Lifebook P-2046?

Filed under: — brendan @ 14:03 IST

In a copy of Linux Format magazine, they had an article by Richard Smedley called “What on Earth is…PEARPC”. After reading it, and lots of experience with emulators and simulators over the years, it peaked my interest. With just a little effort, I was able to run Mac OS X on my Linux host. For more than 20 years, I’ve been a big admirer of the Mac’s attention to detail in the user interface. I’ve even had conversations with Elana and friends about switching over to a PowerBook sometime soon.

So trying out PearPC was sure enticing. The pearpc.sourceforge.net site has a plethora of goodies for you, including some nice easy instructions on how to do it. Interestingly, they talk about using Darwin to partition a disk image (not a physical drive) for the installation. I tried a few times, but it kept freezing after the line

Warning: AppleMacIO self test fails

However the ideas posed on the blog at Designspace (I can’t find a person’s name for attribution) suggested that this was a little too much and the Disk Utility available inside the installer itself would be enough. The fact that others also offered ways to do all of this without first using a Darwin boot CD gave me some hope. There was some mention of getting a preformatted hard drive image out of pearpc.net though I didn’t actually use this.

I had to use the CVS version of PearPC instead of 0.3.1, the last release sent out in September 2004. The CVS tree is able to boot off the ISO image of the CD, while 0.3.1 doesn’t even show it as existing. My ppccfg file pointed at the ISO image I created from Elana’s first CD for installing Panther (Mac OS X v10.3). I changed prom_bootmethod to have the value select so I could pick the CD image by hand just in case. I created my disk image with

dd if=/dev/zero of=myharddisk.img bs=516096 seek=12482 count=0

and pointed the ppc program to it with the line

pci_ide0_master_image = "/osx/myharddisk.img"

in my ppccfg. I also changed the line

pci_ide0_slave_image = "/osx/osx-3.iso"

to be the image I created of the OS X install disk 1 CD. I created that image with the command

dd if=/dev/cdrom of=osx-3.iso

So when I got it to boot and run the installer, and it was asking me what device to install it on (but showed no choices), I used Open Disk Utility from the Installer pull-down menu, clicked on the disk image (not the CD), on the Partition pull-down selected “1 Partition” , and then chose Partition. It did well, but when I quit out of that, the Installer said “you cannot install Mac OS X on this volume”. Almost gave up, but tried again—and it worked! I didn’t note the URLs, but I found a couple of places explaining how they got around this same problem just by quitting the Installer and running it again. Voila, that did the trick.

The install went great, and I was able to run src/ppc ppccfg and see OS X boot up in the window. How cool.

The part to still solve: I can’t get networking to behave well yet. I first had to make sure to do

chown root /osx/pearpc-cvs/scripts/ifppc_up
chmod g-w /osx/pearpc-cvs/scripts/ifppc_up

as root to make PearPC be willing to actually use the script. First enabling pci_3c90x_installed in my ppccfg, it never showed the device when I looked in System Preferences. Then I switched to enable pci_rtl8139_installed; that was a lot better, and even showed the device during the messages of the boot sequence. I also had to run ppc as root with

sudo src/ppc ppccfg &

in order to make lots of permissions problems not come up related to changes to the network device.

Choosing Network under the System Preferences made a window pop up announcing that it saw the device. But after that, I wasn’t able to get it to show me that it had successfully used DHCP. Hmm, writing this now I realized that I never made my system enable IP forwarding. Hmmm.

Anyway, now that I’m trying it again with networking enabled, I see

ppc0: error fetching interface information: Device not found
...
UID=0
/osx/pearpc-cvs/scripts/ifppc_up: line 16: brctl: command not found
/osx/pearpc-cvs/scripts/ifppc_up: line 17: brctl: command not found
/osx/pearpc-cvs/scripts/ifppc_up: line 18: brctl: command not found
SIOCSIFADDR: No such device
br1: unknown interface: No such device
SIOCSIFNETMASK: No such device
br1: unknown interface: No such device
SIOCADDRT: Network is unreachable
program terminated with exit code 7
main() caught exception: error executing ifconfig.

Gahh. Back to pearpc 0.3.1, which does much better. It has pci_rtl8139_installed in its ppccfg. But it still freezes at

Warning: AppleMacIO self test fails

When I can get the CVS version of pearpc to boot, if I move the mouse while it’s booting I get

[IO/CUDA] Event processing timed out. Event dropped.

appearing a few times until I’m kind enough to stop moving the mouse any more. And attempts to boot with

pci_ide0_slave_image = "/dev/cdrom"

always gets me the error

[IO/IDE] /dev/cdrom: could not open file (No medium found)

and it exits. So I stick a random CD in the drive, and it gets past that—and back to the AppleMacIO warning. I wonder what I did last night to get it to boot successfully (albeit without networking), but now whether I use PearPC 0.3.1 or the CVS version, it’s hanging at the same place. Even if I change ppccfg to use (or not) the CD image. Or either options for networking or not. Or if I try with a new untouched system disk image or not. Gahh. Trying an strace shows it looping with

futex(0x810a4d8, FUTEX_WAKE, 1) = 0
clock_gettime(CLOCK_REALTIME, {1113159672, 863922000}) = 0
clock_gettime(CLOCK_REALTIME, {1113159672, 864070000}) = 0
futex(0x810a4f4, FUTEX_WAIT, 5831, {0, 9852000}) = -1 ETIMEDOUT (Connection timed out)

after that warning message. I wonder why its connection is timing out?

Darn, I was hoping what I’d be writing was a description of how I got it to work for me. Not just yet.

More later. 🙂

Certain people can`t afford medical insurance and thus forced to pay for the expensive prescription pills or look after cheap generic drugs online. Generics are potent and safe as other branded counterparts. Only reputable pharmacy produces them such as Fortune healthcare. With this in mind one may buy zyrtec uk in generic online pharmacy with free shipping worldwide

In Flight Service

Filed under: — elana @ 13:55 IST

A good friend of ours just flew from Frankfurt to Newark. Along the way, he IM’ed me. Yep, he was on Lufthansa, and was LOVING the in-flight net access. $30, but who gives a crap? He and I chatted for a bit, which was just fun :-).

Some people may not get health insurance so they have choice to pay for the really expensive prescription drugs or research how to buy generic medications online. Generic drugs are as safe as other branded meds. Only reputable pharmacy produces them such as Sunrise remedies. Having this in head one can buy stromectol uk in generic online drugstore including free shipping anywhere in the world

First milestone with Our TiV—er, MythTV Box

Filed under: — brendan @ 11:29 IST

About a week ago we were able to display live TV thru the box, but the remote didn’t work and we couldn’t move through channels. It’s much happier now. Problems that still need to be fixed:

  • Sound for non-AVI video files is out of sync
  • The X display is bigger than the TV screen
  • I have to switch the audio output between the Shuttle’s L/R audio out for video files and the audio out of the PVR-350 for live and recorded TV.
  • I need a way to make MythTV be able to change channels on the NTL Pace 4001NC box, which reportedly uses RC-5 protocol for the remote. Given that, we can also record everything coming from NTL Digital Cable. There is one cool serial hack that on its main page seems to clearly indicate it will work with my box, which after some clarification is confirmed to work with it. So we’re ordering one now and will share the results once we’ve got it.
  • Sometimes after a reboot the live TV doesn’t work for more than a few seconds, and more notably the name of the tuner and the current time don’t appear at the top of the screen. After only a minute or two, it goes back to the menu. If I restart mythbackend, it’s then all happy and can keep going.
  • The PVR-350 can accept the FM antenna; can MythTV record radio shows too into mp3 format? A google for “MythRadio” has a few hits for recent conversation. But anything I’d try for this has to wait til everything else works. 🙂

What we’ve got now is pretty usable for day-to-day stuff, with the one physical hurdle of having to use an audio switch box to change which of the two audio sources actually gets emitted. There must be a system/MythTV fix, or we could just get some sort of an RCA jack Y-joiner/junction thing to accept output from either one…Hmm….

Some details on how we got it working:

  1. The remote problem was because /etc/lircd.conf defines particular names for each button like


    CH+ 0X00000000000017E0
    CH- 0X00000000000017E1
    VOL+ 0X00000000000017D0

    The entries in ~/.mythtv/lircrc need to match those names in some fashion. I just had to change

    begin
    prog = mythtv
    button = chanup
    repeat = 5
    config = Up
    end

    to instead have

    begin
    prog = mythtv
    button = CH+
    repeat = 5
    config = Up
    end

    This helped improve watching live TV or shows recorded by the box. But we were stuck when watching a video file like an MPG (which has its own problems anyway) or AVI file; you couldn’t get it to return to the menu after starting to watch it.

  2. I came across Adam Rubin’s description of how he made the remote more usable with MythTV. So I just needed to give ~/.mythtv/lircrc a few entries like

    begin
    remote = hauppauge_pvr
    button = Pause
    prog = mplayer
    repeat = 3
    config = Pause
    end

    to help improve things.
  3. The file ~/.mythtv/NTL Basic Cable.xmltv contains the final list of channels I’m using. It omits the pay channels.
  4. I had to make /etc/rc.d/rc.local do modprobe ivtv so the driver, and its ivtv_fb framebuffer driver, are all loaded up before anything else. I also added the lines

    /usr/X11R6/bin/xset -dpms
    /usr/X11R6/bin/xset s off

    to make it stop having a blank screen until I hit a key on the (tucked away) keyboard.
  5. My final /etc/X11/xorg.conf file makes everything show up on the TV from the PVR-350’s S-Video feed, but the X display is still just slightly larger than the TV screen. When I’m going through the MythTV setup menus it’s impossible to see the selection boxes along the left side.
  6. Playing AVI files using the default mplayer now works by giving it the options
    -ao oss -vo x11 -nocache
    However, playing MPG files doesn’t work quite as well. I found others talking about this and how audio seems to come out directly via the sound port, but the video is going through the MPG decoder first. I did find some bits in the MythTV Digital Sound HOWTO and put them into my ~/.asoundrc. But I’ve not spent enough time looking at it to remember how to make MythTV use that, as opposed to the default /dev/dsp device.

So far so good; much more productive than the efforts with KnoppMyth, seemingly just because the version of the mythtv stuff is much more up-to-date.

Big amount of citizens simply cannot allow themselves to get health insurance so they have choice to pay for the really expensive prescription meds or trying to buy generic pills online. Generics produced in India are very good as other branded meds. Only reputable pharmacy produces them such as German Remedies. Having this in top one is allowed to buy orlistat uk in generic pharmacy online with extremely affrodable shipping to any point in the world

Powered by WordPress