Tag Archives: Gentoo

Gentoo (and a little Ubuntu) on a MacBook Pro (5,3)

Getting Started

The Google-size summary: I’ve gotten Gentoo working on my MacBook Pro (5,3) again.

I’m going to attempt to recount all the little issues I ran across while installing Gentoo. If you notice I missed something, post it in the comments and I’ll try to figure it out and/or add it here. I also hope to add my findings to the Gentoo wiki, although the wiki is such an outdated mess that I’d almost feel like scratching the whole thing and having the Gentoo+MacBook community write their experiences back in. Continue reading

Non-obvious, Unannounced Gentoo Update

I’m not too happy the devicekit-power package has become unsupported but still remains in the tree as stable, with not even a word in elog or similar. This package depends on libusb:0, which has some pretty unfortunate bugs, resulting, at least for me, in power management only half working. I praise the developers of GNOME yet again for solid code writing that chugs along and still recognizes my battery and other things despite crashes like this.

It’s pretty easy to update and move on. Simply run emerge -1v upower and portage will handle the transition.

qemu-user: Turning your dual-core 2.6GHz processor into a dual-core 500MHz processor

I just discovered qemu-user, thanks to lu_zero on #gentoo-embedded. It’s brilliant. They took QEMU’s ability to simulate an entire processor, tossed out the other hardware emulation, and packaged it up. qemu-user’s primary use is for running foreign binaries.

So far, I’ve been running all my stage generation for Neuvoo on the BeagleBoard, which has a 500MHz armv7a processor. Everything compiles very slowly, but at least it’s native and stable.

There’s a couple problems with that setup. First, everything is running off an SDHC card. We’re talking slow. Second, the beagle has 128M of RAM, and after that it’s using the swapfile. Which is on the SDHC card. Now we’re really talking slow.

qemu-user deftly solves these problems. Of course, running stage generation on my hefty 2.6GHz Core2 Duo processor is going to slightly speed up compiling, just because of the dual cores. But not only that: now I have a huge, fast 7200rpm hard-drive to run everything off of, and 4G of RAM (2 of which is almost always cache) to run it all within.

Think of it like this: qemu-user enables you to run a chroot (and possibly other things) for almost any processor on a system of your choice, as though it were running natively.

Setting up qemu-user is a piece of cake, so I won’t go into details here. Just follow these instructions. One thing I didn’t get at first was why they use “USE=static”. The reason is this: if you’re going to be running an armv7a chroot, you need something inside the chroot to be translating (qemu-user). The problem is, that something can’t link dynamically against any libraries, because they’ll all be armv7a libraries. Static linking means the binary is self-contained and portable.

Let me know if there are other cool uses for qemu-user. I’m all ears. 🙂

“I like bug 327809”: Let’s make revdep-rebuild obsolete

That’s a quote from solar. I also like this bug. I really like it. I think it’s one of the best bug reports I’ve ever seen.

(First, a disclaimer: I’m not a Gentoo developer, I’ve only just started any kind of serious portage work, and have had quite a few stupid ideas at this point. Take what I have to say with a healthy pinch of salt.)

First of all, here’s the bug link: https://bugs.gentoo.org/327809

Here’s a highlight of what I think makes this bug so impressive, and my comments on it: Continue reading

Portage Hooks

Now that school is done for the 2009-2010 year, I’m back at it in Neuvoo again. I’m finishing off a long-planned and fairly major addition to portage I call “portage hooks.” The fun thing is I’ve submitted some patches to zmedico and the response has actually been more positive than previous experiences. solar seemed to be (tentatively?) liking the idea as well.

So, here’s what portage hooks are all about. If you have portage-utils installed, you will have an /etc/portage/postsync.d/ directory. Scripts in this directory are executed after portage syncs the tree. I thought this was a great idea, and I thought it should be expanded so there are other opportunities for unofficial extensions. Continue reading

Status of Gentoo on MacBook Pro (5,3)

HEY, LISTEN! This blog post and some of its tips are out-dated. You can read it but keep that in mind. I have a more detailed HOWTO-like blog post here.

  • ALSA: It supports all the inputs and outputs on the computer. The headphones and speakers get two different volume levels. I find setting headphones to 30% and speakers to 100% works perfectly for me, but every pair of headphones acts differently.
  • Graphics: NVIDIA drivers have been available from the start. No fuss or mess here, especially now that distributions have seemed to have finally found a way to package them in a way that doesn’t obliterate important X11 libraries.
  • Screen and keyboard brightness work if you install pommed. Since GNOME already recognizes the volume keys, I turned that off in pommed. The Banshee music player (my new favorite) understands the media controls, to my surprise! The eject button is also supported by pommed. As far as standard keyboard buttons go, the Home, End, Page Up, Page Down, Windows, Delete, and Function keys are all accessible via the Fn key, in combination with the left, right, up, down, Command, “delete”/Backspace, and Function keys respectively. (Why OSX doesn’t understand half these keys, and some of them only half the time, I still don’t understand.)
  • The large trackpad works very well. Single-finger click is a left click, two-finger click is a right click, and three-finger click is a middle click. Two-finger scrolling works very well, and can even be turned on and off in the Mouse settings in GNOME. Four-finger scrolling appears to be interpreted as a single finger, but that may be adjustable.
  • Within the last week or so, a new release of the isight-firmware-tools package (1.5.92) just added support for the iSight camera built into this MacBook. I am very happy about that, since that’s one less thing to reboot into OSX for. It still has some small setup required, but it’s a one-liner, so it barely registers on my “todo” list.
  • The wireless card works very well, and works with NetworkManager. Bluetooth works.
  • The battery is reported correctly in GNOME.
  • The SD card slot works. I’ve used it several times.
  • The fans require some doing. They don’t actually turn on automatically (scarily enough), so I had to hack up a script someone wrote to get the fan to react to temperatures reported by sysfs.
  • And the hard-drive, um, spins and stuff.

