Merge branch 'rust-embedded:master' into master
commit
43d9997956
@ -1,40 +1,40 @@
|
||||
name: BSP-RPi3
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build kernels
|
||||
runs-on: ubuntu-20.04
|
||||
build:
|
||||
name: Build kernels
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby 2.x
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Make
|
||||
run: |
|
||||
BSP=rpi3 bundle exec ruby utils/devtool.rb make
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils rustfilt
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Run
|
||||
run: |
|
||||
BSP=rpi3 bundle exec ruby utils/devtool.rb make
|
||||
|
@ -1,40 +1,40 @@
|
||||
name: BSP-RPi4
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build kernels
|
||||
runs-on: ubuntu-20.04
|
||||
build:
|
||||
name: Build kernels
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby 2.x
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Make
|
||||
run: |
|
||||
BSP=rpi4 bundle exec ruby utils/devtool.rb make
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils rustfilt
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Run
|
||||
run: |
|
||||
BSP=rpi4 bundle exec ruby utils/devtool.rb make
|
||||
|
@ -1,46 +1,46 @@
|
||||
name: Various Sanity Checks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Various Sanity Checks
|
||||
runs-on: ubuntu-20.04
|
||||
build:
|
||||
name: Various Sanity Checks
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "12"
|
||||
- name: Set up Ruby 2.x
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
rustup component add clippy
|
||||
- name: Set up Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Set up Prettier
|
||||
run: |
|
||||
npm install prettier
|
||||
- name: Setup misspell
|
||||
run: |
|
||||
curl -L -o ./install-misspell.sh https://git.io/misspell
|
||||
sh ./install-misspell.sh -b .vendor
|
||||
- name: Run checks
|
||||
run: |
|
||||
BSP=rpi3 bundle exec ruby utils/devtool.rb clippy
|
||||
BSP=rpi4 bundle exec ruby utils/devtool.rb clippy
|
||||
bundle exec ruby utils/devtool.rb copyright
|
||||
bundle exec ruby utils/devtool.rb fmt_check
|
||||
bundle exec ruby utils/devtool.rb misspell
|
||||
bundle exec ruby utils/devtool.rb rubocop
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "16"
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
rustup component add clippy
|
||||
- name: Set up Bundler
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Set up Prettier
|
||||
run: |
|
||||
npm install prettier
|
||||
- name: Setup misspell
|
||||
run: |
|
||||
curl -L -o ./install-misspell.sh https://raw.githubusercontent.com/client9/misspell/master/install-misspell.sh
|
||||
sh ./install-misspell.sh -b .vendor
|
||||
- name: Run checks
|
||||
run: |
|
||||
BSP=rpi3 bundle exec ruby utils/devtool.rb clippy
|
||||
BSP=rpi4 bundle exec ruby utils/devtool.rb clippy
|
||||
bundle exec ruby utils/devtool.rb copyright
|
||||
bundle exec ruby utils/devtool.rb fmt_check
|
||||
bundle exec ruby utils/devtool.rb misspell
|
||||
bundle exec ruby utils/devtool.rb rubocop
|
||||
|
@ -1,40 +1,40 @@
|
||||
name: Integration-Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Run integration tests
|
||||
runs-on: ubuntu-20.04
|
||||
build:
|
||||
name: Run integration tests
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby 2.x
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Make all
|
||||
run: |
|
||||
bundle exec ruby utils/devtool.rb test_integration
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils rustfilt
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Run
|
||||
run: |
|
||||
bundle exec ruby utils/devtool.rb test_integration
|
||||
|
@ -1,40 +1,41 @@
|
||||
name: Unit-Tests
|
||||
name: Boot-and-Unit-Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Run unit tests
|
||||
runs-on: ubuntu-20.04
|
||||
build:
|
||||
name: Run boot and unit tests
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby 2.x
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Make all
|
||||
run: |
|
||||
bundle exec ruby utils/devtool.rb test_unit
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils rustfilt
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Run
|
||||
run: |
|
||||
bundle exec ruby utils/devtool.rb test_boot
|
||||
bundle exec ruby utils/devtool.rb test_unit
|
||||
|
@ -1,40 +1,40 @@
|
||||
name: Xtra-Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- "utils/**"
|
||||
- "doc/**"
|
||||
- "docker/**"
|
||||
schedule:
|
||||
- cron: "0 5 * * *"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Run xtra tests
|
||||
runs-on: ubuntu-20.04
|
||||
build:
|
||||
name: Run xtra tests
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Ruby 2.x
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Make all
|
||||
run: |
|
||||
bundle exec ruby utils/devtool.rb test_xtra
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
- name: Set up Rust nightly
|
||||
run: |
|
||||
cargo install cargo-binutils
|
||||
- name: Set up Ruby
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set without 'uart'
|
||||
bundle install --retry 3
|
||||
- name: Run
|
||||
run: |
|
||||
bundle exec ruby utils/devtool.rb make_xtra
|
||||
|
@ -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.rulers": [100]
|
||||
"editor.formatOnSave": true,
|
||||
"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,9 +1,10 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.rulers": [100],
|
||||
"rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat",
|
||||
"rust-analyzer.cargo.features": ["bsp_rpi3"],
|
||||
"rust-analyzer.checkOnSave.overrideCommand": ["make", "check"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
"editor.formatOnSave": true,
|
||||
"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": ["--bins"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.rulers": [100],
|
||||
"rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat",
|
||||
"rust-analyzer.cargo.features": ["bsp_rpi3"],
|
||||
"rust-analyzer.checkOnSave.overrideCommand": ["make", "check"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
"editor.formatOnSave": true,
|
||||
"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": ["--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
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.rulers": [100],
|
||||
"rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat",
|
||||
"rust-analyzer.cargo.features": ["bsp_rpi3"],
|
||||
"rust-analyzer.checkOnSave.overrideCommand": ["make", "check"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
"editor.formatOnSave": true,
|
||||
"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": ["--bins"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
}
|
||||
|
@ -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
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.rulers": [100],
|
||||
"rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat",
|
||||
"rust-analyzer.cargo.features": ["bsp_rpi3"],
|
||||
"rust-analyzer.checkOnSave.overrideCommand": ["make", "check"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
"editor.formatOnSave": true,
|
||||
"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": ["--bins"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
}
|
||||
|
@ -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
|
||||
}
|
@ -1,9 +1,10 @@
|
||||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.rulers": [100],
|
||||
"rust-analyzer.cargo.target": "aarch64-unknown-none-softfloat",
|
||||
"rust-analyzer.cargo.features": ["bsp_rpi3"],
|
||||
"rust-analyzer.checkOnSave.overrideCommand": ["make", "check"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
"editor.formatOnSave": true,
|
||||
"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": ["--bins"],
|
||||
"rust-analyzer.lens.debug": false,
|
||||
"rust-analyzer.lens.run": false
|
||||
}
|
||||
|
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