Runtime loading update
chrisj at rtems.org
Mon Jan 14 23:25:22 UTC 2013
I have just pushed changes to the RTL project repo  to allow RTEMS
Application (RAP) module loading and unloading (unloading not tested).
RAP modules are LZ77 compressed format modules created by the RTEMS
This project is being held in stand alone repositories and work with
4.11 and should work with 4.10 but I have not tested this in a while.
The current status is loading the libbsdport library as a module under
qemu is working. It loads, starts, then finds and creates a suitable
network driver. You can see the RAP module load as command 10 in
following qemu trace, followed by the libbsdport trace ...
$ /Users/chris/Development/qemu/0.12.5/bin/qemu -m 128 -boot a -fda
fat:build/i386-rtems4.11-pc586 -serial stdio -no-reboot -s
Register /dev/com1 as the CONSOLE
IDE0:master:QEMU HARDDISK, 516.0M (16/1024/63), max blk size:8192
RTEMS Run Time Link Editor Test, Version 1.0.0
Register RAM Disk Driver: successful
Read IDE Disk Partition Table: successful
Read IDE Disk Partition Table: error: ide partition table not found:
RTEMS inconsistency detected
Loading filesystem: successful
1: #rtl-trace set all
2: #rtl-trace set load load-sect symbol reloc #unresolved
3: #dlo libx.a:xa.c.1.o
4: #dlo libx.a:x-long-name-to-create-gnu-extension-in-archive.c.1.o
5: #dlo x.rap
6: #mkdir c
7: #mount -t dosfs /dev/hda1 /c
8: #dlo c/bsdport.rap
9: #dlo bsdport.rap
10: rap ld ./bsdport.rap
Wanted unit is 0x0, pattern ''
pci_bus_count() found 0 busses, assuming 1
name = em, methods = 0x87523c
Trying driver 'em' ...MATCH
Probing PCI 0x0:3.0
Now attaching em1: (0x0:3.0)
em1:Memory Access and/or Bus Master bits were not set!
em1:Link is up 1000 Mbps Full Duplex
11: rap ls
App DL Handle Name
0x81bf50 0x829a60 ./bsdport.rap
RTEMS SHELL (Ver.1.0-FRC):/dev/console. Dec 13 2012. 'help' to list
[/] # ls
bsdport.rap dev libx.a shell-init x.rap
I have only been testing on qemu and the i386 arch lately. There is more
work to be done on this project to complete it but it is starting to
take shape. One of those tasks is documentation how-ever until that
happens the repos are all that exist.
The bsdport.rap module is approx. 256K in size and containing around
300K of code, constants and data plus symbols and close to 10,000
relocation records. I have a private hacked libbsdport that uses waf to
create the RAP module. I will make this available at some point in time.
The qemu executable 'rtld.xz' I used for the trace can be found here:
You need to decompress it before running it.
More information about the devel