From 69d9e5c33c0b9df454c67bd2709405ac2f1d9bc8 Mon Sep 17 00:00:00 2001 From: andy <1414772332@qq.com> Date: Sun, 3 Nov 2024 11:23:24 +0800 Subject: [PATCH] =?UTF-8?q?kunlun1=20=E6=B7=BB=E5=8A=A0=20sbl=5Fprintf=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sbl/Makefile | 8 +++++++- startup/ldscripts/riscv/link_flash_4m_sta.lds | 3 ++- startup/ldscripts/riscv/link_flash_cco.lds | 3 ++- startup/ldscripts/riscv/link_flash_sta.lds | 3 ++- startup/ldscripts/riscv/link_psram_2m_sta.lds | 3 ++- startup/ldscripts/riscv/link_psram_4m_cco.lds | 3 ++- startup/ldscripts/riscv/link_psram_4m_sta.lds | 3 ++- startup/ldscripts/riscv/link_psram_8m_cco.lds | 3 ++- startup/ldscripts/riscv/link_psram_8m_sta.lds | 3 ++- 9 files changed, 23 insertions(+), 9 deletions(-) diff --git a/sbl/Makefile b/sbl/Makefile index 18e741e..ca7f6bb 100644 --- a/sbl/Makefile +++ b/sbl/Makefile @@ -68,9 +68,15 @@ EXTRA_OPT_FLAG = -msave-restore DISABLE_BACKTRACE = 1 ##################################################### +# kunlun3 的sbl目录不同 +ifeq ($(target), kunlun3) +sbl_bin_path=plc/ +else +sbl_bin_path= +endif extra_work = echo handle sbl...;\ - $(TOPDIR)/tools/rom_img/make_ld.sh --addrs $(TOPDIR)/sbl/.output/plc/lib/kunlun_sbl.out \ + $(TOPDIR)/tools/rom_img/make_ld.sh --addrs $(TOPDIR)/sbl/.output/$(sbl_bin_path)lib/kunlun_sbl.out \ $(TOPDIR)/tools/rom_img/sbl_symbol > $(TOPDIR)/startup/ldscripts/riscv3/sbl.addrs.ld; diff --git a/startup/ldscripts/riscv/link_flash_4m_sta.lds b/startup/ldscripts/riscv/link_flash_4m_sta.lds index cf6f0ed..8e6e52e 100644 --- a/startup/ldscripts/riscv/link_flash_4m_sta.lds +++ b/startup/ldscripts/riscv/link_flash_4m_sta.lds @@ -177,4 +177,5 @@ SECTIONS } INCLUDE "sp_sta.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" diff --git a/startup/ldscripts/riscv/link_flash_cco.lds b/startup/ldscripts/riscv/link_flash_cco.lds index 6014b1b..9784909 100644 --- a/startup/ldscripts/riscv/link_flash_cco.lds +++ b/startup/ldscripts/riscv/link_flash_cco.lds @@ -178,4 +178,5 @@ SECTIONS } INCLUDE "sp_cco.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" diff --git a/startup/ldscripts/riscv/link_flash_sta.lds b/startup/ldscripts/riscv/link_flash_sta.lds index 33d9823..e0de63e 100644 --- a/startup/ldscripts/riscv/link_flash_sta.lds +++ b/startup/ldscripts/riscv/link_flash_sta.lds @@ -178,4 +178,5 @@ SECTIONS } INCLUDE "sp_sta.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" \ No newline at end of file diff --git a/startup/ldscripts/riscv/link_psram_2m_sta.lds b/startup/ldscripts/riscv/link_psram_2m_sta.lds index 6c7ec62..a9b2e5d 100755 --- a/startup/ldscripts/riscv/link_psram_2m_sta.lds +++ b/startup/ldscripts/riscv/link_psram_2m_sta.lds @@ -176,4 +176,5 @@ SECTIONS } INCLUDE "sp_sta.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" \ No newline at end of file diff --git a/startup/ldscripts/riscv/link_psram_4m_cco.lds b/startup/ldscripts/riscv/link_psram_4m_cco.lds index 6014b1b..420e704 100644 --- a/startup/ldscripts/riscv/link_psram_4m_cco.lds +++ b/startup/ldscripts/riscv/link_psram_4m_cco.lds @@ -178,4 +178,5 @@ SECTIONS } INCLUDE "sp_cco.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" \ No newline at end of file diff --git a/startup/ldscripts/riscv/link_psram_4m_sta.lds b/startup/ldscripts/riscv/link_psram_4m_sta.lds index 9970139..deb0631 100644 --- a/startup/ldscripts/riscv/link_psram_4m_sta.lds +++ b/startup/ldscripts/riscv/link_psram_4m_sta.lds @@ -176,4 +176,5 @@ SECTIONS } INCLUDE "sp_sta.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" \ No newline at end of file diff --git a/startup/ldscripts/riscv/link_psram_8m_cco.lds b/startup/ldscripts/riscv/link_psram_8m_cco.lds index abe544b..c85bfc5 100644 --- a/startup/ldscripts/riscv/link_psram_8m_cco.lds +++ b/startup/ldscripts/riscv/link_psram_8m_cco.lds @@ -178,4 +178,5 @@ SECTIONS } INCLUDE "sp_cco.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" \ No newline at end of file diff --git a/startup/ldscripts/riscv/link_psram_8m_sta.lds b/startup/ldscripts/riscv/link_psram_8m_sta.lds index ee80ffa..e0db7d1 100644 --- a/startup/ldscripts/riscv/link_psram_8m_sta.lds +++ b/startup/ldscripts/riscv/link_psram_8m_sta.lds @@ -176,4 +176,5 @@ SECTIONS } INCLUDE "sp_sta.addrs.ld" -INCLUDE "rom.addrs.ld" \ No newline at end of file +INCLUDE "rom.addrs.ld" +INCLUDE "sbl.addrs.ld" \ No newline at end of file