Skip navigation.

70池中之物

Ray's BLOG

August 2008

( Monthly archive )

Use Debian official kernel package

This is about recompiling kernel, but not only recompiling kernel.

My general way to update my Linux kernel on my distribution would be,

1, go to kernel.org.
2, download whatever version you need.
3, unpack it and make menuconfig.
3.1, or maybe you want to patch something before you really start config.
4, make bzImage && make modules && make modules_install
5, copy your new Linux image to your boot loader recoganized dir.
6, make a initrd image if neccesary.
7, update your boot loader config entry and reboot.
8, pray and then the world becomes a new one.

But now, I want to use the source tree from Debian official releasing rather than the original one, how?
But now, I don't want to touch make or other basic tools, would a decent script help me to finish all above?

We can start from getting Linux source tree from debian.

# apt-get install linux-tree-`uname -r` # here we will take 2.6.18-4 as `uname -r` result for example.

You may also need the following packages, linux-source-2.6.18, kernel-package, make-kpkg, fakeroot. And normally a general patch package is also installed, linux-patch-debian-2.6.18.

After lots of google work, I have now figured out how is the relationship between linux-tree package and linux-patch package.

linux-patch-debian-2.6.18 contains all the patches made by Debian, and some scripts for applying or unpatching those patches to linux kernel. After installing, the contents are put in /usr/src/kernel-patches/.

linux-tree-2.6.18 contains the latest kernel source package, after installing you will find the .bz2 file from /usr/src. Unpack it you will get the source tree.

Tricky:

Debian official released kernel version is composed by linux kernel version and patch level, 2.6.18-8 means this linux kernel is based on Linux 2.6.18 and with Debian's patch of level 8.

To find out which version of your linux source tree, navigate to /usr/src/linux-source-2.6.18 (or whereever you unpacked the previous .bz2 file), and 'cat version.Debian'. That might be '2.6.18-6' or something similar, but most probably this will not match with your current running kernel (it might be '2.6.18-4' or else).

Now navigate to '/usr/src/kernel-patches/all/2.6.18/apply' and 'cat debian', from the header part, you can see the capability of this patch set from this line.

_default_revisions = "1 2 3 4 5 6 7 8 9 10"

That means by applying this patch to your source tree, you can get the kernel source with different patch level (from 2.6.18-1 to 2.6.18-10). And that would farily easy.

# cd /usr/src/kernel-patches/all/2.6.18/apply && ./debian 2.6.18-9
=> will upgrade your source tree from 2.6.18-8 to 2.6.18-9.

# cd /usr/src/kernel-patches/all/2.6.18/apply && ./debian 2.6.18-4
=> will downgrade your source tree to 2.6.18-4, which matches your current running kernel.

Tricky end.

Till this step, you have got the Debian official released kernel source and can easily change to different patch level.

From next step, you can either use my general way to compile and install kernel imag. Or, you can select to use Debian way to install.

1, cd /usr/src/linux-source-2.6.18
2, make menuconfig # Yes, still need this :frown:
3, fakeroot make-kpkg clean
4, fakeroot make-kpkg --initrd --revision=custom.1.0 kernel_image

Yes, this is a script, but you difinitely need to read the manual carefully to get what you really want. And hopefully if everything runs well, you will get a .deb file (linux-image-2.6.18_custom.1.0_i386.deb), which is a redistributable kernel package.

5, install your new kernel, of cource to use "dpkg -i ../linux-image-2.6.18_custom.1.0_i386.deb". And then just reboot, because dpkg will handle all bootloader upgrade stuff.

All done :smile:

As an alternative way of using Debian official released kernel source, you can also try to get the preconfigured source package via 'apt-get source linux-major' and follow the guide from http://kernel-handbook.alioth.debian.org/ch-common-tasks.html, section 4.2.

But this need a valid source apt source. Not tried this yet.




北京城区地面数字电视收视指南

1, 什么是地面数字电视。
2, 北京电视广播现状。
3, 解决方案。

。。。

1, 什么是地面数字电视。

首先,它不同于有线电视,之所以称为“地面”是因为它的信号传播是靠地面发射塔无线电发射,而并非卫星传播。同时它又不同于传统的电视广播,因为它承载的是高清数字信号。

事实上,现在大家常用的收看电视的方式一般是有线电视,其信号是通过电缆承载的,现在各个城市的有线信号大都已经升级成数字信号,通过机顶盒来解码收看。

