Index ¦ Archives ¦ Atom ¦ RSS > Tag: linux

vfork() for uClinux forces an architecture change

Moxie uses a simple software interrupt instruction (swi) to implement system calls. The swi instruction creates a call frame on the stack and then jumps to a global exception handler routine. The exception handler for moxie-uClinux switches to the kernel stack before jumping to the relevant kernel routine. Returning from …


Forking bugs

I found some time to look at the Linux kernel port again, and discovered a bug in the forking code (the child process must return 0 after a fork!). What we're looking at here is the start of userland, post kernel boot, where busybox is trying to run an init …


Summer is over, so put away the white pants and start submitting patches!

It's been a while since my last update. What can I say... summer was nice.

But now, back to business! I've just committed some long overdue patches to the upstream GNU tools:


More hello world progress with uClibc/uClinux, and a GDB question.

Tonight I got a hello world app to use uClibc's puts() routine! This is a big deal because it's the first time I've had system calls coming in from userland. I haven't checked the changes in yet, because they're a mess, but here's a basic run-down of what I had …


First moxie-linux userland app runs!

I've been taking advantage of the nice summer weather recently, so it's taken me a while to get around to this... but here's the first moxie userland app!

#include <string.h>

#define MSG "Hello, World!\n"

void __attribute__((noinline)) gloss_write (int fd, char *ptr, int len) 
{
  asm("swi 5"); // "write …

Speed bumps on the road to moxie userland

Sooo..... it turns out there's lots to take care of before userland apps like BusyBox can run.

  • The root filesystem. This one is easy. I just built a short Hello World application in C with moxie-uclinux-gcc. This produces an executable in BFLT format which I call 'init'. The kernel build …

The start of a uClinux userland

Before we can start building BusyBox, we need a few more bits of technology...

  • uClibc: this is a popular embedded C library, like newlib, but used more often in Linux environments. I ported uClibc to the moxie core just like every other bit of software in this project: quickly! My …

The first moxie linux boot output...

Userland, here I come! Check out moxiedev, run "ant build", then do the following...

$ ./root/usr/bin/moxie-elf-run linux-2.6/vmlinux
Linux version 2.6.31-rc3-gb006656-dirty (green@dev.moxielogic.com) (gcc version 4.5.0 20090715 (experimental) [trunk revision 149693] (GCC) ) #6 Sun Jul 26 12:03:14 EDT 2009 …

Kernel update: device trees and kernel threads

I've spent a lot of time in airports/planes/hotels recently, which is good news for the moxie linux port. It runs about 6.5M instructions, booting up to the point where a couple of kernel threads are created. However, a few context switches later it all comes tumbling down …


The Moxie Linux port

I've just checked the start of the kernel port into moxiedev. Running "ant build" will produce tools, simulators, u-boot and now a vmlinux you can run with moxie-elf-run or in gdb. It crashes on startup right now, but that's to be expected. I just got it to the point where …

© Anthony Green. Built using Pelican. Theme by Giulio Fidente on github.