Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 282265 (mips-loongson)

Summary: [TRACKER] Gentoo Loongson support (Yeelong and 2E Fulong)
Product: Gentoo Linux Reporter: Stuart Longland (RETIRED) <redhatter>
Component: [OLD] Core systemAssignee: MIPS Porters <mips>
Status: RESOLVED OBSOLETE    
Severity: normal CC: petr.pisar, tong__hui, yuanyelele
Priority: High Keywords: Tracker
Version: unspecified   
Hardware: MIPS   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 338405, 431422    
Bug Blocks: 348653    
Attachments: Linux 3.5 configuration for Yeeloong laptop
media-video/ffmpeg-2.8.6 build log

Description Stuart Longland (RETIRED) gentoo-dev 2009-08-22 03:57:04 UTC
The following bug is a tracker for the merge of patches and other changes into the main Gentoo Linux tree, to enable support for the Lemote Yeeloong and Fulong (2E-based for now) personal computers.  As sources of SGI and Cobalt systems dwindle, this move will be necessary for the future survival and viability of the Gentoo/MIPS port.

Current Status: Gentoo works on both systems, but requires patches for xorg-server, relevant X drivers and binutils to operate at its full potential.  The newer 2F-based systems also require a patched kernel, which needs to be merged into mips-sources.

In addition, documentation will need to be updated.
Comment 1 Mart Raudsepp gentoo-dev 2010-09-12 23:05:33 UTC
I'm now working on all of that too, help welcome.
I'll steal this tracker then for marking separate tasks with bug dependencies soon enough :)
Comment 2 Stuart Longland (RETIRED) gentoo-dev 2010-09-27 11:53:10 UTC
Yep... go for it.  Basically any tasks needed for Lemote system support... flag them here (like I've just done regarding binutils).
Comment 3 Anthony Basile gentoo-dev 2012-05-17 00:40:21 UTC
I'm on board!  Got my lemotes a couple of weeks ago.
Comment 4 Petr Pisar 2012-06-11 19:08:52 UTC
I'm running Gentoo on my Yeelong laptop (Loongson 2F CPU) for almost two years. I'm rolling patches from loongson overlay and ton of **-keyworded packages on my own, so I welcome this effort and I can help with testing.

BTW, does anybody get Linux 3.3.0 booting on the machine? I'm now stuck on 3.2.18 because 3.3-rc0 cannot boot.

And do we have some USE flag specific for this processor? I'd like to see it on some packages to control FPU optimization explicitly (for cross-compilation and for testing). E.g. x11-libs/pixman[loongson].
Comment 5 Anthony Basile gentoo-dev 2012-06-14 01:07:41 UTC
(In reply to comment #4)
> I'm running Gentoo on my Yeelong laptop (Loongson 2F CPU) for almost two
> years. I'm rolling patches from loongson overlay and ton of **-keyworded
> packages on my own, so I welcome this effort and I can help with testing.
> 
> BTW, does anybody get Linux 3.3.0 booting on the machine? I'm now stuck on
> 3.2.18 because 3.3-rc0 cannot boot.
> 
> And do we have some USE flag specific for this processor? I'd like to see it
> on some packages to control FPU optimization explicitly (for
> cross-compilation and for testing). E.g. x11-libs/pixman[loongson].

You may be interested in a stage4 I've built:

  http://opensource.dyc.edu/pub/stage4-loongson2f/

Its a full desktop.  Only wireless is not working right.  If you compare your @world with mine, and make suggestions, I'd be happy to incorporate them. I'll also test and do whatever keywording to get your desktop goodies in ~arch.

Also, I have a vmlinuz with embedded initramfs for netbooting base on 3.3.8 (I think) and that stage4 has a booting vmlinuz 3.3.8.  If you want, I can bump that to 3.4.2.  Its probably time for an update to that stage4.

I welcome the cooperation!
Comment 6 Petr Pisar 2012-07-24 12:52:11 UTC
Vanilla Linux 3.5 boots up again. I think a notice in the 3.5 announcement had good reasoning.

Regarding the wifi driver, I use rtl8187 which works except it does not process incoming non-unicast frames in infrastructure mode which makes IPv6 useless because it inhibits multicast.
Comment 7 Anthony Basile gentoo-dev 2012-07-24 13:57:25 UTC
(In reply to comment #6)
> Vanilla Linux 3.5 boots up again. I think a notice in the 3.5 announcement
> had good reasoning.
> 
> Regarding the wifi driver, I use rtl8187 which works except it does not
> process incoming non-unicast frames in infrastructure mode which makes IPv6
> useless because it inhibits multicast.

1) I put the desktop tarball in comment 5 on the Gentoo mirrors in experimental.  Its at

    gentoo/experimental/mips/desktop-loongson2f

2) I'm getting ready to update that image.  I'v got video now working but still not wifi --- although I haven't really worked on that.  Can you post your kernel config so we can compare notes.

3) If there are any packages you love/use a lot and think people should have, let me know, I'll put them in that image too.
Comment 8 Petr Pisar 2012-07-25 12:43:28 UTC
Created attachment 319218 [details]
Linux 3.5 configuration for Yeeloong laptop

