Merge branch 'rust-embedded:master' into master
commit
43d9997956
@ -1 +1,35 @@
|
|||||||
{}
|
{
|
||||||
|
"printWidth": 100,
|
||||||
|
"tabWidth": 4,
|
||||||
|
"useTabs": false,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": false,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"jsxBracketSameLine": false,
|
||||||
|
"arrowParens": "always",
|
||||||
|
"requirePragma": false,
|
||||||
|
"insertPragma": false,
|
||||||
|
"proseWrap": "preserve",
|
||||||
|
"endOfLine": "auto",
|
||||||
|
"overrides": [
|
||||||
|
{
|
||||||
|
"files": "*.rs",
|
||||||
|
"options": {
|
||||||
|
"printWidth": 100,
|
||||||
|
"tabWidth": 4,
|
||||||
|
"useTabs": false,
|
||||||
|
"semi": true,
|
||||||
|
"singleQuote": false,
|
||||||
|
"trailingComma": "es5",
|
||||||
|
"bracketSpacing": true,
|
||||||
|
"jsxBracketSameLine": false,
|
||||||
|
"arrowParens": "always",
|
||||||
|
"requirePragma": false,
|
||||||
|
"insertPragma": false,
|
||||||
|
"proseWrap": "preserve",
|
||||||
|
"endOfLine": "auto"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
2.7
|
3.0.2
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
{
|
{
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.rulers": [100]
|
"editor.rulers": [100],
|
||||||
|
"rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat",
|
||||||
|
"rust-analyzer.cargo.features": ["bsp_rpi3"],
|
||||||
|
"rust-analyzer.checkOnSave.allTargets": false,
|
||||||
|
"rust-analyzer.checkOnSave.extraArgs": ["--lib", "--bins"],
|
||||||
|
"rust-analyzer.lens.debug": false,
|
||||||
|
"rust-analyzer.lens.run": false
|
||||||
}
|
}
|
||||||
|
@ -1,72 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: MIT OR Apache-2.0
|
|
||||||
*
|
|
||||||
* Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
__rpi_phys_dram_start_addr = 0;
|
|
||||||
|
|
||||||
/* The physical address at which the the kernel binary will be loaded by the Raspberry's firmware */
|
|
||||||
__rpi_phys_binary_load_addr = 0x80000;
|
|
||||||
|
|
||||||
|
|
||||||
ENTRY(__rpi_phys_binary_load_addr)
|
|
||||||
|
|
||||||
/* Flags:
|
|
||||||
* 4 == R
|
|
||||||
* 5 == RX
|
|
||||||
* 6 == RW
|
|
||||||
*
|
|
||||||
* Segments are marked PT_LOAD below so that the ELF file provides virtual and physical addresses.
|
|
||||||
* It doesn't mean all of them need actually be loaded.
|
|
||||||
*/
|
|
||||||
PHDRS
|
|
||||||
{
|
|
||||||
segment_boot_core_stack PT_LOAD FLAGS(6);
|
|
||||||
segment_code PT_LOAD FLAGS(5);
|
|
||||||
segment_data PT_LOAD FLAGS(6);
|
|
||||||
}
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
. = __rpi_phys_dram_start_addr;
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Boot Core Stack
|
|
||||||
***********************************************************************************************/
|
|
||||||
.boot_core_stack (NOLOAD) :
|
|
||||||
{
|
|
||||||
/* ^ */
|
|
||||||
/* | stack */
|
|
||||||
. += __rpi_phys_binary_load_addr; /* | growth */
|
|
||||||
/* | direction */
|
|
||||||
__boot_core_stack_end_exclusive = .; /* | */
|
|
||||||
} :segment_boot_core_stack
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Code + RO Data + Global Offset Table
|
|
||||||
***********************************************************************************************/
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
KEEP(*(.text._start))
|
|
||||||
*(.text._start_arguments) /* Constants (or statics in Rust speak) read by _start(). */
|
|
||||||
*(.text._start_rust) /* The Rust entry point */
|
|
||||||
*(.text*) /* Everything else */
|
|
||||||
} :segment_code
|
|
||||||
|
|
||||||
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
|
|
||||||
.got : ALIGN(8) { *(.got) } :segment_code
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Data + BSS
|
|
||||||
***********************************************************************************************/
|
|
||||||
.data : { *(.data*) } :segment_data
|
|
||||||
|
|
||||||
/* Section is zeroed in pairs of u64. Align start and end to 16 bytes */
|
|
||||||
.bss (NOLOAD) : ALIGN(16)
|
|
||||||
{
|
|
||||||
__bss_start = .;
|
|
||||||
*(.bss*);
|
|
||||||
. = ALIGN(16);
|
|
||||||
__bss_end_exclusive = .;
|
|
||||||
} :segment_data
|
|
||||||
}
|
|
@ -0,0 +1,79 @@
|
|||||||
|
/* SPDX-License-Identifier: MIT OR Apache-2.0
|
||||||
|
*
|
||||||
|
* Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
__rpi_phys_dram_start_addr = 0;
|
||||||
|
|
||||||
|
/* The physical address at which the the kernel binary will be loaded by the Raspberry's firmware */
|
||||||
|
__rpi_phys_binary_load_addr = 0x80000;
|
||||||
|
|
||||||
|
|
||||||
|
ENTRY(__rpi_phys_binary_load_addr)
|
||||||
|
|
||||||
|
/* Flags:
|
||||||
|
* 4 == R
|
||||||
|
* 5 == RX
|
||||||
|
* 6 == RW
|
||||||
|
*
|
||||||
|
* Segments are marked PT_LOAD below so that the ELF file provides virtual and physical addresses.
|
||||||
|
* It doesn't mean all of them need actually be loaded.
|
||||||
|
*/
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
segment_boot_core_stack PT_LOAD FLAGS(6);
|
||||||
|
segment_code PT_LOAD FLAGS(5);
|
||||||
|
segment_data PT_LOAD FLAGS(6);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
. = __rpi_phys_dram_start_addr;
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Boot Core Stack
|
||||||
|
***********************************************************************************************/
|
||||||
|
.boot_core_stack (NOLOAD) :
|
||||||
|
{
|
||||||
|
/* ^ */
|
||||||
|
/* | stack */
|
||||||
|
. += __rpi_phys_binary_load_addr; /* | growth */
|
||||||
|
/* | direction */
|
||||||
|
__boot_core_stack_end_exclusive = .; /* | */
|
||||||
|
} :segment_boot_core_stack
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Code + RO Data + Global Offset Table
|
||||||
|
***********************************************************************************************/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
KEEP(*(.text._start))
|
||||||
|
*(.text._start_arguments) /* Constants (or statics in Rust speak) read by _start(). */
|
||||||
|
*(.text._start_rust) /* The Rust entry point */
|
||||||
|
*(.text*) /* Everything else */
|
||||||
|
} :segment_code
|
||||||
|
|
||||||
|
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Data + BSS
|
||||||
|
***********************************************************************************************/
|
||||||
|
.data : { *(.data*) } :segment_data
|
||||||
|
|
||||||
|
/* Section is zeroed in pairs of u64. Align start and end to 16 bytes */
|
||||||
|
.bss (NOLOAD) : ALIGN(16)
|
||||||
|
{
|
||||||
|
__bss_start = .;
|
||||||
|
*(.bss*);
|
||||||
|
. = ALIGN(16);
|
||||||
|
__bss_end_exclusive = .;
|
||||||
|
} :segment_data
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Misc
|
||||||
|
***********************************************************************************************/
|
||||||
|
.got : { *(.got*) }
|
||||||
|
ASSERT(SIZEOF(.got) == 0, "Relocation support not expected")
|
||||||
|
|
||||||
|
/DISCARD/ : { *(.comment*) }
|
||||||
|
}
|
@ -1,72 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: MIT OR Apache-2.0
|
|
||||||
*
|
|
||||||
* Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
__rpi_phys_dram_start_addr = 0;
|
|
||||||
|
|
||||||
/* The physical address at which the the kernel binary will be loaded by the Raspberry's firmware */
|
|
||||||
__rpi_phys_binary_load_addr = 0x80000;
|
|
||||||
|
|
||||||
|
|
||||||
ENTRY(__rpi_phys_binary_load_addr)
|
|
||||||
|
|
||||||
/* Flags:
|
|
||||||
* 4 == R
|
|
||||||
* 5 == RX
|
|
||||||
* 6 == RW
|
|
||||||
*
|
|
||||||
* Segments are marked PT_LOAD below so that the ELF file provides virtual and physical addresses.
|
|
||||||
* It doesn't mean all of them need actually be loaded.
|
|
||||||
*/
|
|
||||||
PHDRS
|
|
||||||
{
|
|
||||||
segment_boot_core_stack PT_LOAD FLAGS(6);
|
|
||||||
segment_code PT_LOAD FLAGS(5);
|
|
||||||
segment_data PT_LOAD FLAGS(6);
|
|
||||||
}
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
. = __rpi_phys_dram_start_addr;
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Boot Core Stack
|
|
||||||
***********************************************************************************************/
|
|
||||||
.boot_core_stack (NOLOAD) :
|
|
||||||
{
|
|
||||||
/* ^ */
|
|
||||||
/* | stack */
|
|
||||||
. += __rpi_phys_binary_load_addr; /* | growth */
|
|
||||||
/* | direction */
|
|
||||||
__boot_core_stack_end_exclusive = .; /* | */
|
|
||||||
} :segment_boot_core_stack
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Code + RO Data + Global Offset Table
|
|
||||||
***********************************************************************************************/
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
KEEP(*(.text._start))
|
|
||||||
*(.text._start_arguments) /* Constants (or statics in Rust speak) read by _start(). */
|
|
||||||
*(.text._start_rust) /* The Rust entry point */
|
|
||||||
*(.text*) /* Everything else */
|
|
||||||
} :segment_code
|
|
||||||
|
|
||||||
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
|
|
||||||
.got : ALIGN(8) { *(.got) } :segment_code
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Data + BSS
|
|
||||||
***********************************************************************************************/
|
|
||||||
.data : { *(.data*) } :segment_data
|
|
||||||
|
|
||||||
/* Section is zeroed in pairs of u64. Align start and end to 16 bytes */
|
|
||||||
.bss (NOLOAD) : ALIGN(16)
|
|
||||||
{
|
|
||||||
__bss_start = .;
|
|
||||||
*(.bss*);
|
|
||||||
. = ALIGN(16);
|
|
||||||
__bss_end_exclusive = .;
|
|
||||||
} :segment_data
|
|
||||||
}
|
|
@ -0,0 +1,79 @@
|
|||||||
|
/* SPDX-License-Identifier: MIT OR Apache-2.0
|
||||||
|
*
|
||||||
|
* Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
__rpi_phys_dram_start_addr = 0;
|
||||||
|
|
||||||
|
/* The physical address at which the the kernel binary will be loaded by the Raspberry's firmware */
|
||||||
|
__rpi_phys_binary_load_addr = 0x80000;
|
||||||
|
|
||||||
|
|
||||||
|
ENTRY(__rpi_phys_binary_load_addr)
|
||||||
|
|
||||||
|
/* Flags:
|
||||||
|
* 4 == R
|
||||||
|
* 5 == RX
|
||||||
|
* 6 == RW
|
||||||
|
*
|
||||||
|
* Segments are marked PT_LOAD below so that the ELF file provides virtual and physical addresses.
|
||||||
|
* It doesn't mean all of them need actually be loaded.
|
||||||
|
*/
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
segment_boot_core_stack PT_LOAD FLAGS(6);
|
||||||
|
segment_code PT_LOAD FLAGS(5);
|
||||||
|
segment_data PT_LOAD FLAGS(6);
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
. = __rpi_phys_dram_start_addr;
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Boot Core Stack
|
||||||
|
***********************************************************************************************/
|
||||||
|
.boot_core_stack (NOLOAD) :
|
||||||
|
{
|
||||||
|
/* ^ */
|
||||||
|
/* | stack */
|
||||||
|
. += __rpi_phys_binary_load_addr; /* | growth */
|
||||||
|
/* | direction */
|
||||||
|
__boot_core_stack_end_exclusive = .; /* | */
|
||||||
|
} :segment_boot_core_stack
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Code + RO Data + Global Offset Table
|
||||||
|
***********************************************************************************************/
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
KEEP(*(.text._start))
|
||||||
|
*(.text._start_arguments) /* Constants (or statics in Rust speak) read by _start(). */
|
||||||
|
*(.text._start_rust) /* The Rust entry point */
|
||||||
|
*(.text*) /* Everything else */
|
||||||
|
} :segment_code
|
||||||
|
|
||||||
|
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Data + BSS
|
||||||
|
***********************************************************************************************/
|
||||||
|
.data : { *(.data*) } :segment_data
|
||||||
|
|
||||||
|
/* Section is zeroed in pairs of u64. Align start and end to 16 bytes */
|
||||||
|
.bss (NOLOAD) : ALIGN(16)
|
||||||
|
{
|
||||||
|
__bss_start = .;
|
||||||
|
*(.bss*);
|
||||||
|
. = ALIGN(16);
|
||||||
|
__bss_end_exclusive = .;
|
||||||
|
} :segment_data
|
||||||
|
|
||||||
|
/***********************************************************************************************
|
||||||
|
* Misc
|
||||||
|
***********************************************************************************************/
|
||||||
|
.got : { *(.got*) }
|
||||||
|
ASSERT(SIZEOF(.got) == 0, "Relocation support not expected")
|
||||||
|
|
||||||
|
/DISCARD/ : { *(.comment*) }
|
||||||
|
}
|
@ -1,72 +0,0 @@
|
|||||||
/* SPDX-License-Identifier: MIT OR Apache-2.0
|
|
||||||
*
|
|
||||||
* Copyright (c) 2018-2022 Andre Richter <andre.o.richter@gmail.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
__rpi_phys_dram_start_addr = 0;
|
|
||||||
|
|
||||||
/* The physical address at which the the kernel binary will be loaded by the Raspberry's firmware */
|
|
||||||
__rpi_phys_binary_load_addr = 0x80000;
|
|
||||||
|
|
||||||
|
|
||||||
ENTRY(__rpi_phys_binary_load_addr)
|
|
||||||
|
|
||||||
/* Flags:
|
|
||||||
* 4 == R
|
|
||||||
* 5 == RX
|
|
||||||
* 6 == RW
|
|
||||||
*
|
|
||||||
* Segments are marked PT_LOAD below so that the ELF file provides virtual and physical addresses.
|
|
||||||
* It doesn't mean all of them need actually be loaded.
|
|
||||||
*/
|
|
||||||
PHDRS
|
|
||||||
{
|
|
||||||
segment_boot_core_stack PT_LOAD FLAGS(6);
|
|
||||||
segment_code PT_LOAD FLAGS(5);
|
|
||||||
segment_data PT_LOAD FLAGS(6);
|
|
||||||
}
|
|
||||||
|
|
||||||
SECTIONS
|
|
||||||
{
|
|
||||||
. = __rpi_phys_dram_start_addr;
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Boot Core Stack
|
|
||||||
***********************************************************************************************/
|
|
||||||
.boot_core_stack (NOLOAD) :
|
|
||||||
{
|
|
||||||
/* ^ */
|
|
||||||
/* | stack */
|
|
||||||
. += __rpi_phys_binary_load_addr; /* | growth */
|
|
||||||
/* | direction */
|
|
||||||
__boot_core_stack_end_exclusive = .; /* | */
|
|
||||||
} :segment_boot_core_stack
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Code + RO Data + Global Offset Table
|
|
||||||
***********************************************************************************************/
|
|
||||||
.text :
|
|
||||||
{
|
|
||||||
KEEP(*(.text._start))
|
|
||||||
*(.text._start_arguments) /* Constants (or statics in Rust speak) read by _start(). */
|
|
||||||
*(.text._start_rust) /* The Rust entry point */
|
|
||||||
*(.text*) /* Everything else */
|
|
||||||
} :segment_code
|
|
||||||
|
|
||||||
.rodata : ALIGN(8) { *(.rodata*) } :segment_code
|
|
||||||
.got : ALIGN(8) { *(.got) } :segment_code
|
|
||||||
|
|
||||||
/***********************************************************************************************
|
|
||||||
* Data + BSS
|
|
||||||
***********************************************************************************************/
|
|
||||||
.data : { *(.data*) } :segment_data
|
|
||||||
|
|
||||||
/* Section is zeroed in pairs of u64. Align start and end to 16 bytes */
|
|
||||||
.bss (NOLOAD) : ALIGN(16)
|
|
||||||
{
|
|
||||||
__bss_start = .;
|
|
||||||
*(.bss*);
|
|
||||||
. = ALIGN(16);
|
|
||||||
__bss_end_exclusive = .;
|
|
||||||
} :segment_data
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue