Part Number: TMDXEVM8148
Tool/software: Linux
I have an 8148 EVM configured to boot Linux with syslink enabled. I am able to boot from an NFS, and run the syslink Helloworld example but when I create a ramfs there is an error syslink: relocation out of range.
The system in question does not have enough flash to load a file system. In addition, the method of loading the kernel image does not lend itself to having an initrd filesystem loaded separately from the kernel.
Is there a method of having the syslink.ko reside in a ramfs?
Doing some research I found that there are issues running .ko modules from ramfs. The following links go into detail why.
Modules get placed 16MiB below PAGE_OFFSET, and when you add another
~16MiB initramfs between them and the kernel symbols, you exceed the
offset range of the branch instruction.
It's possible to hack around this by placing the initramfs at the end of
the kernel image rather than at the beginning with the rest of the init
data. Something like the below should work, although you should also
probably take care of alignment and also have this section freed when
the rest of the init data is freed.
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index b16c079..05ad361 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -46,7 +46,6 @@ SECTIONS
INIT_CALLS
CON_INITCALL
SECURITY_INITCALL
- INIT_RAM_FS
#ifndef CONFIG_XIP_KERNEL
__init_begin = _stext;
@@ -170,6 +169,11 @@ SECTIONS
_edata = .;
}
+
+ .initramfs : {
+ INIT_RAM_FS
+ }
+
_edata_loc = __data_loc + SIZEOF(.data);
#ifdef CONFIG_HAVE_TCM
I applied this patch and was able to install syslink.ko (modprobe syslink).
Loading modprobe syslink
SysLink version : 2.20.02.20
SysLink module created on Date:Feb 26 2018 Time:16:07:22
The load-hd-firmware script waits for syslinkipc_ProcMgr and syslinkipc_ClientNotifyMgr to respond. They never do. So even though the syslink.ko gets loaded the notifications are not seen.
Hopefully this issue has been resolved. I have done some searching and cannot find anything.
-steve