A Gentoo Desktop for the Lemote Yeeloong, a little endian mips64 netbook

Hi everyone,

I’d like to announce a new initiative within the mips arch team. We are now supporting an xfce4-based desktop system for the Lemote Yeeloong netbook.  The images can be found on any gentoo mirrors, under gentoo/experimental/mips/desktop-loongson2f.  The installation instructions can be found here.  The yeeloong netbook is particularly interesting because it only uses “free” hardware, ie. hardware which doesn’t require any proprietary code.  It is manufactured by Lemote in China, and distributed and promoted in the US by “Freedom Included“.  It is how Richard Stallman does his computing.

I’m blogging because I thought it was important for Planet Gentoo to know that mips devices are currently being manufactured and used in netbooks as well as embedded systems.  The gentoo mips team has risen to the challenge of targetting these systems and maintaining natively compiled stage4’s for them.  Why stage4’s?  And why a full desktop for the yeeloong?  These processors are slow, so the time from a stage3 to a desktop is about three days for the yeeloong.  Also, the yeeloong sports a little endian mips64 processor, the loongson2f, and we support three ABIs: o32, n32 and n64, with n32 being the preferred.  This significantly increases the time to build glibc and other core packages.  I provide two images, a vanilla one and a hardened one.  The latter adds full hardening (pie, ssp, _FORTIFY_SOURCES=2, bind now, relro) to the toolchain and userland binaries as we do for amd64 and i686 in hardened gentoo.  I have not ported over the hardened kernel, however.

I allude above to “other” targetted devices.  I am also maintaining some mips uclibc systems (both hardened and vanilla) which are on the gentoo mirrors under experimental/mips/uclibc.  But I will speak more of these later as part of an initiative to maintain hardened uclibc systems on “alternative” architectures such as arm, mips, ppc as well as amd64 and i686.

You can read the full installation instructions, but here’s a quick summary, since it doesn’t follow the usual Gentoo method of starting from a stage3:

  • Prepare either a pen drive or a tftp server with a rescue image: netboot-yeeloong.img
  • Turn on the yeeloong and hit the Del key multiple times until you get the firmware promt: PMON>
  • If netbooting, add an IP address and point to the netboot-yeeloong.img.  If using a pen drive then point to thei image on the drive and boot into the rescue environment.
  • Partition and format the drive.
  • Download the desktop image from a mirror via http or ftp.  Its about 350 MB in size.
  • Unpack the image.  It contains not only the userland, but also a kernel.
  • Reboot to the PMON> prompt.  Aim to the kernel on the drive.  PMON will remember your choice and you will not have to repeat this step.

Once installed, you will log in as an ordinary user with sudo with username and password = “gentoo”.  The root password is also set to “root”.  It is an ordinary Gentoo system, so edit your make.conf, emerge –sync and add whatever packages you like!  File bugs to: blueness@gentoo.org with a CC to mips@gentoo.org.

If you have a Yeeloong or go out and buy one, consider trying out this image.

