Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
toki
build-systems
yocto
meta-toki
Commits
7d8cbefb
Commit
7d8cbefb
authored
Jan 28, 2020
by
Oliver Horst
Browse files
[chg] Made xilinx-bootbin target working
parent
cdc3460e
Changes
6
Hide whitespace changes
Inline
Side-by-side
classes/toki-image.bbclass
deleted
100644 → 0
View file @
cdc3460e
DEPENDS += "${EXTRA_IMAGEDEPENDS}"
inherit deploy qemuboot
BINARY_NAME ?= "${PN}.elf"
do_deploy () {
install -d "${DEPLOYDIR}"
install -m 644 "${B}/${BINARY_NAME}" "${DEPLOYDIR}/${PN}.elf"
}
addtask do_deploy after do_install before do_build
QB_DEFAULT_KERNEL = "none"
QB_DEFAULT_FSTYPE = "none"
QB_ROOTFS = "none"
QB_DTB = ""
QB_NET = "none"
QB_NETWORK_DEVICE = ""
QB_OPT_APPEND = "-device loader,file=${DEPLOY_DIR_IMAGE}/toki-init.elf,cpu-num=0 -nographic"
fakeroot python do_rootfs () {
}
do_rootfs[dirs] = "${TOPDIR}"
do_rootfs[cleandirs] += "${IMGDEPLOYDIR}"
do_rootfs[umask] = "022"
addtask rootfs before do_build after do_deploy
fakeroot python do_image () {
}
do_image[dirs] = "${TOPDIR}"
do_image[umask] = "022"
addtask do_image after do_rootfs before do_build
fakeroot python do_image_complete () {
}
do_image_complete[dirs] = "${TOPDIR}"
do_image_complete[umask] = "022"
SSTATETASKS += "do_image_complete"
SSTATE_SKIP_CREATION_task-image-complete = '1'
do_image_complete[sstate-inputdirs] = "${IMGDEPLOYDIR}"
do_image_complete[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
do_image_complete[stamp-extra-info] = "${MACHINE}"
addtask do_image_complete after do_image before do_build
conf/distro/include/toki_config_parser.inc
View file @
7d8cbefb
...
...
@@ -50,7 +50,7 @@ def get_toki_hw_image(d):
path
=
config
[
"hw-image"
]
if
not
os
.
path
.
isabs
(
path
)
:
path
=
os
.
path
.
join
(
os
.
get
env
(
'TOKI_SRC_DIR'
,
os
.
curdir
),
path
)
path
=
os
.
path
.
join
(
d
.
get
Var
(
'TOKI_SRC_DIR'
,
True
),
path
)
return
path
...
...
conf/distro/toki.conf
View file @
7d8cbefb
...
...
@@ -40,7 +40,7 @@ DISTRO_EXTRA_RRECOMMENDS += " ${TOKI_DEFAULT_EXTRA_RRECOMMENDS}"
TCLIBCAPPEND
=
""
QEMU_TARGETS
?=
"aarch64"
QEMU_TARGETS
?=
"aarch64
arm microblaze microblazeel
"
PREMIRRORS
??=
"
\
bzr
://.*/.*
http
://
downloads
.
yoctoproject
.
org
/
mirror
/
sources
/ \
n
\
...
...
@@ -67,6 +67,7 @@ SANITY_TESTED_DISTROS ?= " \
ubuntu
-
16
.
04
\
n
\
ubuntu
-
16
.
10
\
n
\
ubuntu
-
17
.
04
\
n
\
ubuntu
-
18
.
04
\
n
\
fedora
-
26
\
n
\
centos
-
7
\
n
\
debian
-
9
\
n
\
...
...
recipes-core/
amp/amp-image
.bb
→
recipes-core/
toki/toki-amp-instance_git
.bb
View file @
7d8cbefb
require recipes-core/toki/toki-init_git.bb
python() {
# generate a bit-mask from the list of slave cores
slave_cores = d.getVar("TOKI_SLAVE_CORES", True)
...
...
@@ -10,3 +8,5 @@ python() {
TARGET_LDFLAGS += "-Wl,--defsym,_AMP_USE_CORE=${TOKI_AMP_CORE} \
-Wl,--defsym,__AMP_SLAVE_MASK=${TOKI_SLAVE_MASK} \
-Wl,--defsym,__AMP_NUM_CORES=${@get_toki_num_cores(d)}"
require toki-init_git.inc
recipes-core/
amp/
amp-master.bb
→
recipes-core/
toki/toki-
amp-master.bb
View file @
7d8cbefb
...
...
@@ -6,8 +6,8 @@ python() {
master_core = d.getVar("TOKI_MASTER_CORE", True)
enabled_cores.add(master_core)
mc_template = "mc:amp-c
0
:amp-c{}:
amp-imag
e:do_build"
mc_depends_str = ' '.join(mc_template.format(core) for core in enabled_cores)
mc_template = "mc:amp-c
{}
:amp-c{}:
toki-amp-instanc
e:do_build"
mc_depends_str = ' '.join(mc_template.format(
master_core,
core) for core in enabled_cores)
d.setVarFlag('do_compile', 'mcdepends', mc_depends_str)
}
...
...
@@ -19,26 +19,25 @@ python() {
do_compile() {
# get ALL (master+slave) images from the deploy directories
for i in ${TOKI_MASTER_CORE} ${TOKI_SLAVE_CORES}; do
i
mage
=$(find ${TOPDIR}/tmp/multiconfigs/amp-c${i}/
deploy -name amp-image
.elf)
cp $i
mage ${B}/amp-imag
e-${i}.elf
i
nstance_binary
=$(find ${TOPDIR}/tmp/multiconfigs/amp-c${i}/
work/*/toki-amp-instance/*/image/ -name init
.elf)
cp $i
nstance_binary ${B}/toki-amp-instanc
e-${i}.elf
done
for i in ${TOKI_SLAVE_CORES}; do
# prefix symbols i images
${OBJCOPY} --prefix-symbols=core_${i}_
amp-imag
e-${i}.elf
${OBJCOPY} --prefix-symbols=core_${i}_
toki-amp-instanc
e-${i}.elf
# remove ELF headers
${OBJCOPY} -O binary -R .comment
amp-image-${i}.elf amp-imag
e-${i}
${OBJCOPY} -O binary -R .comment
toki-amp-instance-${i}.elf toki-amp-instanc
e-${i}
# copy shrinked image files into the corresponding section of the master image
${OBJCOPY} --update-section .core_${i}_bin=
amp-image-${i} amp-imag
e-${TOKI_MASTER_CORE}.elf
${OBJCOPY} --update-section .core_${i}_bin=
toki-amp-instance-${i} toki-amp-instanc
e-${TOKI_MASTER_CORE}.elf
done
}
addtask do_compile before do_deploy
do_deploy() {
cp ${B}/
amp-imag
e-${TOKI_MASTER_CORE}.elf ${DEPLOY_DIR_IMAGE}/amp-master.elf
cp ${B}/
toki-amp-instanc
e-${TOKI_MASTER_CORE}.elf ${DEPLOY_DIR_IMAGE}/
toki-
amp-master.elf
}
addtask do_deploy after do_compile before do_build
...
...
recipes-core/toki/toki-init_git.
bb
→
recipes-core/toki/toki-init_git.
inc
View file @
7d8cbefb
...
...
@@ -7,9 +7,7 @@ EXTERNALSRC = "${@relative_externalsrc(d, "init")}"
DEPENDS
=
"freertos ldscript app-list"
BINARY_NAME = "init.elf"
inherit cmake toki-image
inherit
cmake
TARGET_CFLAGS
+=
"-nostdlib"
TARGET_LDFLAGS
+=
"-nostdlib"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment