Linux v2.6.37-rc4, v2.6.36.1, v2.6.35.9 for Loongson

Skip to first unread message

wu zhangjin

Dec 5, 2010, 8:10:59 AM12/5/10
to loongson-dev, 刘世伟, Yajin, Alexandre Oliva, Mads, zhangfx, Zhang Le
Hi, All

In our linux-loongson-community[1] project, Linux v2.6.37-rc4(master
branch), v2.6.36.1, v2.6.35.9 are available for Loongson.

*Important Changes*

1. v2.6.37-rc4 adds Gdium support

Most of the Gdium functions have been supported except the sound card
and Hibernation/Suspend, a small defconfig with basic kernel options
is added: arch/mips/configs/gdium_small_defconfig, If you need more
kernel features, please refer to arch/mips/configs/lemote_defconfig
and add them yourself.

This support is mainly based on the work of Yajin and Arnaud Patard,
thanks to them.

2. The above 3 versions applies the mainline "automated per session task groups"

The mainline "automated per session task groups/autogroup" has
improved the desktop response latency a lot, which is 'very very'
important to our low-end Loongson machines, so, we backport and enable
it by default.

It doesn't work with BFS and some discussion shows autogroup works
well as BFS but it is more stable than BFS, so, we just disable BFS
and enable autogroup instead.

3. The above 3 versions appies "R4K Timer work with CPUFreq driver"

The CPUFreq driver didn't work well before 2.6.36. In 2.6.36,
GangLiang added a new high resolution MFGPT Timer implementation to
make CPUFreq driver works, but unfortunately, Shiwei Liu has reported,
with the new MFGPT Timer implementation, the system time slower down
about 12s per hour, the cause is the limitation of the 16bit count
register(overflow quickly) and the low frequency(low resolution, only
about 1/32 us) of the MFGPT Timer.

Now, based on the commit "Fix r4k clocksource and clockevent with
cpufreq" from git://",
Some necessary cleanups & fixups has been added to make R4K Timer work
very well with CPUFreq driver. As a result, we get a working CPUFreq
driver and a stable system time, and therefore, from now on, to make
CPUFreq driver work on Loongson machines, no need to driver an
external Timer (except the persistent RTC Timer), this even save a
hardware device.

4. Fixes the building failure of the CPUFreq driver (reported by Mads
<>, thanks to him)

*Plan for future maintaining of the linux-loongson-community project*

I have been very tired to maintain a bunch of the old branches and
with the continuous development of the mainline Linux, the number of
the old branches will increase very quickly, so, I think, we must give
up some out-of-date old branches and just let them stay in the git
repository, when the people need it, just fetch it and pull the
updates from the -stable git repo maintained by Greg K-H and the MIPS
-stable branches maintained by Ralf[2].

I plan to only maintain some specific branches:

1. The master branch

This branch must be maintained timely, otherwise, we may be impossible
to follow the mainline development and some drivers may be broken by
the changes of the kernel APIs.

Most of the new kernel versions has added some changes to the kernel
APIs, so, the maintaining of this branch is time-consuming. Let's use
the latest master branch as an example, I have fixed at least 5 bugs
introduced by the mainline changes, most of them need several minutes
or hours to debug and test.

And sometimes, some new Linux-Loongson specific bugs may be found and
reported by some active users, which also should be fixed. e.g. Shiwei
Liu just reported the slowdown problem of the system time in 2.6.36
and I have spent at least 24 hours to make the R4K Timer to work
normally with the CPUFreq driver.

And the support of some new boards may be added, for example, the
basic support of Gdium has been added in this master branch.

After the patches in our master branches becomes stable, they should
be pushed into the mainline, the time of upstream is uncertain, of
course, it is also time consuming.

2. The latest -stable branch

The latest -stable branch is the kernel version just older than the
one in the master branch, currently, the version in our master branch
is 2.6.37-rcX, the latest -stable branch is 2.6.36.

3. The latest -longterm branch

The Linux community has made a plan to maintain a -longterm version of
Linux, which is similar to the -stable version, but it may be
maintained for longer. the 1st longterm version will be 2.6.35. so,
this will also be maintained in our git repository.

So, from now on, in our linux-loongson-community, only 2.6.35, the
latest -stable branch and the master branch will be maintained. For
the generic users, 2.6.35 is recommended, but If you need more
features, the latest stable branch is a better choice, currently, it
is 2.6.36, but for the 'active' users, welcome to test the master
branch and report bugs, then we can get a bug-less stable branch,
thanks in advance ;-)


Thanks to Lemote for providing the Loongson machines to maintain this project.

Thanks to Shiwei Liu for maintaining a pre-installed Debian system
with the latest stable Linux in


This project is maintained in the maintainers' off-hour without pay
;-) so, the response latency of the Emails and the release time of the
-stable versions can not be guaranteed, please be patient.

If you have interest to play with this project, please access the
homepage[1], there is a long TODO list, you can select one item,
finish it and send patches to this mailing list. Of course, bug
reports are welcome. and If you want to maintain this project together
with us or want to maintain one of the branches, please also send an
Email to this mailing list and CC to the maintainers.

Best Regards,
Wu Zhangjin
[2] some steps to get a latest stable Linux for Loongson

1. Fetch the branch from linux-loongson-community git repository
(Maintained by me, Zhang Le and Alex)

// Init a local repo
$ mkdir linux-loongson
$ cd linux-loongson
$ git init

// Fetch a stable branch from linux-loongson-community git repo
$ git fetch git://
$ git checkout -b 2.6.xx FETCH_HEAD

2. Pull the updates from the -stable git repo (Maintained by Greg K-H)

$ git pull git://

Note: You may get merge conflicts, please fix it before build it, If
you can not fix it easily, post a question to this mailing list and
add me into the CC: list. the same to the below pull.

3. Pull the updates from Linux-mips git repo

$ git pull git:// linux-2.6.26-stable

Now, you will get a latest stable Linux for Loongson, sometimes, you
may need to get some fixups from the newer stable branches or the
master branch in our git repository.

Lluís Batlle i Rossell

Dec 11, 2010, 7:44:20 AM12/11/10
to, 刘世伟, Yajin, Alexandre Oliva, Mads, zhangfx, Zhang Le
Hello Wu,

On Sun, Dec 05, 2010 at 09:10:59PM +0800, wu zhangjin wrote:
> Hi, All
> In our linux-loongson-community[1] project, Linux v2.6.37-rc4(master
> branch), v2.6.36.1, v2.6.35.9 are available for Loongson.

So, for what I understand, all changes happen in released versions.
Getting the tarballs will include the changes you mention, is it?

Thank you,

wu zhangjin

Dec 11, 2010, 3:40:32 PM12/11/10
to, 刘世伟, Yajin, Alexandre Oliva, Mads, zhangfx, Zhang Le
2010/12/11 Lluís Batlle i Rossell <>:

No, lots of patches(include all changes in this thread, some of them
are not needed for mainline) only stay in the linux-loongson-community
git repository, that is why I mentioned "In our
linux-loongson-community[1] project" above.

I do have the plan to upstream them, but there are lots of patches
there, some of them

1. may be not clean enough for mainline
2. may be not stable enough for mainline

The most important point is I don't have enough time(off-hour here for
I have my own work to do) to clean and test them, so, we can not
expect them being in the coming releases of

BTW: For FuLoong PC, provides most of the support, but for
YeeLoong netbook, the support form is not enough, and for
Gdium netbook, doesn't support it.

Wu Zhangjin


Dec 16, 2010, 11:29:05 AM12/16/10
to wu zhangjin, loongson-dev, 刘世伟, Yajin, Alexandre Oliva, Mads, zhangfx
Hi, Zhangjin,

Thanks for the hardwork!

I just hope that after I settle down in US, I could have more time
to work on what I'd like to do, of course including LLC. :)

Google's recruiting process is too time consuming. :)

0260 C902 B8F8 6506 6586 2B90 BC51 C808 1E4E 2973

Reply all
Reply to author
0 new messages