Cash Mundy knows the Value of a Dollar

The Light Entertainment at the End of the Tunnel. Ridin' that train... yes, that train...

Tuesday, July 26, 2011

How to mount a linux initrd or other cpio archive

I wanted to take a look at what was inside my initrd images to see what modules they had, and figured out they were gzipped cpio archives (recent Debian system). First I unzipped it, then extracted it, and decided that I really should just be able to mount it with -o loop. Didn't figure that out yet, but I found a program
called archivemount which works well, just like mount but for archives.
The Gnome archive manager, when I clicked on the initrd, couldn't deal with the fact that it was both gzipped and and archive, but if unzipped, would display it nicely.
A page with the above info didn't appear prominently in search results; thus, for your viewing pleasure, this one.

Wednesday, August 26, 2009

Nokia bets on Linux in iPhone battle: sources | Technology | Reuters

Nokia bets on Linux in iPhone battle: sources | Technology | Reuters Been watching Maemo with interest for a while. It is Debian based, as is OpenWRT (I’m connecting via a DD-WRT repeater, but only because the crappy post-Cisco Linksys router only has 2MB Flash). http://maemo.org/intro/ Maemo could turn out to predominate over Android in the long term, especially for larger devices, given that Android at the application level is limited to the Dalvik java-variant engine, whereas Maemo appears to support both QT and GTK, and can be coded for in at least c, c++ and python, meaning it is pretty wide-open. If it makes the jump from Nokia into the mobile ecosystem at large, it could become quite interesting.

Wednesday, July 15, 2009

Inside The Great American Bubble Machine : Rolling Stone

Inside The Great American Bubble Machine : Rolling Stone: "The first thing you need to know about Goldman Sachs is that it's everywhere. The world's most powerful investment bank is a great vampire squid wrapped around the face of humanity, relentlessly jamming its blood funnel into anything that smells like money."

Thursday, May 21, 2009

Do You Know Where Your $2 Trillion Has Gone?

action.firedoglake.com | Fed 1207:
Do You Know Where Your $2 Trillion Has Gone?

Since 2008, the Federal Reserve has loaned trillions of dollars in bailout money but refuses to tell Congress where it went. Legislative action is needed.

The Federal Reserve Transparency Act would give the GAO the authority to audit the Federal Reserve and report its findings to Congress. The bill was written by Rep. Ron Paul and has 165 cosponsors, mostly Republicans.