既然是无线电发射信号,那么要接收信号天线是必须的了,另一方面,对于数字信号的解码也是需要专门的设备的,就是说你需要一个和家用普通机顶盒类似的“盒子”,或者其他类型的电脑外设来连接天线。

总之,地面数字电视简单来说,就是使用十年前广为使用的天线接收的方式收看高品质的高清电视节目。不同的是,接受设备可以解码后可以直接在电视机上播放,也可以直接连接到电脑上收看,以方便和各种软件的结合使用。(在后面的描述中,我可能会用无线高清来代替无线地面数字电视。)

2, 北京地面数字电视现状。

看起来,这是一种很不错的技术,通过电脑看高清电视,还不需要卫星接收器,那么目前都有哪些节目呢?是不是加密的呢?要不要收费?

目前来看,国内地面数字电视的发展还处于初级阶段,传输标准才刚刚定下来,信号也是于2008年初才开始试播。目前北京开播的有两套高清节目,BTV-HD和CCTV-HD,均是 1920x1080 品质的画质以及AC3-5.1音质的高品质数据流;同时还有六套标清节目,CCTV-1, CCTV-2, CCTV-少儿, CCTV-音乐, BTV-1, CETV-1. 标清节目表和正常电视台一致,画面也音频品质也和普通电视机相当,所以个人认为,如果不是为了录制节目的需求,并且家里有电视机的话,这几套节目其实没有什么意义。

BTV-HD 相对CCTV-HD来说片源较少,一般都是在播放一些高清的纪录片,有时候甚至将标清信号压缩成16:9后播出。CCTV-HD 事实上也没有很多片源,但是奥运期间的赛事转播也足够支撑了 :smile:

所以说,现在使用地面数字电视就是能看到BTV-HD和CCTV-HD 两个频道;虽然不能和香港以及发达国家相比,但是相信随着以后的进一步发展,高清传输一定是电视节目演进的最终方向。目前这些节目都是不加密不收费的,而且根据法规,目前这些频道以后也不应该加密收费(法律规定各省市至少有两套免费高清频道)。

说到这里,我提一下关于高清机顶盒。据我的了解,现在有线传输的高清信号目前只有CCTV-HD 一套,或者至少不会多于无线广播的套数,而有线高清机顶盒动辄接近2000元的价格,相对于只有二三百元的地面无线数字高清接收器来讲,为了收一两个高清频道真是太不划算了。有的同学可能会问了,无线高清的信号稳定性肯定跟有线高清的信号不能比。是这样的,而且无线高清的接收受地理的限制比较大。目前北京的无线高清发射位置在中央电视塔,发射功率大概在千瓦数量级,理论上五环以内都能良好覆盖,但是以前玩过电视天线的都知道,这东西受遮挡影响很大。

所以,在动手之前,还是有必要先了解一下自己的地理位置上是否能够完美接收高清,实在不靠谱的话,也只能走有线电视高清机顶盒方案了。

3, 解决方案。

下面的内容,嗯,我看还是针对电脑用户吧,假设你有一台电脑,带USB接口,那么你可以考虑买一个USB 的高清电视棒。至于品牌和价格嘛,可以自己在网上查一下,选择芯片比较新的棒子(比如凌讯的8G52被认为是能够胜任高清)。

买来后接上电脑,按照说明装好驱动,就可以进行软件配置和电台搜索了。

目前北京开播频道信息:
1, BTV-HD 482MHz
2, CCTV-1 ~ CETV-1 666MHz (标清多载波 ,多个频道同在一个频率)
3, CCTV-HD 674MHz

当然了,开搜之前要先接好天线;可是可以尝试使用随机带的小天线,一般来说需要选择开放点的空间垂直放置天线,比如阳台,可以尝试将天线(带磁铁底座的那种)吸在大块的金属板上(比如机箱盖,饼干盒等)作为地网组成带反射的天馈系统。

按照上述频率搜索之后,幸运的话你就可以欣赏高清节目啦。别忘了有5.1 音箱的话一定接上,看奥运赛事很有现场感的。

/* 下面还有两个话题,一个是软件的使用,另一个是关于天线的。 */

(2008/08/26 待续)

Google Earth 更新

北京城区几乎就是08年8月初最新映像,但是分辨率较以前版本有明显降低。
August 2008
S M T W T F S
July 2008September 2008
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30