NixOS for the loongson2f based Lemote Fuloong Mini-PC

50 views
Skip to first unread message

Lluís Batlle i Rossell

unread,
Sep 15, 2010, 3:32:44 PM9/15/10
to loongson dev, Nix Dev
Hello,

the experimental support for the fuloong computer is already in NixOS
stdenv-updates (the development branch).

Anyone wanting to boot or install NixOS in their Fuloong may find that dream
soon fulfilled.

I added NixOS to the list of distributions here:
http://www.linux-mips.org/wiki/Distributions#NixOS

Information on how to boot or install NixOS in the fuloong (without some nix
knowledge, many things may not look evident):
http://wiki.nixos.org/wiki/Multiplatform_NixOS#Fuloong_Mini-PC

Information on NixOS:
http://nixos.org/nixos

I plan to do further support and be directly involved in the next merge to the
(more) stable branch in nixpgks and nixos.

Thanks to djbclark for providing the hardware, and to r0bertz to provide a base
n32 system (gentoo) to start playing with.

Best regards,
Llu�s.

ri...@happyleptic.org

unread,
Sep 15, 2010, 4:23:19 PM9/15/10
to loongson dev, Nix Dev
-[ Wed, Sep 15, 2010 at 09:32:44PM +0200, Llu�s Batlle i Rossell ]----

> the experimental support for the fuloong computer is already in NixOS
> stdenv-updates (the development branch).

This is really exciting.
As I understand the wiki, this build a n32 userland ?
Any chance for this to work on yeeloong hardware too ?

Lluís Batlle i Rossell

unread,
Sep 15, 2010, 4:58:22 PM9/15/10
to ri...@happyleptic.org, loongson dev, Nix Dev
Hello,

On Wed, Sep 15, 2010 at 10:23:19PM +0200, ri...@happyleptic.org wrote:
> -[ Wed, Sep 15, 2010 at 09:32:44PM +0200, Llu�s Batlle i Rossell ]----
> > the experimental support for the fuloong computer is already in NixOS
> > stdenv-updates (the development branch).
>
> This is really exciting.
> As I understand the wiki, this build a n32 userland ?

Yes.

Xorg with icewm work fine, and also firefox (without the javascript jit
compiler for loongson2f) and mplayer (not the loongson2f optimized).

> Any chance for this to work on yeeloong hardware too ?

No idea. I don't know what does the kernel need there. I used the vanilla kernel
defconfig "lemote2f_defconfig".
gcc 4.5.1 is also built there with "--with-arch=loongson2f".

I don't know the Yeelong hardware. If you want to try, I can assist on getting
it working there. Or I can build a system-tarball like that under special
conditions, like loongson2e or whatever. It should simply be 'a matter of build
time'.

Regards,
Llu�s.

Chen Jie

unread,
Sep 15, 2010, 8:46:16 PM9/15/10
to loongs...@googlegroups.com, Nix Dev, 孙海勇
Great news.

As I known, NixOS has a novel package management system(http://lwn.net/Articles/337677/), which will help users to get rid of possible packages dependency nightmare(e.g. multiply glibc can co-exist, etc)

2010/9/16 Lluís Batlle i Rossell <viri...@gmail.com>
Lluís.

--
You received this message because you are subscribed to the Google Groups "loongson-dev" group.
To post to this group, send email to loongs...@googlegroups.com.
To unsubscribe from this group, send email to loongson-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/loongson-dev?hl=en.


wu zhangjin

unread,
Sep 16, 2010, 8:52:51 AM9/16/10
to loongs...@googlegroups.com, ri...@happyleptic.org, Nix Dev
Hi, Lluís

Great work, thanks ;-)

On 9/16/10, Lluís Batlle i Rossell <viri...@gmail.com> wrote:
> Hello,
>
> On Wed, Sep 15, 2010 at 10:23:19PM +0200, ri...@happyleptic.org wrote:

>> -[ Wed, Sep 15, 2010 at 09:32:44PM +0200, Lluís Batlle i Rossell ]----


