[LEDE-DEV] Handling the image generation process on ARC770

Felix Fietkau nbd at nbd.name
Mon Jul 24 11:54:40 PDT 2017


On 2017-07-24 20:09, Alexandru Gagniuc wrote:
> On 07/24/2017 01:42 AM, Felix Fietkau wrote:
>> On 2017-07-21 18:53, Alexandru Gagniuc wrote:
>>> Hello,
>>>
>>> I am looking to write some rules to generate images on an SOC we're
>>> trying to port over.
>>>
>>> I need a vmlinux-initramfs ELF file with DWARF debugging information.
>>> This is useful because it goes straight to gdb and can be loaded over
>>> JTAG. I can write the following rule:
>>>
> [snip]
> 
>>> I'm assuming that's not how the buildsystem was designed. Is there any
>>> sensible way of putting these rules together into a single 'define Device/'?
> 
>> I think the most sensible way would be to change the kernel to support
>> load_addr == entry_point. This could be achieved by adding a small
>> assembly stub that gets linked to the beginning of the kernel image
>> which jumps to the real entry entry point.
>> Some other architectures, e.g. MIPS, have been doing this for a long
>> time. Is it feasible on ARC as well?
> 
> I'm not aware of any technical reason as to why it can't be done. I do 
> not know why the linker sections are arranged the way they are. My guess 
> is the decision was fairly arbitrary. At the same time, I don't get to 
> make those decisions.
Why don't you get to make those decisions? If you introduce a patch that
adds support for it in the kernel and it is technically sound, we will
merge it.

> I understand from your answer that there is no way to have the LEDE 
> buildsystem generate the correct images without changing the kernel 
> entry point, right?
We could extend the build system to add support for that, but I would
strongly prefer to fix it in the kernel instead.

- Felix



More information about the Lede-dev mailing list