[PATCH] bsp/raspberrypi: Fix linker command file

Christian Mauderer list at c-mauderer.de
Sat Dec 21 15:56:31 UTC 2019


With some further tests that is not absolutely necessary like I first
thought. The raspberry bootloader has a configuration option for setting
the start address: If the following line is added to the config.txt we
can leave the address at 0x00200000:

kernel_address=0x00200000

See
https://www.raspberrypi.org/documentation/configuration/config-txt/boot.md
for details regarding the config.txt.

I tested it on a Pi 1 and it works there. I'm still trying to find
another bug so it will need some time till I can test it on a Pi 2.

On 20/12/2019 07:32, Sebastian Huber wrote:
> The RTEMS entry point must be at 0x8000.
> 
> Update #3774.
> ---
>  bsps/arm/raspberrypi/start/linkcmds.in | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/bsps/arm/raspberrypi/start/linkcmds.in b/bsps/arm/raspberrypi/start/linkcmds.in
> index d99b4fe23e..fde75877e7 100644
> --- a/bsps/arm/raspberrypi/start/linkcmds.in
> +++ b/bsps/arm/raspberrypi/start/linkcmds.in
> @@ -15,11 +15,12 @@
>   */
>  
>  MEMORY {
> -  RAM_MMU (AIW) : ORIGIN = 0x00100000, LENGTH = @RPI_RAM_MMU_LENGTH@
> -  RAM     (AIW) : ORIGIN = 0x00200000, LENGTH = @RPI_RAM_LENGTH_AVAILABLE@ - @RPI_RAM_NOCACHE_LENGTH@
> +  START (AIW) : ORIGIN = 0x00008000, LENGTH = 0xf8000
> +  MMU   (AIW) : ORIGIN = 0x00100000, LENGTH = @RPI_RAM_MMU_LENGTH@
> +  RAM   (AIW) : ORIGIN = 0x00200000, LENGTH = @RPI_RAM_LENGTH_AVAILABLE@ - @RPI_RAM_NOCACHE_LENGTH@
>  }
>  
> -REGION_ALIAS ("REGION_START",          RAM);
> +REGION_ALIAS ("REGION_START",          START);
>  REGION_ALIAS ("REGION_VECTOR",         RAM);
>  REGION_ALIAS ("REGION_TEXT",           RAM);
>  REGION_ALIAS ("REGION_TEXT_LOAD",      RAM);
> @@ -41,9 +42,7 @@ bsp_stack_abt_size = DEFINED (bsp_stack_abt_size) ? bsp_stack_abt_size : 1024;
>  
>  bsp_section_rwbarrier_align = DEFINED (bsp_section_rwbarrier_align) ? bsp_section_rwbarrier_align : 1M;
>  
> -bsp_vector_table_in_start_section = 1;
> -
> -bsp_translation_table_base = ORIGIN (RAM_MMU);
> -bsp_translation_table_end = ORIGIN (RAM_MMU) + LENGTH (RAM_MMU);
> +bsp_translation_table_base = ORIGIN (MMU);
> +bsp_translation_table_end = ORIGIN (MMU) + LENGTH (MMU);
>  
>  INCLUDE linkcmds.armv4
> 


More information about the devel mailing list