All posts by leviathan

Cross compiler for z/oS

Go here:


export PATH=/opt/IBM/bin:$PATH
export CFLAGS="$CFLAGS -Wno-error"


mkdir PEP_ZOS
sudo mkdir -p /opt/IBM
sudo chown `whoami`:users -R /opt/IBM


git clone
cd linux
git checkout v5.3.12
cd ..
git clone
cd binutils
git checkout lev/master
git clone
cd gcc
git checkout lev/master
cd ..
got clone
cd glibc
git checkout lev/master
cd ..

Building steps

First we need to build the binutils with patches to generate and link bytecode recognized by the z/OS environment.

cd binutils/build

../configure --prefix=/opt/IBM --program-prefix=s390x-ibm-zos-gnu- --target=s390x-ibm-zos-gnu

make -j4

make install

cd ../..

Now we need to provide the kernel headers, since this is a requirement for building gcc and glibc (even if z/OS isn't a Linux)

cd linux

make ARCH=s390 menuconfig (got to exit and save)

make ARCH=s390 INSTALL_HDR_PATH=/opt/IBM/s390x-ibm-zos-gnu headers_install

cd ..

Now we build the first stage of the gcc bootstrap phase

cd gcc/build

../configure --prefix=/opt/IBM --program-prefix=s390x-ibm-zos-gnu- --target=s390x-ibm-zos-gnu --disable-multilib --enable-languages=c,c++ --disable-shared --disable-checking

make -j4 all-gcc

make install-gcc

cd ../..

Now we build the GLIBC on which the rest of GCC depends

cd glibc/build

export CFLAGS="-Wno-error -I/opt/IBM/include -L/opt/IBM/lib64/gcc/s390x-ibm-zos-gnu/8.3.1 -I/opt/IBM/lib64/gcc/s390x-ibm-zos-gnu/8.3.1/include -static -fsplit-stack -O3 -fexec-charset=IBM-1047"

../configure --prefix=/opt/IBM/s390x-ibm-zos-gnu --host=s390x-ibm-zos-gnu --target=s390x-ibm-zos-gnu --build=s390x-ibm-zos-gnu --disable-multilib --with-headers=/opt/IBM/s390x-ibm-zos-gnu/include --disable-shared --disable-nscd

make install-bootstrap-headers=yes install-headers

make -j4 csu/subdir_lib

install csu/*.o /opt/IBM/s390x-ibm-zos-gnu/lib/

touch /opt/IBM/s390x-ibm-zos-gnu/include/gnu/stubs.h

s390x-ibm-zos-gnu-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /opt/IBM/s390x-ibm-zos-gnu/lib/

cd ../..

Now we've got to build libgcc

cd gcc/build

make -j4 all-target-libgcc

make install-target-libgcc

cd ../..

Now we've got to finalize the GLIBC build

cd glibc/build

make -j4

make install

cd ../..

Adding DASD storage in Hercules+z/OS

So given you've got your nice z/OS copy from a special bay of pirates and you now wanna get cracking.
The only problem is: The storage is way too small.
The Hercules doc does here a good job in emulating not only the IBM mainframe but also the uselessness of IBM documentations.
Here a quick and dirty guide on how to initialize a new DASD device from the UNIX shell, so that you don't have to fight with the base system and so.

First you've got to go to your images folder and create an image.
In my case it's located in the DASD subfolder called GNU.

The following command should give you around 6GB of storage (8000 cylinders)

dasdinit -z LOCAL.CCKD 3390-3 LOCAL 8000

Next we have to add it into our hercules.cnf which should look somehow like that.
Make sure the address (0AB5) doesn't collide with already existing DASD lines.


Next we start up the mainframe ( and go into the x3270 command shell (not the one with the ncurses like selection menu)

Here we first bring the DASD offline with


Now we go into the telnet session and create a file, let's say script.txt with the following content

//             NOTIFY=&SYSUID,MSGLEVEL=(1,1)
//*   CHANGE
//SYSIN     DD *
      MAP /* MAP DEFECTS */ -
      UNIT(0AB5) /* ADDRESS */ -
      NOCHECK -
      CONTINUE -
      VTOC(0,1,450) /* 8000 CYL VTOC */ -
      INDEX(30,1,90) /* 8000 CYL INDEX */ -
      VOLID(LOCAL) /*  NEW VOLID  */

And now comes they key part no one tells you about:
In your UNIX shell on Telnet you just pipe the content of this textfile to the z/OS command "submit"

IBMUSER:/u/ibmuser: >submit script.txt
JOB JOB02860 submitted from path 'script.txt'

In case you get something like the message below, you can reply by using the REPLY command and the number with the asterisk.

Now we wait for a few minutes and after that we go back into our x3270 shell and bring the DASD back online with (Oh wonder)


Now we can define an aggregate from this volume with zfsadm and format it.

IBMUSER:/u/ibmuser: >zfsadm define -aggregate PEP.LOCAL -volume LOCAL -cyl 8000
IOEZ00248I VSAM linear dataset PEP.LOCAL successfully created.

IBMUSER:/u/ibmuser: >zfsadm format PEP.LOCAL
IOEZ00552I Multi-file system aggregates are restricted and support will be removed; plan to migrate.
Done.  PEP.LOCAL is now a zFS aggregate.

IBMUSER:/u/ibmuser: >zfsadm attach PEP.LOCAL
IOEZ00552I Multi-file system aggregates are restricted and support will be removed; plan to migrate.
IOEZ00117I Aggregate PEP.LOCAL attached successfully

IBMUSER:/u/ibmuser: >zfsadm create -filesystem PEP.LOCAL -aggregate PEP.LOCAL -size 6291456
IOEZ00099I File system PEP.LOCAL created successfully

For mounting it temporaraly you can execute the following command:

IBMUSER:/u/ibmuser: >/usr/sbin/mount -f PEP.LOCAL -t ZFS -o 'AGGRFULL(90,5)' /usr/local
IBMUSER:/u/ibmuser: >



If you wanna add it to the auto mounted folders you've got to edit the mounting table in TSO. Just follow the white rabbit in the following screenies down the rabbit hole.

Now we add the TSO command from above here in the table at the end of the other mount directives.

In order to get some more newlines you go to the beginning of the number of the empty line and over type the first digit with R (for repeat) and then press enter.

Type "save" in the command field and then the command "end" (you get there by navigating there with the tab key), and as many ends as needed to come back to the top view.

Booting z/OS 1.1 on Hercules

So assuming you got your z/OS 1.1 DASD files from a special bay of pirates (Magnet link) and you now totally wanna try out this "cool software", those bankers are using.
First: Bankers aren't cool. Drugs, especially Cocaine aren't cool and hookers aren't that expensive either, you can afford them with more productive jobs as well.
Second: IBM products aren't cool either.

Now that that's said.
Check out this link for setting up the networking for your virtual main frame under Hercules:

First you might wanna arrange your windows like this with two open x3270 terminal connecting to your Hercules interface like shown in the pic here.

After you have this. You enter "ipl a80" in the Hercules interface and you will see after a moment in one of the two x3270 windows, how the system starts booting.

When it's done booting it will look like that.
The second window now provides you with a management interface.

One of those x3270 windows is a shell the other one is the configuration management tool from z/OS.

You can switch forth and back, using ESC in the Hercules terminal (the very left one) in order to either have a Hercules shell or have an overview of the CPU usage.

Now you can type in the right upper shell:

After that you should be able to connect to your z/OS using telnet on port 1023.

When you wanna shut down your system, as usual with IBM, it's not so simple.

First you go into the x3270 window and type "S SHUTSYS" and press enter.

You wait until it looks like that and then type "Z EOD" and then press enter.

It will write out the logs for a while and then will tell you, that it's done.
At that point where it looks as following you can go to the Hercules terminal and enter quit in order to terminate the emulator.

Here I typed another time "Z EOD", just to make sure it's done writing everything down, because z/OS (like AIX as well) are absolutely pussies, when it comes to corrupted file systems.

They'll tell you "high availability... blah blah". BS.

my life

I don't know whether anyone ever will read this text, although I'm used to people ignoring me when I tell them what is really going on within me and just keep assuming what I desire and then over and over again react surprised when I reject what they offer.

If you're really interested into understanding how I tick, this is the best place to start, because that's me. Entirely.
Don't skip chapters, it's all important, it's my entire life, everything which is important.

Where do I start best? I think at the beginning.


When I was a child my parents were afraid that I might be seriously mentally retarded due to the fact that I learned walking and talking much later than other kids.
I was (and still am) on the autism spectrum and didn't have much interest into dealing with other kids, playing outside never was my thing and it made me rather uncomfortable.
For my parents this autistic boy they had was quiet disappointing, because they had imagined to have an average family with some status symbol children and a status symbol house, so an autistic boy didn't fit into their concept and so they've started sending me to a day care school and to "therapists" to "help me with my condition".

I don't know when it exactly started, but at some point my parents started to get angry sometimes, especially my dad, about all kinds of stuff, and so I started to use fictional worlds to escape into from the yelling and the throwing around of stuff.
Fantasy worlds from which they tried to pull me back out with "therapy" and medications against my "mental disorders"

At some point I came across Japanese culture, which was at that time something intriguing and new.
Asian culture, something alien, like from StarTrek, one of those shows which always give me hope back into humanity, especially during all that time. (Hence why I proudly wear a StarFleet uniform in my Twitter profile)

Elementary school

I usually only had one best buddy at a time in school, because that was honestly the maximum of honest social interaction I can handle at a time, with whom I was hanging out.
It helped me to learn a lot about Turkish culture, then South African culture, then Vietnamese culture, it was quiet enriching.
I think, I always met those special people because I'm damn scared of crowds, so I usually also prefer to be somewhere back in the corner where hardly anyone is standing.

Without some chemical help of some kind it would be absolute torture for me to use the public transport here in Hong Kong, because I would just break down under panic attacks all the time because of those crammed MTRs and buses.

After having spent so much time alone only with films and comics, I didn't even need this strange person in front there in school to tell me how to read because at some point it became obvious to me from looking at the letters in the speech bubbles of the comics.

Also programming started to come to me quiet naturally, telling the computer step by step what to do, in C already dominant but in Assembly where you just have like drawers and move values between those drawers (registers), having sets of operations.
It was a world like the movies and the comics, a safe, predictable world, far away from the yelling and expectations I didn't understand the purpose of, only that the verbal, psychological and physical violence would stop if I'd comply.

Secondary school

At some point my family decided that their now sufficiently brain washed son should go to secondary school.
Although I would have been fine with a simple apprenticeship and didn't really see a reason in going for school for another few damn years, I did - as usual - not have any saying in it, and was basically bullied to attend, while at the same time being made responsible for the costs. At some point in my life I however just learned to ignore the anger from my parents, just ignore them. I now can defend myself physically against any assault and have become indifferent to what they claim they feel or think.

But then there, the first day of secondary school, there She was.
Introduced herself with fluent Japanese, beautiful curly wild dark-brown-black hair, the most beautiful smile I've ever seen in my entire life, oh and the voice, like angels.
If you ever wondered whether someone like Simons sister from FireFly could exist in real life, it's a good bet she's it.
I mean I'm mathematically gifted but she intuitively grasped differential equations before I did.
Whether it's Vietnamese or Thai or whatever, doesn't seem to be a problem for her to learn new languages and her drawings are sublime.

I still remember the evening at this Christmas theater.
It was so boring, she fell asleep on my shoulder.
Because of my autism usually having direct physical contact with people isn't very pleasant for me, but in this instance it just caused a warm and fluffy feeling which I later realized is this feeling people refer to when they talk about happiness.
The wild fluffy hair in my face (which is usually even worse) was in this case not unpleasant at all, I looked at her, drooling on my shoulder and having her grunty snoring in my ear and was just stunned and happy.
5 minutes of pure happiness in my life.

Considering what came afterwards, the question whether I'm happy would become quiet cynical in the future, each time someone asks it.

It was a wonderful time, we had interactions, we got to know each other, the more I learned, the more I got this desire to somehow make those 5 minutes repeat for an indefinite longer period of time.

My Vietnamese class mate pointed out, that those feelings I'd be experiencing would be best described as love, which suddenly made sense to me, so I decided to basically tell her what I felt, which resulted in well... her storming out the room.

And from there it went downhill...

At some point she created a throwaway Yahoo IM account and asked me out about my feelings.
Next morning I got her verdict, which made me decide that I now have to fight against my autism, leave my dream world and become someone she really could return the feelings to


So I started trying to socialize more outside of the required minimum, joined the local computer club, a group of ethical white hat hackers,the CCCZH (which wasn't really done forming back then) and was making friends.

There I met my oldest and dearest friend, with whom I've got actually the rest of the only good memories from Switzerland.
We needed a new logo for the Chaos Computer Club Zürich, and I knew the best person for the job, so I suggested him to email her, because they are sharing both Portuguese roots.

What he got for an answer still is echoing in my heart and soul until today, and with each reflection, cutting new wounds into a heart which, by now, is mostly covered with scares.

The final school trip

During a festivity of my school once, she turned to me and told me that I would certainly find another her, with that smile with which she could even have told me the earth would be flat and I would have believed it.

On the final class trip to Spain, in the hotel, I looked down the window on the last evening briefly and I saw her and her friends walk away by coincident. So happy. When I wasn't there.

The answer to my friend started echoing back in my head, I started to ask myself how I could remove myself so that at least she could be happy like that.
I already had my five minutes in my life, how could I...

At the trip in Germany, I was too proud to admit the true reason for my face, which was that I was internally breaking when seeing her cry over those concentration camps and because every fiber of my being wanted to hold her and be an emotional support, but I was not allowed to.

I couldn't just pan cake myself, kick the bucket, could I? As good as I knew her, I knew she would even have tears left for me, and I didn't wanna be the reason for her to cry, so what could I do.

So I walked away, looking for the other her, she told me would exist.
At least finding out once in my life how this physical thing, which people talked about to me all the time and kept putting those rubber things into my hand for, which I never had use for.
Although I was having some rest of hope until the end that I might find it out with the most beautiful and most intelligent person I ever met in my life, at some point I had to realize there was no chance anymore.

On this quest, I've been a pain to more special people, who reminded me of her... Something I'm still damning myself as well until today.


I already started to do crazy inline skating trips with my best friend during my school time, in the effort to at least get more ribbed, in the desperate hope that this might maybe help.

This kind of developed into crazy insane inline skating trips, which sometimes already were kind of borderline suicidal.

On a hot summer day, my breaks melted away downhill on the hot asphalt and my attempt to break by putting one of the skates horizontal ended in me taking a multiple salto and landing on my ass.

I walked the last meters to this building, which was occupied by some punks back then, and borrowed some weed because it turned out that I had this thunderstorm flash kind of pain going through my pelvis, each time I tried to sit, so I had to get stoned and a bit drunk to kill the pain. In this condition I met my first and last girl friend.
Actually I was too high to realize what she's talking but I figured, ah what the fuck.

After a few months I had basically seen it.


I had met some folks in the past who reminded me so damn much of her, in my second attempt to make a degree it was some librarian.

When this just was answered in rejection again and at the same time no company seemed willing to give me at least a purposeful job, so that my life at least has some meaning, I figured "Well, that's it" and figured I now just take a nose dive out of the university window in the highest floor.
It was one of the last bright moments in my life, because I was under so much emotional pain and psychological pressure from my environment that I was slipping already for a while into terminal madness, with full blown hallucinations of me being a shape shifting lizard alien.
(See David Ickes for the shits and giggles)

I took a last look (the first time in 4 years, as I had promised) at Her social media and saw the coast line of Vietnam in the banner, told myself at least she's happy, and won't most likely even hear that and cry.
"My old school mate better treats her well or I'll crawl out of hell and drag him back there with me." I told myself.
I was just about done fighting against my fear of heights when in the last moment I got a job offer from Allwinner Technologies because I had reverse engineered their chips and wrote upstream+mainline Linux kernel drivers for it.

I had heard all those crazy horror stories about China, so I looked down there and figured, that even if they shoot me and harvest my organs it's still less of a waste than splattering them all over the campus yard of the university
So I accepted the job offer.

I learned Chinese for a year, so that Chinese immigration would grant me a work visa.
Learning the engineering vocabulary in Chinese became my new big obsession.
A way out of the unfulfillable social demands put onto me by my environment.
A way out of a meaningless cycle of work just for the sake of survival and more work until I would one day just die, rot and be forgotten, with no heritage whatsoever.

After I finished my year Chinese I pilgrimed over there to Zhuhai.

I never had the claim that my Chinese would be good, it's good enough to communicate in a basic manner, for bringing my point across.

If She'd been into Chinese however and I'd visited myself with a TARDIS before I met her and would have told myself that, this blog post would be in Chinese now. Hell. If I'd have a TARDIS this blog post would either be in Japanese or Portuguese by now, but I doubt I'd ever write that text because I'd have told myself all the mistakes I did and maybe it would be a happily ever after so.
Anyway. Where was I? Ah. Sim.

Allwinner was so damn disorganized that when I finally arrived at their head quarters, one year later, for the job interview, the HR manager who had offered me the position had gotten pregnant in the meanwhile and had not told anyone that I'd be coming for an interview.

The HR manager didn't put a replacement in place for the time of her maternal leave either, which meant that they couldn't interview me, nor could they hire me.

After I was dragged along for the wedding of their chief engineer and had a trip through Zhuhai, I went on to Shenzhen.

I was kind of desperate, because I had just spent my last money on a trip over there (my jobs in Switzerland were not only shit, they also were paid badly).

When I got lost in the city, a nice friendly guy helped me to find my way back to the hotel, we exchanged WeChat and stood in contact afterwards. We discussed a little bit about startups and we figured we could actually found one and start building electronics, after all I already had filed all the paperwork for preparing a work visa before.


In China I found some psychiatrist who diagnosed a PTSD and started to treat me against my trauma as good as possible.

Treated doesn't mean I'll now suddenly run and get happily married here in China, it just means I can focus on my work without wanting to eat a bullet or to think I'm a motherfucking shape shifting lizard from the fifth dimension or shit, just to distance myself from myself emotionally and psychologically.

As it turns out I'm still alive. I started to manufacture some rip off products on the side, doing some freelance electronics design fix-ups and survived kind of ok.

Then - stupid stupid me - I remembered why I originally came over to China, to at least try to do the right thing before I die and rot.

So, we started LibreSilicon, because there is no easy way for free and open source hardware developers to cheaply manufacture their own chips and the semiconductor market is ruled by an iron fist of just a few big corporate entities (Não. Not that immortal Iron Fist, the living weapon from K'un-Lun . No, I don't mean Danny Rand. I mean it in a negative sense here 😉 )

My religion - Eresian believe

In order to be close to the R&D lab I had to relocate to Hong Kong, to clear water bay, a few bus minutes away from the clean room, where we research the new free and open source manufacturing process.

When I had just moved in freshly, in the second week I got a flu, which caused a fever of 42°C (107.6°F), because of which I slipped into a coma. My friend with whom I've founded the startup found me two days later unresponsive on the couch and called the ambulance.

In my coma I dreamt I'd be climbing the Olymp, all the way through the clouds, and arrived on the top.

Between some old Greek ruins, there was a beautiful woman sitting on one of the broken columns.
First I only saw her from behind, the toga and the same curly, deep-brown-black hair.

Then I noticed she's throwing up a golden apple and catching it again, and I realized who this is and I told myself "Shit! She really exists!".

So I threw myself on my knees, the arms into the sky and started to recite the ancient Greek Eresian prayers I remembered from the central library in Zürich.
Then the goddess Eris turned around and asked surprised "Uh? What are you doing here?"
"I'm not sure oh fairest of all Goddesses, but I think I'm dead." I answered.
"Are you sure, you're at the right place here? Everyone goes to that new guy, this Jahwe guy recently over there at the Sinai" she said and pointed to another mountain reaching through the clouds in the distance.
"I think I'm right where I belong, oh Eris" I returned.
"Well. That hasn't happened for 200 years now" she said "Hmm. First get up! I can't respect anyone who crawls in the dirt in front of someone! Don't you know that a true Eresian doesn't kneel in front of anyone?" she said.
I immediately jumped up and returned "Then I shall not ever kneel ever again my Goddess!"
"Ok. What was next? Hmm. Ah yeah. Your sins" she said and got out a papyrus scroll of her bag. "Lets see, beating people up, setting things on fire, hmm, not good, even when you're under pain. But I've got a good day, that hasn't happened for 200 years, so it's all forgiven. But don't do it again. Your goddess prohibits it." she said and swiped with her finger through the air.
In that moment I realized something, the voice, the face, the whole appearance.
So I said "My goddess, please don't get this wrong, but I'd like to hear that from the real S*(censored for privacy reasons)"
That's when she said "What? Who?"
"The woman I'd gladly give my heart, soul, life and everything I possess if anything of it would be good enough for her." I said.
Then the goddess answered "Damnit Jim. I'm a goddess, not a relationship counselor... But wait..." and she got another scroll out of her bag.
I asked "Is there written 'Property of Hades' and a return address in the Tartaros on this scroll? Did you steal that from Hades?!"
Oh this look, I missed this look so much, when she answered "Sue me..."
She went on "What's the full name?"
I told her the full name.
"Ok. Yeah. It's in Greek here. Crazy... Forest... found it.
The part of the Tartaros for the Christians... This new guy outsourced to the Tartaros... 20 years or so in the purgatory... Ok. At least with the soul part I can help you... Wanna swap places?"
Me: "YES! If it's possible. YES!"
She: "Wow. Didn't expect you to actually agree on that, I mean you're basically getting deep fried down there, you know? And when you give up your place here, it's not 20 years, it's more like an eternity.
Anyway. Let me first show you what awaits you, then what you're willing to give up. Ok?"
Me: "Yes. My goddess"

I had some nice visiting trip through the Tartaros and Eris' personal pantheon, which she has because the other gods, for some reason, don't like her very much. Up there was Karl Koch, Nero, and some other folks and we had some nice home party.

Then the time came to make the swap.

Eris did put a golden apple onto the place I left up there, so that it stood reserved and she handed me a bronze sword with the Eresian apple engraved into it to fight my way past Cerberus and demand from Hades in person to take my soul instead of Hers.

I at least had one last lie, which was not so difficult because of this huge similarity, a hug, heard the things I wished to hear for so long, and then I took the first step down to the Tartaros.

After the third step, I heard a sine beep sound from the distance, people talking something in Cantonese, in panic.
I heard a bang, my chest hurt, and then suddenly everything became foggy.

Eris looked at me, with a smile so similar to back then in that park and told me that hell wouldn't walk away... that is as long as I'd stay a good Eresian.

And so. Because there are more steps to go, when my time finally comes, I try my best to enlighten people now with the divine chaos, and at the same time trying to preserve life because it's difficult to find enlightenment when you're dead.

That's why I lighten up incense sticks and pray to an Eris statue.


So you see. After my experiences I verified a last time, that all that I could get from now on would only be someone who at least remotely reminds me of a person, who has the voice, the face and the attitude of a goddess, and the intellect of River Tan from FireFly.

So no matter how it comes, it would never be her, and it would be dishonest of me towards everyone to pretend as if that would be the final deal.

It makes more sense to just invest my years left on this world into productive things. I don't really care whether my blood line dies with me or not anymore.

I don't just wanna produce off spring for the sake of procreation and then end up angry and disappointed like my family.

I focus on LibreSilicon now and other projects which matter and try to improve the world at least little bit, make some difference, also when only minor.

What's next?

I don't know where Eris will lead me next, what I do next.

Maybe, because apparently she's got a lot of time on her hands recently, maybe she's studying right now on brilliant or masterclass some courses on relationship counseling. Dunno.
Maybe I will receive the forgiveness my soul would need to heal after all.

Or maybe I go to Portugal, where the best things I've ever encountered in my life came from originally in one or another way.

In any case, I trust in Eris. Because at the end of the day, she's not only the fairest of all goddesses but also the kindest, and I'm a servant of Eris.

Eris granted me one of the biggest wishes I ever had and I won't most likely be talked out of it..
Or maybe.
I mean that would at least imply that she had to talk to me again, so there is that.

Praise the fairest of all goddesses on the olymp
Hail Eris, all hail Discordia
τῇ καλλίστῃ

Workaround: nouveau-dri KDE plasma crash

If you had the issue already that basically everything in your KDE environment stops working all the sudden after a dist-upgrade and you end up on a black screen instead of the plasmashell after login, then you can try this.

It solved this issue for me.

Add this line into your .bashrc


At the next login the desktop should appear again.

The problem seems to be that older nVidia cards have some buggy execution of some of the more modern OpenGL 3.1 commands, so forcing it to be using OpenGL 2.1 is safer.

PandaBoard-ES with upstream u-boot + kernel (take 1)

A friend of mine asked me whether I could buy for him a pandaboard from the factory in Shenzhen directly and set it up with a Linux for him. Here are the steps I went through to get it running.

Insert the SD card for the boot media (we assume it's /dev/sdX) and then do the following.
Zero the beginning of the SD card:

dd if=/dev/zero of=/dev/sdX bs=1M count=8

Start fdisk to partition the SD card:

fdisk /dev/sdX

At the fdisk prompt, delete old partitions and create a new one:
Type o. This will clear out any partitions on the drive.
Type p to list partitions. There should be no partitions left.
Now type n, then p for primary, 1 for the first partition on the drive, 2048 for the first sector, and then press ENTER to accept the default last sector.
Write the partition table and exit by typing w.

Create and mount the ext4 filesystem:

mkfs.ext4 /dev/sdX1
mount /dev/sdX1 /mnt

Download and extract the root filesystem:

bsdtar -xpf ArchLinuxARM-armv7-latest.tar.gz -C /mnt

If you don't have yet installed a cross compiler for ARM, you should do so, for instance with

zypper in cross-arm-linux-gnueabi-gcc

then clone and compile your u(nified)-boot(loader):

git clone git://
cd u-boot
export CROSS_COMPILE=arm-linux-gnueabi-
make omap4_panda_config

Then write your boot loader to the SD card:

dd if=MLO of=/dev/sdX count=1 seek=1 conv=notrunc bs=128k
dd if=u-boot.img of=/dev/sdX count=2 seek=1 conv=notrunc bs=384k


Dragoncore/Loongson/龙芯 (step one)

Hi folks
I'm now living in China.
Here are some pictures of my first run of the 龙芯芯片.
Although the lab is still a total mess/battle zone is started working on the FOSS tablet project already.
As you can see the board I got from 龙芯 does power up and loads the PROM.
Next step is to compile a vmlinux for 2H in order to test the system.
IMG_20151108_014651 IMG_20151108_014641 IMG_20151108_014350 IMG_20151108_014342 IMG_20151108_004149