>> > the experimental support for the fuloong computer is already in NixOS
>> > stdenv-updates (the development branch).
>>
>> This is really exciting.
>> As I understand the wiki, this build a n32 userland ?
> Yes.
>
> Xorg with icewm work fine, and also firefox (without the javascript jit
> compiler for loongson2f) and mplayer (not the loongson2f optimized).
>
>> Any chance for this to work on yeeloong hardware too ?
> No idea. I don't know what does the kernel need there. I used the vanilla
> kernel
> defconfig "lemote2f_defconfig".
> gcc 4.5.1 is also built there with "--with-arch=loongson2f".
>
> I don't know the Yeelong hardware. If you want to try, I can assist on
> getting
> it working there. Or I can build a system-tarball like that under special
> conditions, like loongson2e or whatever. It should simply be 'a matter of
> build
> time'.

It should work on YeeLoong without any problem, since the kernel
images for YeeLoong and FuLoong are the same.

Regards,
Wu Zhangjin

wu zhangjin

unread,
Sep 16, 2010, 9:02:41 AM9/16/10
to loongs...@googlegroups.com, Nix Dev
Hi, Lluís

FYI, your NixOS for Loongson is added to the distributions List here:
http://dev.lemote.com/code/linux-loongson-community

Thanks & Regards,
Wu Zhangjin

On 9/16/10, Lluís Batlle i Rossell <viri...@gmail.com> wrote:

Lluís Batlle i Rossell

unread,
Sep 16, 2010, 9:21:36 AM9/16/10
to loongs...@googlegroups.com, Nix Dev
Hello,

On Thu, Sep 16, 2010 at 09:02:41PM +0800, wu zhangjin wrote:
> Hi, Llu�s


>
> FYI, your NixOS for Loongson is added to the distributions List here:
> http://dev.lemote.com/code/linux-loongson-community

Thank you very much!

> On 9/16/10, Llu�s Batlle i Rossell <viri...@gmail.com> wrote:
> > Hello,
> >
> > the experimental support for the fuloong computer is already in NixOS
> > stdenv-updates (the development branch).
> >
> > Anyone wanting to boot or install NixOS in their Fuloong may find that dream
> > soon fulfilled.
> >
> > I added NixOS to the list of distributions here:
> > http://www.linux-mips.org/wiki/Distributions#NixOS
> >
> > Information on how to boot or install NixOS in the fuloong (without some nix
> > knowledge, many things may not look evident):
> > http://wiki.nixos.org/wiki/Multiplatform_NixOS#Fuloong_Mini-PC
> >
> > Information on NixOS:
> > http://nixos.org/nixos
> >
> > I plan to do further support and be directly involved in the next merge to
> > the
> > (more) stable branch in nixpgks and nixos.
> >
> > Thanks to djbclark for providing the hardware, and to r0bertz to provide a
> > base
> > n32 system (gentoo) to start playing with.
> >
> > Best regards,

> > Llu�s.

Lluís Batlle i Rossell

unread,
Oct 8, 2010, 4:03:28 AM10/8/10
to tangke, Chen Jie, viri...@gmail.com, loongson-dev
On Fri, Oct 08, 2010 at 02:59:42PM +0800, tangke wrote:
> Hi,when I use the patchelf with loongson2f O32 system, and I download
> the patchelf source code, compile
> When I use the patchelf --set-interpreter /lib/ld.so.1 a.out and I get
> the error message next:
>
> Cannot find .rel.dyn or .rel.got
>
> Maybe the exe file is not exists the .rel.dyn section or .rel.got section
>
> Can you help me ?
Hello,

I never tried patchelf on an o32 system.
Are you sure a.out is a dynamic executable?

Regards,
Llu�s.

tangke

unread,
Oct 8, 2010, 2:59:42 AM10/8/10
to Chen Jie, viri...@gmail.com, loongson-dev
Hi,when I use the patchelf with loongson2f O32 system, and I download
the patchelf source code, compile
When I use the patchelf --set-interpreter /lib/ld.so.1 a.out and I get
the error message next:

