I stilled didn't succeed to get the userland up
and running with uClinux-2.4.x on uCsimm conveniently :-(
But i did some progresses and may be smarter people
than me can master it based on the work i have done ...
Currently, the kernel boots and starts a simple
user space demo program (/sbin/init) that plays around
with the LEDs on the EVA-board. Even a printf() crashes the
machine with an illegal instruction ... seems that
uClibc is somewhat broken on uCsimm or i just didn't
found out the magic compiling options.
I have done a patch-set for uClibc, uClinux-2.4.x
and userland (snapshots from 200301, two days ago):
A hopefully convenient .config for the kernel is also included.
The patch-set can be downloaded from
For compiling, you will have to download David McCullough's
elf tool-chain: http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
(BTW: don't forget to delete dev/console and create a
new one with "mknod console c 5 1")
Those who are interessted can download a precompiled image from
The image is located at 0x600000, means you will need to
have flashed a "himemloader"-enhanced image.
I added an arch/m68knommu/platforms/68EZ328 directory.
The files in it were taken from the recent 68328
directory and mixed with files taken from
kernel 2.0.38pre7 (68EZ328).
In drivers/char/68328serial.h i had to add:
to get some definitions that are needed later
in the header file.
Additionaly, i did two quickhacks in init/main.c:
In start_kernel() i had to disable console_init(),
otherwise the machine hangs during calibration
Just before mount_root(), i had to add
ROOT_DEV = MKDEV(BLKMEM_MAJOR,0);
because the already correct setup is overwritten
somewhere during the boot process.
There are still "kmem_create: Forcing size word
alignment" messages during boot time. I didn't
found an easy way to get rid of them ...
uClibc doesn't compile out of the box. I had to change
line 154 to
@echo "#define __linux__ 1" >> uClibc_config.h
@echo "#define __linux_ 1" >> uClibc_config.h
To make use of the newly created uClib, I had to
change several Makefiles in the userland directory
(here renamed "src" to be complient to the structure
generated by "buildenv")
Added uClibc include and library path, i.e.
TOPDIR = /home/kuhn/devel/uclinux/projects/uCsimm-2.4
INCDIR = -I$(TOPDIR)/uClibc/include -I$(TOPDIR)/linux/include
LIBDIR = -L$(TOPDIR)/uClibc
Switching to elf:
CROSS = m68k-elf-
Added include path to CFLAGS and create an LDFLAGS entry
CFLAGS = -O2 -fomit-frame-pointer $(INCDIR)
LDFLAGS = -Wl,-elf2flt -lc $(LIBDIR)
The Makefile for every application has to be changed
to make use of the LDFLAGS, i.e. in
$(CC) -o $@ $(OBJ) $(CFLAGS) $(LDFLAGS)
I have recognized that the order of -o $@ $(OBJ)
and $(LDFLAGS) is important. If mixing them
up, it can be possible that compiling is
aborted with unresolved symbols ...
So far ...
maybe somebody can do somwthing with this information ...
This message resent by the firstname.lastname@example.org list server http://www.uClinux.com/
This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:42 EST