So, as you can see, besides pommed, a fan script, and the webcam, there’s really very little tweaking required. Everything more or less works.

Edit: The kernel configuration for this machine was requested in the comments below, so I’ve posted it here.

When you Can’t Compile ‘Em, Virtualize ‘Em (in VirtualBox)

That’s the approach I’m taking when it comes to Gentoo right now. September, my deadline for all computer projects, is my hard deadline, because that’s when college starts, and that’s when I expect my free time will be dramatically shortened, if not entirely consumed, as far as my computer projects are concerned. Because of that, I can’t waste a lot of time patching and hacking. If it doesn’t work in Gentoo Prefix like I want it to, I’ll throw it into VirtualBox’s copy of Gentoo and use the Shared Folders feature to keep data synced in and out of the virtual machine.

First off, don’t even think about doing this if you don’t have x86 virtualization extensions. You may survive the experience, but you won’t be able to stand it for much longer after. On my ol’ 1.8GHz Pentium 4, the speeds were always at least twice as slow. With my new Core 2 Duo processor with VT-x, the virtual machine can let the real processor take on most of the processing needs. If I had a “Core i7” Intel processor, or something else with Nehalem, I would also have Nested Paging which can give as much as a 1/3 increase in speeds.

But never-mind, because VT-x gives me near-native performance, which is absolutely necessary for Gentoo. Another good thing to have is a bigger-than-8G hard-drive. (In other words, the default Linux size is not good enough.) I gave the machine 512M out of my 4G total, which is more than enough for a Linux desktop. I turned on 3D acceleration and gave it 64M of VRAM, because I want to try KDE4.3. Everything else are defaults, pretty much. Continue reading

[Correcting] The Current State of Gentoo

My last blog post was the first one I’ve really just started writing on a feeling, and expressed it in full. Unfortunately, what came off in the post was all negative, without much hope for resolution, or even without anything positive about the projects mentioned.

So, here is a continuation of the last blog post I’ve written, in which I go over again what was bad, but also what was good, and how the bad can be corrected. Probably what the first post should’ve been. Continue reading

The Current State of Gentoo

(Edit: Please read my next blog post after or in stead of reading this one.)

Here we are, with working images, and we’ve begun to look into how to better make our images and the contents within more like (and simultaneously more compatible with) official Gentoo. A lot of that has involved us using tools provided by official Gentoo, such as catalyst and eselect. A lot of things, however, cannot be accomplished with plain Gentoo, such as catching portage before it tries to emerge something to make sure the file-system is set up correctly. It took us over half a year to finally “catch up” with Gentoo Embedded and actually reach the limits of what Gentoo provides officially.

Let’s step back a month or so, and go down another path: Gentoo Prefix. This excellent project gives people like me hope for Gentoo where there is none. I installed this to OSX, and I have had all kinds of fun hacking my programs into existence, as I’m sure my readers know from previous posts about Pidgin. In fact, it is because of Prefix that I have begun to scratch the surface of the ebuild world with many a Prefix bug report which often (I think) ended up in an ebuild/patch submission.

My experience with each project has been somewhat different, and somewhat disturbing too. What I have found with both projects, I believe I can trace straight up into Gentoo, and may be what is driving more than a few users and developers away from the once-very-popular distribution. I will attempt to describe what I have found, but please keep in mind that, as authoritative as I may sound, all of what follows is largely my own opinion based on what I’ve seen. Continue reading

The Secret to Pidgin on OSX with Gentoo Prefix

OK, there’s no secrets really. It’s just a matter of avoiding potholes and fixing bugs enough so you can work around them.

So, first off, 2.5.7 is the version I use, even though 2.5.8 is out. 2.5.8 has its own set of problems, and if I recall correctly they’re not as easy to work around. Second, I use the following USE flags:

net-im/pidgin prediction perl gtk -ncurses gnutls debug aqua spell
x11-libs/cairo svg
app-text/enchant -hunspell aspell

Pidgin requires cairo with svg, so that’s a no-brainer. Currently ncurses wide-character support is broken, either in Pidgin or ncurses itself, so I avoid that altogether with the “-ncurses” USE flag. Also, if you want a spell-checker, aspell is much more stable than hunspell on Gentoo Prefix right now, and does the same thing. (Besides, other things use aspell more than hunspell, so it’s one less library to install.) That explains the “-hunspell aspell” USE flags.

There’s one USE flag there you may not recognize for Pidgin. It’s “aqua”. This USE flag was put there by me. This is the show-stopper that had be running in circles for quite a while. In order to get proper GTK+ aqua support, you’ll have to patch Pidgin and Pidgin’s ebuild. You can find all the resources you need at the Gentoo bug I made, or in a handily compressed file here, update: or, better yet, in my Gentoo Prefix overlay. With these in your Gentoo overlay, and the proper USE flags above, pidgin will install correctly. Huzzah! Continue reading