[rtems commit] build: Fix i386/pc386 with SMP enabled

Sebastian Huber sebh at rtems.org
Tue Sep 15 07:20:42 UTC 2020


Module:    rtems
Branch:    master
Commit:    127c3ea527658b140dac74d6b3ca72e3e9b19e12
Changeset: http://git.rtems.org/rtems/commit/?id=127c3ea527658b140dac74d6b3ca72e3e9b19e12

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Sep 15 09:16:13 2020 +0200

build: Fix i386/pc386 with SMP enabled

Update #3818.

---

 spec/build/bsps/i386/pc386/grp.yml         |  2 ++
 spec/build/bsps/i386/pc386/objsmp.yml      |  2 +-
 spec/build/bsps/i386/pc386/objsmpstart.yml | 49 ++++++++++++++++++++++++++++++
 spec/build/bsps/optobjcopy.yml             | 16 ++++++++++
 4 files changed, 68 insertions(+), 1 deletion(-)

diff --git a/spec/build/bsps/i386/pc386/grp.yml b/spec/build/bsps/i386/pc386/grp.yml
index 03aa8cf..1127fc2 100644
--- a/spec/build/bsps/i386/pc386/grp.yml
+++ b/spec/build/bsps/i386/pc386/grp.yml
@@ -20,6 +20,8 @@ links:
 - role: build-dependency
   uid: objsmp
 - role: build-dependency
+  uid: objsmpstart
+- role: build-dependency
   uid: objvga
 - role: build-dependency
   uid: optvberm
diff --git a/spec/build/bsps/i386/pc386/objsmp.yml b/spec/build/bsps/i386/pc386/objsmp.yml
index af882cb..9eaf97d 100644
--- a/spec/build/bsps/i386/pc386/objsmp.yml
+++ b/spec/build/bsps/i386/pc386/objsmp.yml
@@ -11,6 +11,6 @@ includes: []
 install: []
 links: []
 source:
-- bsps/i386/pc386/start/getcpuid.c
+- bsps/i386/pc386/start/bspsmp.c
 - bsps/i386/pc386/start/smp-imps.c
 type: build
diff --git a/spec/build/bsps/i386/pc386/objsmpstart.yml b/spec/build/bsps/i386/pc386/objsmpstart.yml
new file mode 100644
index 0000000..2c56d74
--- /dev/null
+++ b/spec/build/bsps/i386/pc386/objsmpstart.yml
@@ -0,0 +1,49 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+asflags: []
+build-type: script
+cflags: []
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+cppflags: []
+do-build: |
+  startAP = "bsps/i386/pc386/start/startAP"
+  startAP_o = startAP + ".o"
+  self.asm(bld, bic, startAP + ".S", startAP_o)
+  startAP_exe = startAP + ".exe"
+  ldflags = "-N -Ttext 0x70000 -e app_processor_start -nostdlib"
+  bld(
+      rule="${LD} " + ldflags + " -o ${TGT} -r ${SRC}",
+      source=startAP_o,
+      target=startAP_exe,
+  )
+  appstart_bin = "appstart.bin"
+  bld(
+      rule="${OBJCOPY} -O binary ${SRC} ${TGT}",
+      source=startAP_exe,
+      target=appstart_bin,
+  )
+  appstart_o = "appstart.o"
+  bld(
+      rule="${OBJCOPY} -I binary -O elf32-i386 -B i386 ${SRC} ${TGT}",
+      source=appstart_bin,
+      target=appstart_o,
+  )
+  bld.objects(
+      source=appstart_o,
+      target=self.uid,
+  )
+  bic.objects.append(self.uid)
+do-configure: null
+enabled-by:
+- RTEMS_SMP
+includes: []
+ldflags: []
+links:
+- role: build-dependency
+  uid: ../../optobjcopy
+prepare-build: null
+prepare-configure: null
+stlib: []
+type: build
+use-after: []
+use-before: []
diff --git a/spec/build/bsps/optobjcopy.yml b/spec/build/bsps/optobjcopy.yml
new file mode 100644
index 0000000..c1d1947
--- /dev/null
+++ b/spec/build/bsps/optobjcopy.yml
@@ -0,0 +1,16 @@
+SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
+actions:
+- set-value: ${ARCH}-rtems${__RTEMS_MAJOR__}-objcopy
+- substitute: null
+- find-program: null
+- env-assign: OBJCOPY
+build-type: option
+copyrights:
+- Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
+default: null
+default-by-variant: []
+description: ''
+enabled-by: true
+links: []
+name: OBJCOPY
+type: build



More information about the vc mailing list