diff options
Diffstat (limited to 'meta/recipes-bsp/opensbi')
-rw-r--r-- | meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch | 36 | ||||
-rw-r--r-- | meta/recipes-bsp/opensbi/opensbi-payloads.inc | 27 | ||||
-rw-r--r-- | meta/recipes-bsp/opensbi/opensbi_1.4.bb (renamed from meta/recipes-bsp/opensbi/opensbi_0.9.bb) | 23 |
3 files changed, 33 insertions, 53 deletions
diff --git a/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch b/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch deleted file mode 100644 index d2a8048e87..0000000000 --- a/meta/recipes-bsp/opensbi/files/0001-Makefile-Don-t-specify-mabi-or-march.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From fe9860fd85e49a75bef545e5d9914070491e8002 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Fri, 15 Feb 2019 14:57:41 -0800 | ||
4 | Subject: [PATCH] Makefile: Don't specify mabi or march | ||
5 | |||
6 | To avoid | ||
7 | can't link double-float modules with soft-float modules | ||
8 | errors when building 32-bit openSBI don't specify mabi or march. | ||
9 | |||
10 | Upstream-Status: Inappropriate [Fixes a 32-bit OE flow bug] | ||
11 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
12 | |||
13 | --- | ||
14 | Makefile | 2 -- | ||
15 | 1 file changed, 2 deletions(-) | ||
16 | |||
17 | diff --git a/Makefile b/Makefile | ||
18 | index ccf8ea3..69e5b38 100644 | ||
19 | --- a/Makefile | ||
20 | +++ b/Makefile | ||
21 | @@ -169,7 +169,6 @@ GENFLAGS += $(firmware-genflags-y) | ||
22 | CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-strict-aliasing -O2 | ||
23 | CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | ||
24 | CFLAGS += -mno-save-restore -mstrict-align | ||
25 | -CFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) | ||
26 | CFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL) | ||
27 | CFLAGS += $(GENFLAGS) | ||
28 | CFLAGS += $(platform-cflags-y) | ||
29 | @@ -183,7 +182,6 @@ CPPFLAGS += $(firmware-cppflags-y) | ||
30 | ASFLAGS = -g -Wall -nostdlib -D__ASSEMBLY__ | ||
31 | ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | ||
32 | ASFLAGS += -mno-save-restore -mstrict-align | ||
33 | -ASFLAGS += -mabi=$(PLATFORM_RISCV_ABI) -march=$(PLATFORM_RISCV_ISA) | ||
34 | ASFLAGS += -mcmodel=$(PLATFORM_RISCV_CODE_MODEL) | ||
35 | ASFLAGS += $(GENFLAGS) | ||
36 | ASFLAGS += $(platform-asflags-y) | ||
diff --git a/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/meta/recipes-bsp/opensbi/opensbi-payloads.inc index 2e32943245..a55679632e 100644 --- a/meta/recipes-bsp/opensbi/opensbi-payloads.inc +++ b/meta/recipes-bsp/opensbi/opensbi-payloads.inc | |||
@@ -1,21 +1,38 @@ | |||
1 | def riscv_get_extra_oemake_image(d): | 1 | def riscv_get_extra_oemake_image(d): |
2 | sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') | 2 | sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') |
3 | deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') | ||
4 | |||
5 | if sbi_payload is None: | 3 | if sbi_payload is None: |
6 | return "" | 4 | return "" |
7 | 5 | ||
6 | deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') | ||
7 | |||
8 | return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload | 8 | return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload |
9 | 9 | ||
10 | def riscv_get_do_compile_depends(d): | 10 | def riscv_get_extra_oemake_fdt(d): |
11 | sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') | 11 | if d.getVar('RISCV_SBI_PAYLOAD') is None: |
12 | return "" | ||
13 | sbi_fdt = d.getVar('RISCV_SBI_FDT') | ||
14 | deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') | ||
12 | 15 | ||
13 | if sbi_payload is None: | 16 | if sbi_fdt is None: |
17 | return "" | ||
18 | |||
19 | return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt | ||
20 | |||
21 | def riscv_get_do_compile_depends(d): | ||
22 | sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or "" | ||
23 | if sbi_payload == "": | ||
14 | return "" | 24 | return "" |
15 | 25 | ||
26 | sbi_fdt = d.getVar('RISCV_SBI_FDT') or "" | ||
27 | |||
28 | if sbi_fdt != "" and 'u-boot.bin' in sbi_payload: | ||
29 | return "virtual/kernel:do_deploy virtual/bootloader:do_deploy" | ||
30 | |||
16 | if 'linux' in sbi_payload or 'Image' in sbi_payload: | 31 | if 'linux' in sbi_payload or 'Image' in sbi_payload: |
17 | return "virtual/kernel:do_deploy" | 32 | return "virtual/kernel:do_deploy" |
18 | if 'u-boot.bin' in sbi_payload: | 33 | if 'u-boot.bin' in sbi_payload: |
19 | return "virtual/bootloader:do_deploy" | 34 | return "virtual/bootloader:do_deploy" |
35 | if sbi_fdt != "": | ||
36 | return "virtual/kernel:do_deploy" | ||
20 | 37 | ||
21 | return "" | 38 | return "" |
diff --git a/meta/recipes-bsp/opensbi/opensbi_0.9.bb b/meta/recipes-bsp/opensbi/opensbi_1.4.bb index cb1c3f2ebf..cf37a41176 100644 --- a/meta/recipes-bsp/opensbi/opensbi_0.9.bb +++ b/meta/recipes-bsp/opensbi/opensbi_1.4.bb | |||
@@ -8,21 +8,22 @@ require opensbi-payloads.inc | |||
8 | 8 | ||
9 | inherit autotools-brokensep deploy | 9 | inherit autotools-brokensep deploy |
10 | 10 | ||
11 | SRCREV = "234ed8e427f4d92903123199f6590d144e0d9351" | 11 | SRCREV = "a2b255b88918715173942f2c5e1f97ac9e90c877" |
12 | SRC_URI = "git://github.com/riscv/opensbi.git;branch=master \ | 12 | SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https" |
13 | file://0001-Makefile-Don-t-specify-mabi-or-march.patch \ | ||
14 | " | ||
15 | 13 | ||
16 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
17 | 15 | ||
18 | EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D}" | 16 | TARGET_CC_ARCH += "${LDFLAGS}" |
17 | |||
18 | EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=y CLANG_TARGET= " | ||
19 | # If RISCV_SBI_PAYLOAD is set then include it as a payload | 19 | # If RISCV_SBI_PAYLOAD is set then include it as a payload |
20 | EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}" | 20 | EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}" |
21 | EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}" | ||
21 | 22 | ||
22 | # Required if specifying a custom payload | 23 | # Required if specifying a custom payload |
23 | do_compile[depends] += "${@riscv_get_do_compile_depends(d)}" | 24 | do_compile[depends] += "${@riscv_get_do_compile_depends(d)}" |
24 | 25 | ||
25 | do_install_append() { | 26 | do_install:append() { |
26 | # In the future these might be required as a dependency for other packages. | 27 | # In the future these might be required as a dependency for other packages. |
27 | # At the moment just delete them to avoid warnings | 28 | # At the moment just delete them to avoid warnings |
28 | rm -r ${D}/include | 29 | rm -r ${D}/include |
@@ -38,11 +39,9 @@ do_deploy () { | |||
38 | 39 | ||
39 | addtask deploy before do_build after do_install | 40 | addtask deploy before do_build after do_install |
40 | 41 | ||
41 | FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*" | 42 | FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*" |
42 | FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*" | 43 | FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*" |
43 | FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*" | 44 | FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*" |
44 | 45 | ||
45 | COMPATIBLE_HOST = "(riscv64|riscv32).*" | 46 | COMPATIBLE_HOST = "(riscv64|riscv32).*" |
46 | INHIBIT_PACKAGE_STRIP = "1" | 47 | INHIBIT_PACKAGE_STRIP = "1" |
47 | |||
48 | SECURITY_CFLAGS = "" | ||