MIPS RELOCATABLE: [PATCH 14/20] RISC-V: erizo: migrate to PBL

Oleksij Rempel linux at rempel-privat.de
Mon Mar 15 17:03:55 GMT 2021


Am 15.03.21 um 16:46 schrieb Ahmad Fatoum:
> Hi,
>
> On 15.03.21 16:37, Antony Pavlov wrote:
>> On Mon, 15 Mar 2021 13:40:10 +0100
>> Ahmad Fatoum <a.fatoum at pengutronix.de> wrote:
>>> Without having dug into the MIPS code, the main point of CONFIG_RELOCATABLE
>>> is that PBL can check for it to decide where to copy barebox proper to.
>>>
>>> This is very relevant if there's no TEXT_BASE that works for all boards
>>> that you need to support with your multi-image barebox.
>>
>> So CONFIG_RELOCATABLE can be very helpful.
>>
>> At the moment MIPS barebox is always relocatable.
>> Sometimes it's useful to run barebox from fixed TEXT_BASE (e.g. during gdb debug session),
>> so this fixed TEXT_BASE behaviour can be introduced for CONFIG_RELOCATABLE=n case.
>
> With the pbl break stuff, you could in theory already flip a config option
> and have a gdb script that computes your load address from the address of
> your breakpoint. That would be nice to have as a ready-to-use script.
>
> I recall Oleksij and Michael did something in that regard.
>
> Benefit is that the break is an actual machine code nop when inactive,
> so binary size/layout shouldn't change, unlike with flipping CONFIG_RELOCATABLE.
> For RISC-V, I see no good reason to allow CONFIG_RELOCATABLE=n right now.
>
> Cheers,
> Ahmad
>

If i remember it correctly, this two patches are needed, to make
relocatable barebox debugable with openocd and gdb

https://git.pengutronix.de/cgit/barebox/commit/?id=c37cc2d725a496551113f4ebb1d116823eb0dbd1

https://git.pengutronix.de/cgit/barebox/commit/?id=d71573a006a2fc2b83c076c556b88166f4e3dec3

For the MIPS and RISC-V we would need similar helpers.

Regards,
Oleksij

--
Regards,
Oleksij



More information about the barebox mailing list