Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
关于unicon在nitro-source下的安装
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese)
View previous topic :: View next topic  
Author Message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Mon Dec 13, 2004 4:06 am    Post subject: 关于unicon在nitro-source下的安装 Reply with quote

我想在nitro-sources下安装unicon
因为我想要reiser4/win4lin/fbsplash,再加上console的中文支持
可是在patch了unicon之后,编译的时候出现了这样的错误:

Code:

CHK include/linux/version.h
make[1]: `arch/i386/kernel/asm-offsets.s' is up to date.
CHK include/asm-i386/asm_offsets.h
CHK include/linux/compile.h
dnsdomainname: Unknown host
GEN .version
CHK include/linux/compile.h
dnsdomainname: Unknown host
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
drivers/built-in.o(.text+0x15eb3): In function `put_queue':
: undefined reference to `Unicon_fnKeyHook'
drivers/built-in.o(.text+0x15f92): In function `puts_queue':
: undefined reference to `Unicon_fnKeyHook'
drivers/built-in.o(.text+0x16497): In function `fn_send_intr':
: undefined reference to `Unicon_fnKeyHook'
drivers/built-in.o(.text+0x19e32): In function `respond_string':
: undefined reference to `Unicon_fnKeyHook'
make: *** [.tmp_vmlinux1] Error 1


应该怎么改呢?
错误信息是说没有找到某某函数,
但我不知道怎么改动来修正这个错误
有人知道么?

- Eric.20041213 编辑: 抱歉, 我不能回答你的问题, 不过给你的帖子编辑一下, 用 BBCode 把你的编译错误引用起来, 这样可以得到更好的可读性. 也在此强烈推荐大家学会使用 BBCode :)

:oops:

呵呵,已经把安装问题解决,简要的说明如下:
(其实还是我的linux功力不够,再加上开始几次有着心急,没仔细看说明)

首先是给kernel打个patch,
nitro4的版本是2.6.9的,
所以应该下这个:
http://vdlinux.sourceforge.jp/dists/vd_unicon-kernel-2.6.9-20041019.patch.bz2
如果是其他版本的kernel的话,
到http://vdr.jp/d/docs/unicon.html
这儿有比较全的patch和安装设置说明,(不过是日文的,不过我们也只需要那些代码而已.:P)
然后转到源代码下:
Code:

cd /usr/src/linux
patch -p1 <vd_unicon-kernel-2.6.9-20041019.patch.bz2 //这是我的版本需要的,可能大家不太一样。

然后会出现一小段错误,生成一个rej文件,应该是vt.c文件没法patch,可能nitro打的patch太多了,有点冲突,我google了一下,明白了patch错误的解决方法,根据rej的内容,把patch里的东东补上。大概在3480行左右,有些宏没有加上,这个就是导致失败的原因。
然后就很简单了,make menuconfig,
在Device drivers->Graphic Drivers里把unicon选上,如果你要支持中文的话。(费话,:p),把GB和GBK选上。
然后make ;make modules &&make modules_install;
把新内核放到boot下,OK了。


第二步就是编译unicon这个软件了,还是遇到了不少的麻烦,google也没有什么东西可用,就是找到人说成功地在rh as3下安装过unicon,要打上刚才那个网页里的vd_unicon-userland-20031122vd.patch,是可以,不过我用这个方法也成功过一次。
解决的方法有两种:
比较简单的方法,修改源码,
在unicon出错的信息里把到出错的文件(应该叫uniconcfg.c),根据出错信息在一个叫TextFont***函数里把在case最后加个;(分号),然后就可以通过了,这个可能是gcc的版本关系。还有可能就是有些声明不兼容,把声明注释掉就可以了。
麻烦一点的方式:
打那个useland补丁,修改ebuild文件,把debian补丁去掉,再改Makefile,把Cxterm里的utils包去掉,然后就OK了。(不推荐这个方法,我只试成功过一次,下来就不甘心,一直编译官方的版本,找错,设置,后来虽然编译成功了,也能调用了,可是还是不能显示。)

设置:
我是这样设置的,基本上是模仿来的,稍微改了一点(因为不成功显示,所以应该可以忽略)。:P
Code:

mknod /dev/unikey c 10 202
chmod 640 /dev/unikey

在你的.bashrc里加上
Code:

# UNICON for EUC-gb

if [ \( -f /lib/modules/`/bin/uname -r`/kernel/drivers/video/unicon/unikey.o \
     -o -f /lib/modules/`/bin/uname -r`/kernel/drivers/video/unicon/unikey.ko \) \
     -a -x /usr/bin/uniconctrl \
     -a -e /dev/fb0 ]; then
        /sbin/modprobe unikey
        /sbin/modprobe encode-gb

        /usr/bin/loadunimap /usr/lib/unicon/direct.uni
        #/usr/bin/consolechars --sfm /usr/lib/unicon/direct.uni

        /usr/bin/uniconctrl --gb tty1
        /usr/bin/uniconctrl --gb tty2
        /usr/bin/uniconctrl --gb tty3
        /usr/bin/uniconctrl --gb tty4
        /usr/bin/uniconctrl --gb tty5
        /usr/bin/uniconctrl --gb tty6
fi


不过还是没有成功,现在暂时没时间再试验中………………,
比较郁闷。


Last edited by BlueSand on Wed Dec 15, 2004 8:02 am; edited 2 times in total
Back to top
View user's profile Send private message
bookstack
Apprentice
Apprentice


Joined: 27 Feb 2004
Posts: 245

PostPosted: Tue Dec 14, 2004 12:15 am    Post subject: Reply with quote

你应该首先确定unicon的patch确实打上了,
check一下/usr/src/linux有没有*.rej

如果有,看看为什么Reject,因为unicon的patch应该是基于vanillla-sources,可能你需要自己去修改unicon的patch。

如果编译成功,再用diff,你就可以发布一个基于nitro4的unicon patch了给其他需要的朋友用了。

hoho
Back to top
View user's profile Send private message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Tue Dec 14, 2004 3:22 am    Post subject: Reply with quote

呵呵,昨天搞了一夜,已经打上了,
也把unicon成功安装了,
不过虽然编译成功了,也把modules加载上了,
不过还是在console下显示不了中文,
unicon的文档又不完整,不知道应该怎么显示了。
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Tue Dec 14, 2004 4:15 am    Post subject: Reply with quote

BlueSand wrote:
呵呵,昨天搞了一夜,已经打上了,
也把unicon成功安装了,
不过虽然编译成功了,也把modules加载上了,
不过还是在console下显示不了中文,
unicon的文档又不完整,不知道应该怎么显示了。



BlueSand, 试试了解一下 /etc/rc.conf 中的 UNICODE="yes" 变量. 原注释:

Code:

# UNICODE specifies whether you want to have UNICODE support in the console.
# If you set it to yes, please make sure to set a UNICODE aware CONSOLEFONT
# and KEYMAP.


成功了请把你的方法贴出来 :)

另外, 发贴时标题不必带上 "请问一个问题" 或是 "求助" 这样的字眼, 只需把你的题目组织成一个问句, 然后带上问号, 那么大家就都明白了:)

而且由于标题长度是有限制的, 省下的字可以让你写多几个关键字, 便于想帮助你的人迅速发现你的帖子 :)

请参看发贴指引个人心得版第 5 点 :D


Edit:
. 添加发贴指引链接
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
cpp
n00b
n00b


Joined: 11 Jul 2004
Posts: 9
Location: Beijing, China

PostPosted: Tue Dec 14, 2004 11:31 am    Post subject: Reply with quote

我记得以前在rh上装unicon也出现过类似问题,把开机时的setconsolefont关调就可以了
_________________
I'm sorry for my bad English.
MSN: shichao_cppfan@msn.com
Back to top
View user's profile Send private message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Wed Dec 15, 2004 8:06 am    Post subject: Reply with quote

EricHsu wrote:
BlueSand wrote:
呵呵,昨天搞了一夜,已经打上了,
也把unicon成功安装了,
不过虽然编译成功了,也把modules加载上了,
不过还是在console下显示不了中文,
unicon的文档又不完整,不知道应该怎么显示了。



BlueSand, 试试了解一下 /etc/rc.conf 中的 UNICODE="yes" 变量. 原注释:

Code:

# UNICODE specifies whether you want to have UNICODE support in the console.
# If you set it to yes, please make sure to set a UNICODE aware CONSOLEFONT
# and KEYMAP.


成功了请把你的方法贴出来 :)

另外, 发贴时标题不必带上 "请问一个问题" 或是 "求助" 这样的字眼, 只需把你的题目组织成一个问句, 然后带上问号, 那么大家就都明白了:)

而且由于标题长度是有限制的, 省下的字可以让你写多几个关键字, 便于想帮助你的人迅速发现你的帖子 :)

请参看发贴指引个人心得版第 5 点 :D


Edit:
. 添加发贴指引链接


已经改过的,还是没用的。呵呵,原文已改,包括了unicon的安装出错部分的解决方法。谢谢,我很少上论坛,一般就上BBS。
Back to top
View user's profile Send private message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Wed Dec 15, 2004 11:44 am    Post subject: Reply with quote

cpp wrote:
我记得以前在rh上装unicon也出现过类似问题,把开机时的setconsolefont关调就可以了

你是指rc.conf里的这行么?
Code:

CONSOLEFONT="default8x16"

我刚注释掉过,也没有效果。:(
呵呵,刚才试了google了一下,也没有相关的中文fonts,
暂时看看别人有别的方法吧。
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Wed Dec 15, 2004 12:35 pm    Post subject: Reply with quote

BlueSand wrote:

已经改过的,还是没用的。呵呵,原文已改,包括了unicon的安装出错部分的解决方法。谢谢,我很少上论坛,一般就上BBS。


我设置了 LC_CTYPE, LC_MESSAGES 以及 LANG 都等于 zh_CN.GBK 之后, console 里就出现中文信息 (如系统重启/关机) 了, 不过也都是乱码, 当时看过 rc.conf 之后, 就以为改了 UNICODE="yes" 再在哪里指定个中文字体 (simsun 之类的) console 就可以显示中文... 原来这么复杂啊... 8O
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
timeout
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2003
Posts: 75

PostPosted: Wed Dec 15, 2004 1:32 pm    Post subject: Unicon Problem Reply with quote

you can find unicon nitro4 patch from glc cvs

I did try couple times, but still no success.
I made it works on Magic Linux RC1, but i can not start unicon's cce because of gcc34 problem.

Are you use gcc34 or gcc33, can you provide more detail about how it works?
Thx advanced.

jackey
Magic Linux
Back to top
View user's profile Send private message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Wed Dec 15, 2004 3:46 pm    Post subject: Reply with quote

EricHsu wrote:
BlueSand wrote:

已经改过的,还是没用的。呵呵,原文已改,包括了unicon的安装出错部分的解决方法。谢谢,我很少上论坛,一般就上BBS。


我设置了 LC_CTYPE, LC_MESSAGES 以及 LANG 都等于 zh_CN.GBK 之后, console 里就出现中文信息 (如系统重启/关机) 了, 不过也都是乱码, 当时看过 rc.conf 之后, 就以为改了 UNICODE="yes" 再在哪里指定个中文字体 (simsun 之类的) console 就可以显示中文... 原来这么复杂啊... 8O

你设的是locales,在正常的kernel下是无法正常显示双字节字符的,
一般有两种方法,一种是外挂式的,就像以前的ucdos一样的。(没用过,听说的),
自己另启一个终端,用这个终端来显示中文,比较有名的是zhcon和cce
呵呵 ,unicon是比较好的,属于另一种吧,给内核打上补丁,再在已经有终端上外加上模块,过滤并显示中文信息。所以不太影响现有终端的显示,也就是和我想要的splash不冲突,:P
呵呵,千辛万苦只为了显示那个pp的splash和中文而已,当然还有reiser4。呵呵。
Back to top
View user's profile Send private message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Wed Dec 15, 2004 3:54 pm    Post subject: Re: Unicon Problem Reply with quote

timeout wrote:
you can find unicon nitro4 patch from glc cvs

I did try couple times, but still no success.
I made it works on Magic Linux RC1, but i can not start unicon's cce because of gcc34 problem.

Are you use gcc34 or gcc33, can you provide more detail about how it works?
Thx advanced.

jackey
Magic Linux


so am i. i just download it there , but it sucks when i try to install it.
the gcc34 problem you mentioned is just what i met there.
so just follow me tips about the unicon's installation,it'll work.
i use gcc 3.4.3.
please read the errors when you compile it,
remember that the official unicon is installable,
but you have got to fix some grammar conflicts about gcc.
just in uniconcfg.c and other two files.
uniconcfg.c : add a ; (semi-comma)
other two files: comment out the wrong line, just do it , no problem
Back to top
View user's profile Send private message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Wed Dec 15, 2004 3:58 pm    Post subject: Re: Unicon Problem Reply with quote

timeout wrote:
you can find unicon nitro4 patch from glc cvs

I did try couple times, but still no success.
I made it works on Magic Linux RC1, but i can not start unicon's cce because of gcc34 problem.

Are you use gcc34 or gcc33, can you provide more detail about how it works?
Thx advanced.

jackey
Magic Linux

if u just want a chinese conslole , u can try zhcon and cce2k
both works fine here.
Back to top
View user's profile Send private message
timeout
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2003
Posts: 75

PostPosted: Wed Dec 15, 2004 5:16 pm    Post subject: Re: Unicon Problem Reply with quote

BlueSand wrote:
timeout wrote:
you can find unicon nitro4 patch from glc cvs

I did try couple times, but still no success.
I made it works on Magic Linux RC1, but i can not start unicon's cce because of gcc34 problem.

Are you use gcc34 or gcc33, can you provide more detail about how it works?
Thx advanced.

jackey
Magic Linux

if u just want a chinese conslole , u can try zhcon and cce2k
both works fine here.


that is not a solution, but i found the solution for all of us
check out http://euler.acadiau.ca/~043936y/index.php?job=art&articleid=a_20041209_221844
Back to top
View user's profile Send private message
BlueSand
n00b
n00b


Joined: 08 Dec 2004
Posts: 12

PostPosted: Thu Dec 16, 2004 2:29 am    Post subject: Re: Unicon Problem Reply with quote

timeout wrote:
BlueSand wrote:
timeout wrote:
you can find unicon nitro4 patch from glc cvs

I did try couple times, but still no success.
I made it works on Magic Linux RC1, but i can not start unicon's cce because of gcc34 problem.


Are you use gcc34 or gcc33, can you provide more detail about how it works?
Thx advanced.

jackey
Magic Linux

if u just want a chinese conslole , u can try zhcon and cce2k
both works fine here.


that is not a solution, but i found the solution for all of us
check out http://euler.acadiau.ca/~043936y/index.php?job=art&articleid=a_20041209_221844

do u try it out ?
i find it somewhere else before i post the post,
http://66.102.7.104/search?q=cache:nkBQh6gIAaMJ:bbs.chinaunix.net/forum/4/041122/449951.html+unicon+gentoo+&hl=zh-CN&client=firefox%20target=_blank
the Timeout is u?
but i don't think it 's useful for it is on vanilla kernel not on nitro kernel
and its platform is rh as3 not gentoo
and the author seems to copy it somewhere else,and doesn't add quoted.//i don't like it.
and i didn't even try it.
i have succeeded in patch the kernel and compile it on gentoo-dev-sources,but i didn't continue to install unicon.
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Thu Dec 16, 2004 3:58 am    Post subject: Reply with quote

Hi, BlueSand & timeout,

回贴时请尽量避免 "交织回复", 引用对方的话时, 顺手删掉引用里的引用 (的引用...), 这样可以提高帖子的可读性, 减少页面流量 (毕竟引用的引用 (的引用...) 在前贴里大家都看的到, 无需再引), 举手之劳就可以让回贴效果更好, 谢谢 ;)

发贴指引

另, to timeout:

你的帖子:
直接让你的 console 支持中文显示

内容与此贴相关, 可否考虑把那个帖子的内容并入此贴, 以让信息集中? 如果的觉得麻烦的话, 那告诉我一声, 我来帮你引用过来 :)
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
EricHsu
Bodhisattva
Bodhisattva


Joined: 03 May 2004
Posts: 591
Location: Aragon Consulting Group, Beijing, China

PostPosted: Thu Dec 16, 2004 4:10 am    Post subject: Reply with quote

BlueSand wrote:

你设的是locales,在正常的kernel下是无法正常显示双字节字符的,
一般有两种方法,一种是外挂式的,就像以前的ucdos一样的。(没用过,听说的),
自己另启一个终端,用这个终端来显示中文,比较有名的是zhcon和cce
呵呵 ,unicon是比较好的,属于另一种吧,给内核打上补丁,再在已经有终端上外加上模块,过滤并显示中文信息。所以不太影响现有终端的显示,也就是和我想要的splash不冲突,:P


原来如此, 才明白! Thanks!

Quote:

呵呵,千辛万苦只为了显示那个pp的splash和中文而已,当然还有reiser4。呵呵。


我现在的系统颇为 bleeding edge:
. Reiser4
. stage1, gcc34-x86-2004.2 profile, 以 gcc34 bootstrap 且编译所用软件
. 还使用了 LDFLAGS 优化...

速度嘛, glxgears 的时候, 比原来的系统多了 30 多 fps ...

安装过程如我的习惯, 做了大量笔记, 这两天我会整理上来, 大家一起 bleeding edge 吧 :)
_________________
- http://nkbit.com
- http://twitter.com/xuyihua
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index 中文 (Chinese) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum