ANTTI*HAPPY: building MicroBlaze uClinux on WinXP full sucess !!

I am ! happy and smiling, I got finally fully working MicroBlaze uClinux image built fully from GPL sources on WinXP without the use of any linux machine or linux emulation.

here is short intro how todo this:

formatting link

I wish I could have time to add more detailed docu about the process but I need to prepare some demos for the Embedded in Nurnberg what starts next tuesday

Antti

Reply to
Antti
Loading thread data ...

thanks Antti,

Very nice and interesting job. Happy for you !

Laurent

formatting link

Reply to
Amontec, Larry

Do you know what caused the issues with compiling busybox and sh? Is it a build script issues, a cygwin issues, or a gcc issue?

"11.now you get core dump whild building busybox and sh, those need to be pulled out and compiled out of tree and then injected back

12.the busybox and sh need to be >
Reply to
Paul Hartke

Hi Paul

I have found following issues

1)

/user/mount/mount.c C compiler parse error !?

2) /user/sh and user/busybox

both fail on final linking or elf2flt conversion when invoked from main build tree, so as a workaround I let the busybox to be compiled into .a and .o files inside the main build tree, then copy out the .a and .o and run link elf2flt in out of tree setup, then copy the busybox executable back into main tree

both cause 'core dump' when in main tree, but sh also cause core dump in out of tree, during elf2flt so for sh I invoke the elf2flt again after out of tree build

this is busybox when in main tree

Exception: STATUS_ACCESS_VIOLATION at eip=610D9100 eax=0022F12C ebx=00000000 ecx=6115D8BC edx=00000000 esi=00000007 edi=0000000A ebp=0022E588 esp=0022E570 program=c:\mb_gnu_8_1\microblaze\bin\elf2flt.exe, pid 2884, thread main cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023 Stack trace: Frame Function Args

0022E588 610D9100 (0022F12C, 00000000, 00000000, 0000000A) 0022E5A8 610D9288 (00000000, 00000000, 0000000A, 00000000) 0022E5C8 610D5040 (00000000, 6115D8BC, 0042B533, 00401B9F) 0022EEC8 00402399 (00000007, 6115D8BC, 00490090, 77DADB0D) 0022EF78 61005BC8 (0022EFD0, 0022EFC0, 00000005, 00000000) 0022FF88 61005EB3 (00000000, 00000000, 00000000, 00000000) End of stack trace

ok, let ma attach the makefiles that I use for busybox/sh out of tree

----------------------------- ifndef ROOTDIR ROOTDIR=../uClinux-dist endif

UCLINUX_BUILD_USER = 1 include $(ROOTDIR)/.config LIBCDIR = $(CONFIG_LIBCDIR) include $(ROOTDIR)/config.arch

BB = busybox BB_OBJS += ./init/init.o ./init/init_shared.o BB_OBJS += ./networking/hostname.o BB_OBJS += ./util-linux/mount.o BB_OBJS += ./shell/hush.o BB_OBJS += ./coreutils/ls.o ./coreutils/mkdir.o ./coreutils/true.o ./coreutils/false.o ./coreutils/echo.o ./coreutils/chmod.o ./coreutils/test.o

## BB_OBJS += ./applets/busybox.o ./applets/applets.o

LDLIBS += ./libbb/libbb.a LDLIBS += ./applets/applets.a

## LDLIBS += ./coreutils/coreutils.a ##LDLIBS += ./shell/shell.a

all: $(BB) cp busybox.elf.bflt busybox

$(BB): $(BB_OBJS) $(CC) $(LDFLAGS) -o $@ $(BB_OBJS) $(LDLIBS)

clean: -rm -f $(BB) *.elf *.gdb *.o

%.o: %.c $(CC) -c $(CFLAGS) -o $@ $<

--------------------------

ifndef ROOTDIR ROOTDIR=../uClinux-dist endif

UCLINUX_BUILD_USER = 1 include $(ROOTDIR)/.config LIBCDIR = $(CONFIG_LIBCDIR) include $(ROOTDIR)/config.arch

CFLAGS += -DHAVE_MALLOC FLTFLAGS += -s 8192

SH = sh SH_OBJS += sh1.o sh2.o sh3.o sh4.o sh5.o sh6.o

#LDLIBS += ./libbb/libbb.a

all: $(SH) cp sh.elf.bflt sh

$(SH): $(SH_OBJS) $(CC) $(LDFLAGS) -o $@ $(SH_OBJS) $(LDLIBS$(LDLIBS_$@))

clean: -rm -f $(TFT) *.elf *.gdb *.o

%.o: %.c $(CC) -c $(CFLAGS) -o $@ $<

-----------------------

the busybox makefile does produce flat exe from makefile

the sh make file produces

Exception: STATUS_ACCESS_VIOLATION at eip=610D9100 eax=0022F12C ebx=00000000 ecx=6115DE74 edx=00000000 esi=00000007 edi=0000000A ebp=0022E588 esp=0022E570 program=c:\mb_gnu_8_1\microblaze\bin\elf2flt.exe, pid 5172, thread main cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023 Stack trace: Frame Function Args

0022E588 610D9100 (0022F12C, 00000000, 00000000, 0000000A) 0022E5A8 610D9288 (00000000, 00000000, 0000000A, 00000000) 0022E5C8 610D5040 (00000000, 6115DE74, 0042B533, 00401B9F) 0022EEC8 00402399 (00000007, 6115DE74, 00490090, 77DADB0D) 0022EF78 61005BC8 (0022EFD0, 0022EFC0, 00000002, 00000000) 0022FF88 61005EB3 (00000000, 00000000, 00000000, 00000000) End of stack trace

so I convert it after make manually with bat file

mb-elf2flt sh.elf copy sh.elf.bflt sh

this sh is correct working exe !

I assume the issues are in the elf2flt mainly

3) all flat exes produced have .elf.bflt extension so I had to modify the makefiles to get proper exe names, dont know what is causing this or where would the proper fix to this issue belong too

Antti

Reply to
Antti

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.