9 thoughts on “A Gentoo Desktop for the Lemote Yeeloong, a little endian mips64 netbook”

  1. Wake me when I can download the VHDL code for the CPU, the motherboard circuit designs, the case CAD design, the hard drive firmware etc. Then it will truely be free/open hardware.

    1. If the HDL is published, there will be someone complaining on the lack of free software to synthesize the bitstream. Because some people just want to complain.

      I think Lemote machines are still better than anything else out there, in ways that are important to open source folks. My only complaint 😉 at this point is, where is the 4-core Yeeloong 8133? It was announced about a year ago, and sites like kd85 have been planning to sell it since this spring, but the manufacturer keeps postponing the release due to “material stock problems”.

  2. I feel very good work of the two flavors vanilla and hardened but I need to know why not read the flash drive and multimedia card installed applications will await your response I’m from Venezuela Lemote Yeeloong install in a 8089

    1. Eduardo,

      I don’t understand your question.
      What do you mean by: “why not read the flash drive and multimedia card installed applications”?
      Can you rephrase?


  3. Hi Anthony,

    Thank you for the geentoo stage4 tarball! I enjoy.
    You are right, on yeeloong users need days of patience to get things compiled (even i like to compile stuff my own).

    Some questions and remarks to your installation description:
    + not all mirrors have the experimental/mips directory. e.g. Switzerland’s SWITCHmirror is missing it. Hard to know which mirrors are really up to date. I have choose Unversity of Waterloo ftp.

    + alternative
    one can get the netboot-yeeloong.img and the desktop-loongson2f-[flavour]-[date].tar.lzma to the pen drive.
    and replace
    wget http://[mirror]/gentoo/experimental/mips/desktop-loongson2f/desktop-loongson2f-%5Bflavr%5D-%5Bdate%5D.tar.lzma
    mkdir /mnt/usb
    mount -t ext2 /dev/sdc1 /mnt/usb (my pen drive is ext2 formated)
    cp /mnt/usb/path/to/desktop-loongson2f-[flavr]-[date].tar.lzma /mnt/gentoo/

    + yeeloong has to be connected to the internet, even when you boot of a pen drive.

    + password
    after reboot, before the enjoyment started, I change the default root and gentoo user password : ).

    + date and location
    one should maybe set the accurate date, time, location and timezone by
    cp /usr/share/zoneinfo/YOURZONE /etc/localtime
    echo “YOURZONE” > /etc/timezone
    date MMDDhhmmYYYY

    + glibc locals
    I uncommented en_US ISO-8859-1 and en_US.UTF-8 UTF-8 at /etc/locale.gen and run

    + make.conf
    In CFLAG what means -Wa, -mfix-loongson2f-nop ?
    Why you don’t set the ABI to n32, as you write it is the preferred in your blog?
    Would this be correct?
    CFLAG =”-O2 -mach=loongson2f -Wa, -mfix-loongson2f-nop -pipe -mabi=n32″

    You don’t set MAKEOPTS. Would this be correct (it’s one CPU with one core in the yeeloong)?:

    Still a riddle to me how to set all the USE variables right.

    I had to uncomment GENTOO_MIRRORS and change SYNC to be able to update the portage tree.

    back on the console i updated the portage tree by:
    emerge –sync

    + user profile
    does it make sense to set a user profile – e.g. hardened/linux/uclibc/mips/mipsel?
    there is non set as far as i can see.
    eselect profile list

    + /etc/fstab
    Why you use for the root partition mount, dump and check options as common for the boot partition (noauto,noatime 1 2)?
    the following line looks more plausible to me:
    /dev/sda1 / ext3 noatime 0 1

    gentoo + yeeloong = geentoo
    Thanks a bunch. I stay tuned.
    So long, Elmar

  4. First of all – thank you for the guide, and for the comments above here.
    I got this installed today. But I keep running into a issue I cannot seem to resolve.

    After install – no matter what I try – I keep getting this error when I run ’emerge’:
    ‘/etc/portage/make.profile is not a symlink and will probably prevent most merges.’
    ‘It should point into a profile within /usr/portage/profiles’

    ‘Your current profile is invalid ..’

    There is no files inside ‘/usr/portage/profiles’.
    Even after running emerge –sync and installing portage manually.
    Also – ‘eselect profile list’ shows nothing.

    1. I know. Gentoo recently re-did its profiles and completely orphaned mips. I need to fix this but I am busy with other projects and I don’t know if I’ll come back to this anytime soon. If you are familiar with git, you can got back into the history and see when the mips profiles were removed and revert those changes locally. If you get it working, and open a bug on github, then at least we can start this moving forward. Honestly, I didn’t know anyone else was using this otherwise I would not have abandoned it.

      1. Thank you! I will definitely look into it.
        This is by far the best OS for this machine, and it was surprisingly easy to install (thanks to your efforts). I’ll spend time with it this weekend and see what I can figure out.
        Thanks for the info on the issue, that’s helpful, I did not know that was the cause.

Leave a Reply

Your email address will not be published.