Democratic Congressman Alan Grayson is now working to get Democratic cosponsors for this bill (see Grayson's letter here).

If you think that it's time to bring some transparency to our financial system, please endorse the bill and Rep. Grayson's letter by adding your name to the list.

Google's Rubin: Android 'a revolution' | Digital Media - CNET News

Google's Rubin: Android 'a revolution' | Digital Media - CNET News

There's probably like a royal flush of openness, where you can lay your cards on the table and say (pointing) "open, open, open, open, open," it's the guy with the most open that's going to win.

I think we're that. I think that we have an open ecosystem, we have an open-source platform, we chose the right license, there are no viral aspects, it's absolutely 100 percent free, it's complete, it's everything you need to build a phone. When you add all that stuff up, all those ingredients, potentially--I think the jury's still out--we can make a really successful product.

The Googlies clearly get it. Bye Bye MSFT, Symbian, all the other crappy proprietary phone software that lets you do very little, badly. Done. History.

Saturday, May 16, 2009

Notes on tweaking the kernel for the G1 HTC Dream

Warning: Work in progress

First, here is a handy little script for kernel-building and testing: export ARCH=arm export CROSS_COMPILE=arm-eabi- export PATH=$PATH:$PWD/jdroid/prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin:/$PWD/jdroid/out/host/linux-x86/bin

I have a directory, android, in which is rooted the android sources, the SDK, various other odds and ends, and this script, called 'env', which I use as . ./env After doing that, I can just to 'make -j2' in the kernel-tree and have the right things happen, and fastboot and adb and so forth are in my PATH. I keep a copy of ramdisk.img there and put my built kernels, so I can try them out easily with fastboot boot zImage-2.6.27-stripped ramdisk.img

There appears to be a bunch of cruft built into the kernel wasting memory. This could just be the case for the JesusFreke build I pulled the config from, but probably most of it came from the vanilla Android. There is for example to reason to have both ext2 and ext3 compiled in (ext3 is backwards-compatible). Once 2.6.29 builds, there will be no excuse for anything but ext4, which again can mount ext2 and ext3 (via 'mount -t ext4').

Unfortunately the Wifi code appears to come from HTC as a binary module, and more unfortunately it uses symbols defined in the SLAB allocator (there is an option for a SLOB allocator which would probably be much more appropriate), and even more unfortunately is built with preemption debugging code, requiring the whole damn kernel have either preemption debugging or preemption tracing, neither of which anyone but kernel debuggers want. From include/linux/preempt.h: #if defined(CONFIG_DEBUG_PREEMPT) || defined(CONFIG_PREEMPT_TRACER) extern void add_preempt_count(int val); extern void sub_preempt_count(int val); #else

This latter is probably because I am using the HTC radio release for the Android Developer Phone (ADP). Hopefully they turn this cruft off for the G1 (I added PREEMPT_TRACER as the lesser evil and it still bloated the kernel a whole bunch).

... Oh bloody hell, the thing apparently hung trying to boot with PREEMPT_TRACER. Let's try DEBUG_PREEMPT instead...

I'm going to move this thread to my Google Site which is maybe a better place for it.

Thursday, May 14, 2009

ah rolled mah very own kernel fur mah fone

I actually rut mah fone a few days ago. Just now I finally managed to build a kernel for it. The Android system source (hereinafter '...') (not to be confused with the SDK) comes with kernel source, but by default uses a pre-built image instead of compiling it. First thing one needs to do is follow the link above and install the source.

Then one needs to follow this Building for Dream link and do what it says.

The kernel source tree comes in various different flavors, at present including 2.6.2[579]. 2.6.29 wouldn't build for me, but 2.6.27 did and booted and runs. You select a version by editing the .../.repo/local_manifest.xml file which you installed while getting ready to build your dream.

Note that these are not vanilla kernel sources: there is a lot of source in .../arch/arm/mach-msm which is not in the vanilla tree. I was able to build and load a plausible kernel from the vanilla tree, but it didn't run.

One must get a .config file and put it at the root of the kernel tree. Get it from your phone (/proc/config.gz) either by way of your SD card or by something like adb pull /proc/config.gz config.gz; gunzip config.gz adb will be in .../out/host/linux-x86/bin/ which you can add to your path via cd .../out/host/linux-x86/bin/; export PATH=$PATH:`pwd`.

Assuming you have gotten the source, you must add .../prebuilt/linux-x86/toolchain/arm-eabi-4.3.1/bin to your path, since you won't be building with generic gcc.

When everything is in place, one goes into the kernel tree and does make ARCH=arm CROSS_COMPILE=arm-eabi- oldconfig then make ARCH=arm CROSS_COMPILE=arm-eabi- all The kernel image ends up being "zimage" in kernel/arch/arm/boot

Having built the kernel and the rest of the source, one can use fastboot to load the kernel image and a ramdisk by doing something like cd /out/target/product/dream fastboot boot .../kernel/arch/arm/boot/zImage ramdisk.img which is as far as I have gotten so far. I'll worry about installing kernels later.

Ah rut mah fone

So I finally rooted my G1. Why have a phone running Linux if you can't get a root shell on it? Now I can "tether" it (use it as a Wifi router with 128-bit WEP). It's quite quick with 3g. T-Mobile understandably doesn't want people doing this too much, since it would swamp their net, so I won't abuse the privilege, but being able to get a fast connection anywhere I can get a 3g connection could be handy at times.

This guide was helpful.