存档
bochs 2.1.1 配置文件问题
如果出现: Message: ROM: couldn’t open ROM image file ‘file=/usr/share/bochs/VGABIOS-lgpl-latest’.
那是因为 2.1.1 和2.2pre的配置文件格式不一样
把file=去掉就好了
gcc -S in kernel 2.6
以前写过一个blog是关于hack Makefile的,不过是2.4下。
现在需要在2.6的makefile里做同样的事
修改./scripts/Makefile.build
+CBD_S_cc_o_c = $(CC) $(c_flags) -S -o $*.s \
+ $(if $(filter-out /%,$<),$(srctree)/$<,$<)
%.o: %.c FORCE
$(call cmd,force_checksrc)
+ $(call CBD_S_cc_o_c)
$(call if_changed_rule,cc_o_c
即可
gcc -S
以前改的也存下档吧,省得找不到了
为了查汇编文件输出
Rule.make
…
[snip]
%.o: %.c
$(CC) $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -S $<
$(CC) $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) $(CFLAGS_$@) -c -o $@ $<
[snip]
…
ebuild里的functions
pkg_setup 必须先做的各种任务,检查配置文件啥的
pkg_nofetch 显示点信息告诉user不能自动下载的原因,比如license问题
src_unpack解包,打补钉,运行辅助程序
src_compile配置和编译
src_install安装
src_test只有设置了FEATURES=”maketest”并且不设置RESTRICT=”maketest”才执行
pkg_preinst在merging之前做的事
pkg_postinst在merging之后做的事
pkg_prerm在删除之前做的事
pkg_postrm在删除之后做的事
pkg_config You use this function to setup an initial configuration for the package after it’s installed. All paths in this function should be prefixed with ROOT. This function is only executed if and when the user runs: ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config.
helper functions
use检查use标志
has_version如果指定某个包有需要的版本返回1。
例如:has_version >=sys-libs/glibc-2.3.0
best_version返回指定包的版本
use_with如果指定标志被定义了返回–with-foobar反之返回–without-foobar
use_enable如果指定标志被定义了返回–enable-foobar反之返回–disable-foobar
check_KV检查kernel的版本号
keepdir用于在指定的目录下创建一个.keep文件,以免被自动清楚。永远不要自己建这个.keep,否则如果以后portage改变对keepdir的处理方法就不能自动处理这个portage了
econf传递额外的参数给./configure
einstall传递额外的参数给make命令,注意不提倡用einstall替换make install DESTDIR=${D}
die搞死当前的进程,最好告诉为什么
einfo提醒用户重要的事
写了一个统计一堆文件总大小的script
使用方法 mycount.sh “*.ext”
没有处理目录,懒了
bash-2.05b$ cat ~/bin/mycount.sh
#!/bin/sh
total=0
list=`ls $1`
for item in $list
do
size=`ls -l $item|awk ‘{print $5}’`
total=`expr $total + $size`
done
echo $total
硬盘手机终于出现了
Nokia to launch phone that stores 3,000 songs
Published: April 27, 2005, 11:00 AM PDT
By Dinesh C. Sharma
Special to CNET News.com
TrackBack Print E-mail TalkBack
Nokia on Wednesday announced a trio of new phones, including one that can store up to 3,000 songs.
The N91 has an integrated 4GB hard disk and supports digital music formats including MP3, M4A, AAC and WMA, Nokia said.
Additionally, the handset comes with a stereo headset with remote control. The N91, expected to ship by the end of the year, will also feature a 2-megapixel camera, e-mail support, a Web-browser and video-sharing capabilities, the device maker said.
The phone supports WCDMA, wireless local area networking and Bluetooth, and subscribers can shop at online music stores directly from the device, the company said. Users can synchronize the device with their computers via USB 2.0 and create and manage playlists that, in turn, can be shared with others via Bluetooth, e-mail or multimedia messaging.
Another new WCDMA handset from Nokia is the N70, a smart phone featuring a 2-megapixel camera, a flash and “front camera” for video calling, stereo FM radio, a digital music player, visual radio and 3D games. The camera has a “slide and shoot” design, in which the slide automatically activates the camera.
The handset’s camera has an integrated flash, 20x zoom capability and other options. Video and photo from the camera can be transferred on to a PC; organized in a slideshow or album on the camera; or printed using a USB cable, Bluetooth or reduced-size dual voltage multimedia card. The device is expected to be available in the third quarter.
Lastly, the Finnish phone maker announced the N90, which features a 2-megapixel camera with autofocus and 20x digital zoom, an integrated flash, video capture with editing functions and Carl Zeiss optics, Nokia said. Carl Zeiss optics, named for the pioneering German optician, are used for projection and illumination.
The handset’s rotating camera barrel is designed to let users shoot video, as well as pictures. When the main display is unfolded and twisted, the N90 can be used to shoot video in MP4 format.
The N90 also features different options for storing, sharing and printing photos and video clips, and it supports 3G functions such as two-way video calling, video streaming and Net surfing. It is a triband phone for GSM 900/1800/1900, EDGE and WCDMA networks.