Cannot find .rel.dyn or .rel.got

Maybe the exe file is not exists the .rel.dyn section or .rel.got section

Can you help me ?

Thanks in advance

ta...@lemote.com


锟斤拷 2010锟斤拷10锟斤拷08锟斤拷 14:51, tang ke 写锟斤拷:
>
> 锟斤拷 2010锟斤拷10锟斤拷08锟斤拷 14:50, Chen Jie 写锟斤拷:

>> Llu锟斤拷s.


>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "loongson-dev" group.
>> To post to this group, send email to loongs...@googlegroups.com

>> <mailto:loongs...@googlegroups.com>.


>> To unsubscribe from this group, send email to
>> loongson-dev...@googlegroups.com

>> <mailto:loongson-dev%2Bunsu...@googlegroups.com>.

cee1

unread,
Oct 8, 2010, 8:33:24 PM10/8/10
to ke tang, Lluís Batlle i Rossell, loongs...@googlegroups.com
Hi Llufs,

a.out is just a ELF file. (gcc a.c -o a.out).
I've tried patchelf once before and failed in an o32 environment.

Does it work in n32 environment?

2010/10/8 Lluís Batlle i Rossell <viri...@gmail.com>

Lluís.




--
Regards,

- cee1

Lluís Batlle i Rossell

unread,
Oct 9, 2010, 4:11:34 AM10/9/10
to cee1, ke tang, Lluís Batlle i Rossell, loongs...@googlegroups.com
On Sat, Oct 09, 2010 at 08:33:24AM +0800, cee1 wrote:
> Hi Llufs,
>
> a.out is just a ELF file. (gcc a.c -o a.out).
> I've tried patchelf once before and failed in an o32 environment.
>
> Does it work in n32 environment?
It works fine for me in n32, yes. I have a mips32 somewhere... I'll check it
there.

>
> 2010/10/8 Llu�s Batlle i Rossell <viri...@gmail.com>


>
> On Fri, Oct 08, 2010 at 02:59:42PM +0800, tangke wrote:
> > > Hi,when I use the patchelf with loongson2f O32 system, and I download
> > > the patchelf source code, compile
> > > When I use the patchelf --set-interpreter /lib/ld.so.1 a.out and I get
> > > the error message next:
> > >
> > > Cannot find .rel.dyn or .rel.got
> > >
> > > Maybe the exe file is not exists the .rel.dyn section or .rel.got section
> > >
> > > Can you help me ?
> > Hello,
> >
> > I never tried patchelf on an o32 system.
> > Are you sure a.out is a dynamic executable?
> >
> > Regards,

> > Llu�s.
> >
>
>
>
>
> --
> Regards,
>
> - cee1

Lluís Batlle i Rossell

unread,
Oct 11, 2010, 2:54:59 PM10/11/10
to cee1, ke tang, Lluís Batlle i Rossell, loongs...@googlegroups.com
On Sat, Oct 09, 2010 at 08:33:24AM +0800, cee1 wrote:
> Hi Llufs,
>
> a.out is just a ELF file. (gcc a.c -o a.out).
> I've tried patchelf once before and failed in an o32 environment.
Sorry, I just thought that maybe you did not try a latest version. To make it
work for mips n32, we made some changes.

Please try the latest:
http://hydra.nixos.org/build/665373/download/2/patchelf-0.6pre23458.tar.bz2

> 2010/10/8 Llu�s Batlle i Rossell <viri...@gmail.com>


>
> On Fri, Oct 08, 2010 at 02:59:42PM +0800, tangke wrote:
> > > Hi,when I use the patchelf with loongson2f O32 system, and I download
> > > the patchelf source code, compile
> > > When I use the patchelf --set-interpreter /lib/ld.so.1 a.out and I get
> > > the error message next:
> > >
> > > Cannot find .rel.dyn or .rel.got
> > >
> > > Maybe the exe file is not exists the .rel.dyn section or .rel.got section
> > >
> > > Can you help me ?
> > Hello,
> >
> > I never tried patchelf on an o32 system.
> > Are you sure a.out is a dynamic executable?
> >
> > Regards,

cee1

unread,
Oct 17, 2010, 9:45:37 PM10/17/10
to Lluís Batlle i Rossell, ke tang, loongs...@googlegroups.com
Sorry for the late reply...

Seems still doesn't work in o32 environment:

yee@Loong:~/test$ ./patchelf --interpreter ld-test.so leafpad
cannot find .rel.dyn or .rel.got


2010/10/12 Lluís Batlle i Rossell <viri...@gmail.com>

On Sat, Oct 09, 2010 at 08:33:24AM +0800, cee1 wrote:
> Hi Llufs,
>
> a.out is just a ELF file. (gcc a.c -o a.out).
> I've tried patchelf once before and failed in an o32 environment.
Sorry, I just thought that maybe you did not try a latest version. To make it
work for mips n32, we made some changes.

Please try the latest:
http://hydra.nixos.org/build/665373/download/2/patchelf-0.6pre23458.tar.bz2


--
Regards,

- cee1

Daniel Clark

unread,
Oct 25, 2010, 2:24:41 PM10/25/10
to loongs...@googlegroups.com, Nix Dev
2010/9/15 Lluís Batlle i Rossell <viri...@gmail.com>
Lluís.

--
You received this message because you are subscribed to the Google Groups "loongson-dev" group.
To post to this group, send email to loongs...@googlegroups.com.
To unsubscribe from this group, send email to loongson-dev...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/loongson-dev?hl=en.


Sweet! I'll need to give this a try ASAP. 

I've been waiting for some n32 distro to but on a small (7-computer) fuloong compile farm with install doc usable by people not expert with the system, so you may have beaten Gentoo in that regard (I'm hoping lxc - http://lxc.sourceforge.net/ - will work on loongson2f, so people will be able to use the build farm with the GNU/Linux distro of their choice, regardless of what is running on the "bare metal"; I just want the "bare metal" OS to be optimized to the loongson2f chip to maximize performance.)

If anyone wants to play with the port on a Yeeloong, my company will give you a discount (probably only useful for those not in China ;-) -- I'd be interested in making NixOS a preinstall option for yeeloongs we sell (we don't sell fuloong due to lack of some US FCC certification  and the fact we aren't yet scaled up enough to do so in enough quantity to make it worth it to get that certification, but you can buy one if you are in the US from a non-US company without problems as far as I know - specifically http://www.tekmote.nl sells them via a web store.)

Also if anyone wants to try getting NixOS to work on more esoteric loongson2f hardware that is hard to get outside of China, email me off-list -- specifically IMHO NixOS is really great for servers, so would be interesting if it could be made to work on the U-NAS II (a very small loongson2f box with 2 3.5" internal SATA drive bays and 2 eSATA ports, no video, 2 gigabit ethernet ports, normally boots off of some kind of internal solid state device, so don't know how easy it would be to get it to boot anything but the default Chinese-language software, but might be fun for someone to play with.)

Happy Hacking,
--
        \|/      Daniel JB Clark | Activist; Owner
FREEDOM -+-> INCLUDED ~ http://freedomincluded.com      
        /|\      Free Software respecting hardware

Cedric Cellier

unread,
Oct 26, 2010, 4:03:52 AM10/26/10
to loongs...@googlegroups.com
> I've been waiting for some n32 distro to but on a small (7-computer) fuloong
> compile farm with install doc usable by people not expert with the system,

Having followed Viric path to install NixOs on my recently acquired
fuloong while being completely ignorant about NixOs design nor NixPkgs
mechanisms, I can testify that it's not very hard to install and use,
iif you connect to irc #nixos and report there all the issues
encountered.

Once installed it's very nice though.
I've not tested lxc availability but I will.

Reply all
Reply to author
Forward
0 new messages