]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: dragonboard820c: use LINUX_KERNEL_IMAGE_HEADER
authorCaleb Connolly <caleb.connolly@linaro.org>
Mon, 26 Feb 2024 17:26:23 +0000 (17:26 +0000)
committerCaleb Connolly <caleb.connolly@linaro.org>
Fri, 1 Mar 2024 14:44:37 +0000 (14:44 +0000)
db820c predated support for prepending the kernel image header
automatically, drop it's custom linker script and head.S in favour of
this generic support.

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Sumit Garg <sumit.garg@linaro.org> #qcs404
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
arch/arm/mach-snapdragon/Kconfig
board/qualcomm/dragonboard820c/Makefile
board/qualcomm/dragonboard820c/head.S [deleted file]
board/qualcomm/dragonboard820c/u-boot.lds [deleted file]

index ad667108191024db5b616a03cb1d503e4165d6ab..f897c393464f1f0958273ba8119a52368dc1bd65 100644 (file)
@@ -45,6 +45,7 @@ config TARGET_DRAGONBOARD410C
 
 config TARGET_DRAGONBOARD820C
        bool "96Boards Dragonboard 820C"
+       select LINUX_KERNEL_IMAGE_HEADER
        imply CLK_QCOM_APQ8096
        imply PINCTRL_QCOM_APQ8096
        imply BUTTON_QCOM_PMIC
index 643311f5b3bac3be894c96429985f4ec5c44f9a9..2ae6d16364aa4ff4fb049f940192f36c0e812b3d 100644 (file)
@@ -3,4 +3,3 @@
 # (C) Copyright 2017 Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@gmail.com>
 
 obj-y  := dragonboard820c.o
-extra-y += head.o
diff --git a/board/qualcomm/dragonboard820c/head.S b/board/qualcomm/dragonboard820c/head.S
deleted file mode 100644 (file)
index b052a85..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * ARM64 header for proper chain-loading with Little Kernel.
- *
- * Little Kernel shipped with Dragonboard820C boots standard Linux images for
- * ARM64. This file adds header that is required to boot U-Boot properly.
- *
- * For details see:
- * https://www.kernel.org/doc/Documentation/arm64/booting.txt
- *
- * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
- */
-
-#include <config.h>
-
-/*
- *   per document in linux/Doc/arm64/booting.text
- */
-.global _arm64_header
-_arm64_header:
-       b _start
-       .word 0
-       .quad   CONFIG_TEXT_BASE-PHYS_SDRAM_1 /* Image load offset, LE */
-       .quad   0    /* Effective size of kernel image, little-endian */
-       .quad   0    /* kernel flags, little-endian */
-       .quad   0    /* reserved */
-       .quad   0    /* reserved */
-       .quad   0    /* reserved */
-       .byte   0x41 /* Magic number, "ARM\x64" */
-       .byte   0x52
-       .byte   0x4d
-       .byte   0x64
-       .word   0    /* reserved (used for PE COFF offset) */
diff --git a/board/qualcomm/dragonboard820c/u-boot.lds b/board/qualcomm/dragonboard820c/u-boot.lds
deleted file mode 100644 (file)
index 5251b59..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Override linker script for fastboot-readable images
- *
- * (C) Copyright 2015 Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
- *
- * Based on arch/arm/cpu/armv8/u-boot.lds (Just add header)
- */
-
-OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
-OUTPUT_ARCH(aarch64)
-ENTRY(_arm64_header)
-SECTIONS
-{
-       . = 0x00000000;
-
-       . = ALIGN(8);
-       .text :
-       {
-               *(.__image_copy_start)
-               board/qualcomm/dragonboard820c/head.o (.text*)
-               CPUDIR/start.o (.text*)
-       }
-
-       /* This needs to come before *(.text*) */
-       .efi_runtime : {
-                __efi_runtime_start = .;
-               *(.text.efi_runtime*)
-               *(.rodata.efi_runtime*)
-               *(.data.efi_runtime*)
-                __efi_runtime_stop = .;
-       }
-
-       .text_rest :
-       {
-               *(.text*)
-       }
-
-       . = ALIGN(8);
-       .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
-
-       . = ALIGN(8);
-       .data : {
-               *(.data*)
-       }
-
-       . = ALIGN(8);
-
-       . = .;
-
-       . = ALIGN(8);
-       __u_boot_list : {
-               KEEP(*(SORT(__u_boot_list*)));
-       }
-
-       . = ALIGN(8);
-
-       .efi_runtime_rel : {
-                __efi_runtime_rel_start = .;
-               *(.rel*.efi_runtime)
-               *(.rel*.efi_runtime.*)
-                __efi_runtime_rel_stop = .;
-       }
-
-       . = ALIGN(8);
-
-       .image_copy_end :
-       {
-               *(.__image_copy_end)
-       }
-
-       . = ALIGN(8);
-
-       .rel_dyn_start :
-       {
-               *(.__rel_dyn_start)
-       }
-
-       .rela.dyn : {
-               *(.rela*)
-       }
-
-       .rel_dyn_end :
-       {
-               *(.__rel_dyn_end)
-       }
-
-       _end = .;
-
-       . = ALIGN(8);
-
-       .bss_start : {
-               KEEP(*(.__bss_start));
-       }
-
-       .bss : {
-               *(.bss*)
-                . = ALIGN(8);
-       }
-
-       .bss_end : {
-               KEEP(*(.__bss_end));
-       }
-
-       /DISCARD/ : { *(.dynsym) }
-       /DISCARD/ : { *(.dynstr*) }
-       /DISCARD/ : { *(.dynamic*) }
-       /DISCARD/ : { *(.plt*) }
-       /DISCARD/ : { *(.interp*) }
-       /DISCARD/ : { *(.gnu*) }
-}