diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:26:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:26:09 +0000 |
commit | 39a0d9019076a29a57a38a817b1830aef0708c11 (patch) | |
tree | d839d866a9986b99e90cd600f6874fae2f712be9 /carl9170fw/minifw | |
parent | Initial commit. (diff) | |
download | firmware-nonfree-upstream.tar.xz firmware-nonfree-upstream.zip |
Adding upstream version 20230210.upstream/20230210upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | carl9170fw/minifw/CMakeLists.txt | 20 | ||||
-rw-r--r-- | carl9170fw/minifw/Kconfig | 3 | ||||
-rw-r--r-- | carl9170fw/minifw/miniboot.S | 7 | ||||
-rw-r--r-- | carl9170fw/minifw/miniboot.lds | 20 |
4 files changed, 50 insertions, 0 deletions
diff --git a/carl9170fw/minifw/CMakeLists.txt b/carl9170fw/minifw/CMakeLists.txt new file mode 100644 index 0000000..adf5e08 --- /dev/null +++ b/carl9170fw/minifw/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 2.8) + +project(miniboot.fw) + +include("../extra/sh-elf-linux.cmake") +include("../config.cmake") + +set(miniboot_src miniboot.S) +set_source_files_properties(miniboot.S PROPERTIES LANGUAGE C) + +add_executable(miniboot.elf miniboot.S) + +set_target_properties(miniboot.elf PROPERTIES LINKER_LANGUAGE C) + +set_target_properties(miniboot.elf PROPERTIES LINK_FLAGS "-Tminiboot.lds") + +add_custom_target( + miniboot.fw ALL + ${OBJCOPY} --strip-unneeded -O binary -R .sram -R .eeprom -R .fwdsc miniboot.elf miniboot.fw + DEPENDS miniboot.elf) diff --git a/carl9170fw/minifw/Kconfig b/carl9170fw/minifw/Kconfig new file mode 100644 index 0000000..f429bd2 --- /dev/null +++ b/carl9170fw/minifw/Kconfig @@ -0,0 +1,3 @@ +config CARL9170FW_BUILD_MINIBOOT + def_bool y + prompt "Build MiniBoot Firmware Header" diff --git a/carl9170fw/minifw/miniboot.S b/carl9170fw/minifw/miniboot.S new file mode 100644 index 0000000..e5d598e --- /dev/null +++ b/carl9170fw/minifw/miniboot.S @@ -0,0 +1,7 @@ + .globl _start + .type _start, @function + .section ".boot", "ax" + _start: + mov.l startcode, r0 + jmp @r0 +startcode: .long 0x00000008 diff --git a/carl9170fw/minifw/miniboot.lds b/carl9170fw/minifw/miniboot.lds new file mode 100644 index 0000000..51e5ac4 --- /dev/null +++ b/carl9170fw/minifw/miniboot.lds @@ -0,0 +1,20 @@ +ENTRY(_start); + +MEMORY +{ + pram : ORIGIN = 0x200000, LENGTH = 16k +} + +SECTIONS +{ + .padding : { + /* NOP NOP just in case */ + LONG(0x00090009) + } > pram + + .boot : { *(.boot) } > pram + .text : { *(.text*) } > pram + .rodata : { *(.rodata*) } > pram + .bss : { *(.bss) } > pram + .data : { *(.data*) } > pram +} |