This is my kernel configuration where the wireless card (RTL8187B) works more or less.
Comment 9 Petr Pisar 2012-07-25 12:55:52 UTC
I have patches from Lemote required for xorg-server and Xorg SMI driver. Also I have some patches improving Linux (the GPIO programmer enabling sensors and camera). All these are ported for latest releases.

I had to disable loongson FPU optimization in 0.26 pixman because it locks the machine. I have optimization for MPEG-2 and MPEG-4 ASP decoder in old mplayer-1.0_rc4_p20110322.

I could put them to this bug tracking system as RFEs if you wanted.
Comment 10 Matt Turner gentoo-dev 2012-07-25 14:57:59 UTC
(In reply to comment #9)
> I had to disable loongson FPU optimization in 0.26 pixman because it locks
> the machine. I have optimization for MPEG-2 and MPEG-4 ASP decoder in old
> mplayer-1.0_rc4_p20110322.

For others -- see https://bugs.freedesktop.org/show_bug.cgi?id=50946
Comment 11 Petr Pisar 2012-08-06 18:51:07 UTC
The pixman bug has gone (for me). But development xorg-server-1.12.99* removed XAA acceleration which affects SMI X11 driver. This is the default acceleration method for the driver. If you want to enable acceleration, you need to switch to EXA explicitly in Xorg.conf device driver section. The result is not so good as with XAA, but it basically works. The only serious thing is switching to virtual console and back segfaults the X server. This happens only if the EXA acceleration is enabled in the SMI driver. I have not yet time to debug it because it requires debugging from remote host.
Comment 12 Sebul 2013-07-06 15:12:14 UTC
I referred http://www.gentoo.org/proj/en/base/mips/yeeloong.xml
and loaded netboot-yeeloong.img from my tftp server. But I got a message when
wget http://[mirror]/gentoo/experimental/mips/desktop-loongson2f/desktop-loongson2f-[flavor]-[date].tar.lzma
said
wget: bad address
How can I sovle it?
Comment 13 Anthony Basile gentoo-dev 2013-07-06 15:20:31 UTC
(In reply to Sebul from comment #12)
> I referred http://www.gentoo.org/proj/en/base/mips/yeeloong.xml
> and loaded netboot-yeeloong.img from my tftp server. But I got a message when
> wget
> http://[mirror]/gentoo/experimental/mips/desktop-loongson2f/desktop-
> loongson2f-[flavor]-[date].tar.lzma
> said
> wget: bad address
> How can I sovle it?

did you replace [mirror] with a proper gentoo mirror?  See

   http://www.gentoo.org/main/en/mirrors2.xml

for a list.  Also you need to replace [flavor] with either vanilla or hardened etc.
Comment 14 TongHui 2016-05-15 03:22:39 UTC
mips64el-unknown-linux-gnu-gcc -I. -I/var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -MM /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libavcodec/mips/blockdsp_mmi.c | sed -e "/^#.*/d" -e "s,^[[:space:]]*blockdsp_mmi\\.o,libavcodec/mips/blockdsp_mmi.o," > libavcodec/mips/blockdsp_mmi.d
mips64el-unknown-linux-gnu-gcc -I. -I/var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST -DHAVE_AV_CONFIG_H -O2 -march=loongson2f -Wa,-mfix-loongson2f-nop -pipe   -march=loongson2f -mhard-float -fno-expensive-optimizations -std=c99 -fomit-frame-pointer -fPIC -pthread -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O2 -march=loongson2f -Wa,-mfix-loongson2f-nop -pipe -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized   -c -o libavcodec/mips/blockdsp_mmi.o /var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/libavcodec/mips/blockdsp_mmi.c
{standard input}: Assembler messages:
{standard input}:26: Error: opcode not supported on this processor: loongson2f (mips3) `gssdlc1 $f2,7($9)'
{standard input}:27: Error: opcode not supported on this processor: loongson2f (mips3) `gssdrc1 $f2,0($9)'
{standard input}:28: Error: opcode not supported on this processor: loongson2f (mips3) `gssdlc1 $f2,15($9)'
{standard input}:29: Error: opcode not supported on this processor: loongson2f (mips3) `gssdrc1 $f2,8($9)'
{standard input}:58: Error: opcode not supported on this processor: loongson2f (mips3) `gssdlc1 $f2,7($9)'
{standard input}:59: Error: opcode not supported on this processor: loongson2f (mips3) `gssdrc1 $f2,0($9)'
{standard input}:83: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,0($4)'
{standard input}:84: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,16($4)'
{standard input}:85: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,32($4)'
{standard input}:86: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,48($4)'
{standard input}:87: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,64($4)'
{standard input}:88: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,80($4)'
{standard input}:89: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,96($4)'
{standard input}:90: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,112($4)'
{standard input}:111: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,0($4)'
{standard input}:112: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,16($4)'
{standard input}:113: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,32($4)'
{standard input}:114: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,48($4)'
{standard input}:115: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,64($4)'
{standard input}:116: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,80($4)'
{standard input}:117: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,96($4)'
{standard input}:118: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,112($4)'
{standard input}:119: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,128($4)'
{standard input}:120: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,144($4)'
{standard input}:121: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,160($4)'
{standard input}:122: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,176($4)'
{standard input}:123: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,192($4)'
{standard input}:124: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,208($4)'
{standard input}:125: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,224($4)'
{standard input}:126: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,240($4)'
{standard input}:127: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,256($4)'
{standard input}:128: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,272($4)'
{standard input}:129: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,288($4)'
{standard input}:130: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,304($4)'
{standard input}:131: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,320($4)'
{standard input}:132: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,336($4)'
{standard input}:133: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,352($4)'
{standard input}:134: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,368($4)'
{standard input}:135: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,384($4)'
{standard input}:136: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,400($4)'
{standard input}:137: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,416($4)'
{standard input}:138: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,432($4)'
{standard input}:139: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,448($4)'
{standard input}:140: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,464($4)'
{standard input}:141: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,480($4)'
{standard input}:142: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,496($4)'
{standard input}:143: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,512($4)'
{standard input}:144: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,528($4)'
{standard input}:145: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,544($4)'
{standard input}:146: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,560($4)'
{standard input}:147: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,576($4)'
{standard input}:148: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,592($4)'
{standard input}:149: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,608($4)'
{standard input}:150: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,624($4)'
{standard input}:151: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,640($4)'
{standard input}:152: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,656($4)'
{standard input}:153: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,672($4)'
{standard input}:154: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,688($4)'
{standard input}:155: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,704($4)'
{standard input}:156: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,720($4)'
{standard input}:157: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,736($4)'
{standard input}:158: Error: opcode not supported on this processor: loongson2f (mips3) `gssqc1 $f0,$f2,752($4)'
/var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6/common.mak:57: recipe for target 'libavcodec/mips/blockdsp_mmi.o' failed
make: *** [libavcodec/mips/blockdsp_mmi.o] Error 1
 [31;01m*[0m ERROR: media-video/ffmpeg-2.8.6::gentoo failed (compile phase):
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the output of `emerge --info '=media-video/ffmpeg-2.8.6::gentoo'`,
 [31;01m*[0m the complete build log and the output of `emerge -pqv '=media-video/ffmpeg-2.8.6::gentoo'`.
 [31;01m*[0m The complete build log is located at '/var/tmp/portage/media-video/ffmpeg-2.8.6/temp/build.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/media-video/ffmpeg-2.8.6/temp/environment'.
 [31;01m*[0m Working directory: '/var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6-abi_mips_n32.n32'
 [31;01m*[0m S: '/var/tmp/portage/media-video/ffmpeg-2.8.6/work/ffmpeg-2.8.6'
Comment 15 TongHui 2016-05-15 03:26:26 UTC
Created attachment 434306 [details]
media-video/ffmpeg-2.8.6 build log
Comment 16 Matt Turner gentoo-dev 2016-05-15 15:22:44 UTC
This is a tracker bug. Please file a new bug.