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