I have been too lazy to write this but today I was finally bothered enough. I don’t pipe it to sh
inside awk
because you may want to check what it will do before you actually do it.
1 | #!/usr/bin/awk -f |
I have been too lazy to write this but today I was finally bothered enough. I don’t pipe it to sh
inside awk
because you may want to check what it will do before you actually do it.
1 | #!/usr/bin/awk -f |
On http://trac.webkit.org/wiki/UsingGitWithWebKit there is a very useful trick:
If you want to be able to commit changes to the Subversion repository, or just want to check out branches that aren’t contained in WebKit.git, you will need track the Subversion repository. To do that, inform git-svn of the location of the WebKit SVN repository, and update the branch that git-svn uses to track the Subversion repository so that it will re-use the history that we’ve already cloned from git.webkit.org rather than trying to fetch it all from Subversion:
1 | cd WebKit |
This will add the following section to your .git/config:
1
2
3[svn-remote "svn"]>
url = http://svn.webkit.org/repository/webkit
fetch = trunk:refs/remotes/origin/master
You can then run the following command to have git-svn rebuild its metadata from your local repository, and to pull any recent commits from the WebKit SVN repository.
1 | git svn fetch |
So, let’s say you have a subversion repository:
1 | svn://svn.openwrt.org/openwrt/trunk |
and you also have a git clone of that repository:
1 | git://nbd.name/openwrt.git |
(Obviously these examples come from OpenWrt)
Now if you don’t want to fetch the whole history from svn, which will take forever, here is what you can do:
1 | mkdir openwrt;cd openwrt; |
git config
line tells git-svn to use the history in nbd.name, so you won’t need to checkout the same commits from svn.--prefix=svn/
to separate nbd.name upstream and svn upstream.[gallery]I’m really impressed. I’ve always wanted to put a small & nice HTPC in the living room. My old one is a full fledged desktop with 4 core, big ram, big hard drive, etc. Well at least it’s relatively ‘big’ when I bought it, but not anymore. The problem is – it looks really, really ugly in the living room.
And it’s running Windows XP.
Not that I’ve anything against Win XP. It’s stable enough, compatible with most of the stupid government and bank websites and applications, so I can use it to pay taxes, use web ATM, etc. It’s really useful. Mine is a legitimate copy, but I didn’t buy it. It’s actually a gift from Microsoft many, many years ago, in my previous life…
Anyway, the problem is that it’s hard to move to another PC. I’ve never be bothered enough to figure out how to use the ‘sysprep’ util, but start from scratch and update/install everything instead. It’s too much trouble, so it kinda stopped me from replacing it.
So, I was window shopping on the Internet and this Giada N20 caught my attention. It’s really small - 0.6 liter - and it comes with a remote control and HDMI. Video files could be decoded by Nvidia ION2. It’s exactly what I need. The real issue was that do I have to buy a Win 7 with it? People told me it’s really hard to use. Another thing was that the hardware is not particularly fast, so running win 7 might be too much for it. I figured I can try to install XP, since the manufacture said it’s fully supported.
I was so wrong.
I plugged in my ancient USB CDROM with the original XP CD in it. It booted into install screen and the process went just fine. I noticed that the reported hard drive capacity was incorrect, but I told myself it’s nothing and will be fixed as soon as I update the software.
No matter how hard I try (well not that hard, I just pressed the power button and F8 a few more times), it just cannot boot into XP. I thought it need some new drivers, but I couldn’t install the driver until I had a running XP, can I? Indeed it has an option saying that one may install 3rd party drivers during the install process, but it needs – floppy! Gosh, yeah I do have a floppy drive on my old machine, but who has a floppy with ‘USB’ interface nowadays? Guess I could just forget it.
In my desperation (I almost hit the shopping button for a win 7 copy), I figured maybe I can try to install Linux on it. It wouldn’t hurt. If it didn’t work I could put win 7 in it anyway. So I took out my trusted Ubuntu 11.04 USB flash and installed it.
After it booted for the first time, of course 3D didn’t work. I launched ‘Install additional driver’, it recommended Nvidia, I installed it, reboot… Yeah Ubuntu Unity interface was on, which means 3D was working. Then I enabled Mediabuntu, installed mplayer along with w64codecs, etc. Tried some high definition movies. There’s no audio output. Well, the display seemed to be fast enough, but it’s obviously running on the CPU so the codec was slowing things done. I clicked sound preference, picked HDMI 2nr (or something like that) then audio worked. mplayer picked vdpau as the video output, so I checked ‘mplayer -vc help’ and found some ffmpeg with vdpau support. I put these into ~/.mplayer/config, then 1024p movies played smoothly on my 52 inches LCD TV. Cool!
The remote control runs just like a keyboard input on this thing, and it can remotely power on/off this box. So I set the keyboard shortcut and set the default power button to ‘suspend’. Now I can resume and control it with a remote.
The last thing was to connect my Lavry DA-11 to it. It comes with USB interface and it’s standard USB audio, so there was no issue. I could switch sound output between HDMI and USB, depends on weather I want to hear the sound from the TV or my stereo set.
That’s about it. I must say it exceeds my expectation. Yeah the software is definitely there, but the hardest issue has always been the hardware. A media center relies on valid hardware drivers to work. Congrats to Ubuntu (and Linux) and Nvidia for going this far.
These are some of the slides from the technical speakers of the Android System Development Forum on April 28th, 2011. Copyrights belong to their perspective owners and distributed under their permission.
Android RenderScript on LLVM by 廖世偉 博士
http://www.slideshare.net/johncylee/android-renderscript-on-llvm-8103150
Is parallel programming hard? And if so, what can you do about it? by Paul McKenney
http://www.slideshare.net/johncylee/is-parallel-programming-hard-and-if-so-what-can-you-do-about-it
Guides To Analyzing WebKit Performance by Holger Freyther and Jim (jserv) Huang 黃敬群
http://www.slideshare.net/jserv/guides-to-analyzing-webkit-performance
Linaro and Android Kernel by Andy Green
http://www.slideshare.net/johncylee/linaro-and-android-kernel
There are still some slides missing and I’ll keep updating here.
By coincidence, the abbreviation of this is ASDF, which is kind of geeky…
0xlab is going to co-host this event on 2011/04/28. Please refer to http://www.digitimes.com.tw/seminar/android_1000428.htm for more information. The introduction page is in Traditional Chinese, but some of the sessions are in English.
We think there are quite some Android summits out there, but most of them are about application development and business trends. We want to focus on the system development aspect from a more technical point of view.
Oh by the way, did I mention it’s free of charge?
Here is my slides for the osdc.tw 2011 speech: The meaning of open. The content includes traditional Chinese.
http://www.slideshare.net/johncylee/the-meaning-of-open-osdctw-2011
I need to use vmplayer because Microsoft Windows is required for Linux-unfriendly IT infrastructures, document formats, Online ATMs, etc. However the modules of the latest vmplayer, v3.1.3, cannot build under Linux 2.6.37. So:
Extract the tar balls under /usr/lib/vmware/modules/source , then apply this patch. Enter each directory, make.
Put the generated .o under /lib/modules/$(uname -r)/misc , symlink them to .ko, depmod -a. Done.
It’s so easy I just need one line:
After reading this, unsurprisingly I decided to switch back to notification-daemon. Here is how:
This is just too sad.
I began writing this at February, but never have the chance to put in everything I wanted to put in. Now I decided that it’s better to publish it in its current form then not doing it at all. So, here it goes. You may also download the PDF version.