[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] Ruby on uclinux
Hi Wei,
Sounds ilke an interesting project - more comments below:
> Ruby is configured with ./configure, and I used CC=/path
> to/ucfront-gcc , target=mb and --with-static-linked-ext. I have to
> modify config.sub to make it recognize mb-linux (just adding the
> names, and set default os of mb to be linux -- I am I right in doing
> this?)
The mods to config.sub sound fine. I recommend, if Ruby supports it,
that you do a VPATH build. Taking the example in ethtool:
uClinux-dist/user/ruby/Makefile:
all: build
$(MAKE) -C build
build: Makefile
rm -rf build
mkdir build
(cd build; CC="$(CC) $(CFLAGS)" LDFLAGS="$(LDFLAGS)"
LIBS="$(LDLIBS)" ..
/configure)
romfs:
$(ROMFSINST) build/ruby /bin/ruby
clean:
rm -rf build
This way, the build takes place out of the main source tree (in the
/build subdir), which means there's no manual Makefile hacking required.
> The build process can be completed and the resulting ruby executable is
> ruby: BFLT executable - version 4 ram
>
> However, when I run it, I get
> Allocation of length 1099927 from process 77 failed
OK, so this is a memory allocation failure - the executable is clearly
quite large (approx 1MB?), and the kernel refused that memory allocation.
> Free pages: 249484kB ( 0kB HighMem)
> Zone:DMA freepages:249484kB
> Zone:Normal freepages: 0kB
> Zone:HighMem freepages: 0kB
> ( Active: 278, inactive: 73, free: 62371 )
> 1*4kB 1*8kB 0*16kB 0*32kB 0*64kB 1*128kB 0*256kB 1*512kB 1*1024kB
> 121*2048kB = 249484kB)
This is strange, it seems that you have plenty of memory free, and
plenty of large (2MB) memory blocks available.
> Do you know what happened? I think I encountered similar problems
> when I try to build a few other applications. Here is part of my make
> file, and resulting parameters to ld.
In the kernel config -> general setup submenu, you might want to try
enabling the
[ ] Allow allocating large blocks (> 1MB) of memory
option.
Also (and seperately), maybe give this
[ ] Non power-of-2 kernel allocator (EXPERIMENTAL)
a try.
Regards,
John
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/