Skip to content
Snippets Groups Projects
Commit 95a4121b authored by Stefan Schmidt's avatar Stefan Schmidt
Browse files

Merge branch 'openharmony-tools-qemu' into 'kirkstone'

openharmony-tools: Add images and configuration to run qemuarma7

See merge request eclipse/oniro-oh/meta-openharmony!123
parents ec32359d 93499c6b
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
SUMMARY = "OpenHarmony development tools"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
require sanity-check.inc
......@@ -61,6 +62,28 @@ EOF
fi
}
do_populate_sdk[depends] += "${DEPENDS_QEMU_IMAGES}"
DEPENDS_QEMU_IMAGES = ""
DEPENDS_QEMU_IMAGES:qemuarma7 += "openharmony-standard-image:do_image_complete virtual/kernel:do_deploy"
addtask populate_sdk after do_unpack before do_build
SRC_URI:append:qemuarma7 = " file://post-relocate-setup.sh"
create_sdk_files:append:qemuarma7 () {
mkdir -p ${SDK_OUTPUT}${SDKPATH}/images/${MACHINE}
cp ${DEPLOY_DIR_IMAGE}/openharmony-standard-image-${MACHINE}.ext4 \
${DEPLOY_DIR_IMAGE}/zImage-${MACHINE}.bin \
${SDK_OUTPUT}${SDKPATH}/images/${MACHINE}/
cat ${DEPLOY_DIR_IMAGE}/openharmony-standard-image-${MACHINE}.qemuboot.conf | \
sed -e 's|^\(deploy_dir_image\) = .*|\1 = @SDKPATH@/images/${MACHINE}|' \
-e 's|^\(qb_default_kernel\) = .*|\1 = zImage-${MACHINE}.bin|' \
-e 's|^\(staging_bindir_native\) = .*|\1 = @SDKPATH@/sysroots/${SDK_SYS}/usr/bin|' \
-e 's|^\(staging_dir_host\) = .*|\1 = @SDKPATH@/sysroots/foobar|' \
-e 's|^\(staging_dir_native\) = .*|\1 = @SDKPATH@/sysroots/${SDK_SYS}|' \
-e 's|^\(uninative_loader\) = .*|\1 = @SDKPATH@/sysroots/${SDK_SYS}/lib/ld-linux-${SDK_ARCH}.so.2|' \
> ${SDK_OUTPUT}${SDKPATH}/images/${MACHINE}/openharmony-standard-image-${MACHINE}.qemuboot.conf
mkdir -p ${SDK_OUTPUT}${SDKPATHNATIVE}/post-relocate-setup.d
install -m 0755 ${WORKDIR}/post-relocate-setup.sh ${SDK_OUTPUT}${SDKPATH}/post-relocate-setup.sh
}
TOOLCHAIN_TARGET_TASK:append:df-acts = " openharmony-standard-acts"
create_sdk_files:append:df-acts () {
pwd
......
#! /bin/sh
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
echo -n "Fixing qemuboot.conf files..."
sdkpath="${1:?}"
sdkpath_build="${2:?}"
for f in $sdkpath/images/*/*qemuboot.conf ; do
sed -i $f -e "s|@SDKPATH@|$sdkpath|"
done
echo "done"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment