linux-mips
[Top] [All Lists]

Re: [loongson-PATCH-v3 17/25] add a machtype kernel command line argumen

To: wuzhangjin@gmail.com
Subject: Re: [loongson-PATCH-v3 17/25] add a machtype kernel command line argument
From: Zhang Le <r0bertz@gentoo.org>
Date: Wed, 10 Jun 2009 23:40:33 +0800
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, Wu Zhangjin <wuzj@lemote.com>, Yan Hua <yanh@lemote.com>, Philippe Vachon <philippe@cowpig.ca>, Zhang Fuxin <zhangfx@lemote.com>, loongson-dev <loongson-dev@googlegroups.com>, Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>, Arnaud Patard <apatard@mandriva.com>
In-reply-to: <d1f4caa360114f843459dc71827b1175232a24be.1244120575.git.wuzj@lemote.com>
Mail-followup-to: wuzhangjin@gmail.com, linux-mips@linux-mips.org, ralf@linux-mips.org, Wu Zhangjin <wuzj@lemote.com>, Yan Hua <yanh@lemote.com>, Philippe Vachon <philippe@cowpig.ca>, Zhang Fuxin <zhangfx@lemote.com>, loongson-dev <loongson-dev@googlegroups.com>, Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>, Arnaud Patard <apatard@mandriva.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cover.1244120575.git.wuzj@lemote.com> <d1f4caa360114f843459dc71827b1175232a24be.1244120575.git.wuzj@lemote.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.19 (2009-01-05)
On 21:08 Thu 04 Jun     , wuzhangjin@gmail.com wrote:
> From: Wu Zhangjin <wuzj@lemote.com>
> 
> the difference between yeeloong-7inch and yeeloong-8.9inch is very
> small, only including the screen size and shutdown logic. so, it's very
> important to share the same kernel image file between them instead of
> adding some new kernel config options. benefit from this, the
> distribution developers only have a need to compile the kernel one time.
> 
> to share the same kernel image file between yeelooong-7inch and
> yeeloong-8.9inch, there is a need to add a kernel command line, here I
> name is machtype, it works like this:
> 
>       machtype=lemote-yeeloong-2f-7inch
>             company - product - cpu revision - size
> 
> so, we can choose a suitable vga mode for the screen of different size
> by default via this kernel command line in prom_init, here exactly is
> mach_prom_init_cmdline in arch/mips/loongson/yeeloong-2f/init.c.
> 
> the vga command line will be used later in the SMI video driver to
> choose a suitable screen resolution ratio.
> 
> and also, we can get the true machine name via this kenrel command line
> argument.

I have tested this patchset on both fuloong 2f and 2e boxes.
It works well except for that duplicated #include's problem.

However, there is an annoying problem. The system type on these two boxes
has an "-unknowninch" ending, which does not make any sense at all. 

So I made a patch on top of your patchset which makes kernel param
machtype=lemote-yeeloong-2f-7inch work as before, while on fuloongs return
system types like "lemote-fuloong-2e-box" and is less intrusive againt
linux-mips tree.

I will post this patch after I test the patchset on yeeloong 8.9 notebook.

-- 
Zhang, Le
Gentoo/Loongson Developer
http://zhangle.is-a-geek.org
0260 C902 B8F8 6506 6586 2B90 BC51 C808 1E4E 2973

Attachment: pgpWIX2MSxCj3.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>