Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/build docker ref #40

Merged
merged 5 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ config KAS_LOCAL_PV_PVR_SDK
string
default "PVROOT_CONTAINERS_CORE += \"pv-pvr-sdk\"" if CONTAINER_PV_PVR_SDK

config CONTAINER_PV_ALPINE_DBUS
bool "pv-alpine-dbus"

config KAS_LOCAL_PV_ALPINE_DBUS
string
default "PVROOT_CONTAINERS_CORE += \"pv-alpine-dbus\"" if CONTAINER_PV_ALPINE_DBUS

config CONTAINER_PV_ALPINE_CONNMAN
bool "pv-alpine-connman"

Expand Down
18 changes: 12 additions & 6 deletions classes/pvrexport.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ PVR_SRC_URI ?= ""
PVR_DOCKER_REF ?= ""
PVR_APP_ADD_EXTRA_ARGS ?= ""

do_fetch_pvr[dirs] += "${PVR_CONFIG_DIR}"
do_fetch_pvr[cleandirs] += "${PVR_SRC_DIR} ${PVR_TMPDIR}"
do_fetch_pvr[dirs] += "${PVR_HOME_DIR}"
do_fetch_pvr[cleandirs] += "${PVR_CONFIG_DIR} ${PVR_SRC_DIR} ${PVR_TMPDIR}"
do_fetch_pvr[depends] += "pvr-native:do_populate_sysroot squashfs-tools-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot"
do_fetch_pvr[network] = "1"

Expand All @@ -42,7 +42,7 @@ fakeroot do_fetch_pvr() {
elif [ -n "${PVR_DOCKER_REF}" ]; then
echo "pvr app add from docker ${PVR_DOCKER_REF} with ${DOCKER_PLATFORM} as ${PVCONT_NAME}"
pvr init
pvr app add --platform="${DOCKER_PLATFORM}" --from="${PVR_DOCKER_REF}" ${PVR_APP_ADD_EXTRA_ARGS} "${PVCONT_NAME}"
pvr -d app add --platform="${DOCKER_PLATFORM}" --from="${PVR_DOCKER_REF}" ${PVR_APP_ADD_EXTRA_ARGS} "${PVCONT_NAME}"
pvr add .
pvr commit
fi
Expand Down Expand Up @@ -83,6 +83,8 @@ do_unpack_pvr() {

do_compile[dirs] += "${PVR_CONFIG_DIR} ${B}/pvrrepo"

PV_DBUS_PROVIDER ??= "${PVROOT_IMAGE_BSP}"

do_compile(){
export PVR_DISABLE_SELF_UPGRADE=true
export PVR_CONFIG_DIR="${PVR_CONFIG_DIR}"
Expand All @@ -98,14 +100,16 @@ do_compile(){
fi
if [ -f ${WORKDIR}/${BPN}.args.json ]; then
cat ${PVCONT_NAME}/src.json | jq --slurpfile args ${WORKDIR}/${BPN}.args.json \
'. * { "args" : $args[0] }' > ${PVCONT_NAME}/src.json.new
mv ${PVCONT_NAME}/src.json.new ${PVCONT_NAME}/src.json
'. * { "args" : $args[0] }' > ${PVCONT_NAME}/src.json.new
cat ${PVCONT_NAME}/src.json.new | sed 's/::PV_DBUS_PROVIDER::/${PV_DBUS_PROVIDER}/' > ${PVCONT_NAME}/src.json
rm -f ${PVCONT_NAME}/src.json.new
pvr app install ${PVCONT_NAME}
fi
if [ -f ${WORKDIR}/${BPN}.config.json ]; then
cat ${PVCONT_NAME}/src.json | jq --slurpfile config ${WORKDIR}/${BPN}.config.json \
'. * { "config" : $config[0] }' > ${PVCONT_NAME}/src.json.new
mv ${PVCONT_NAME}/src.json.new ${PVCONT_NAME}/src.json
cat ${PVCONT_NAME}/src.json.new | sed 's/::PV_DBUS_PROVIDER::/${PV_DBUS_PROVIDER}/' > ${PVCONT_NAME}/src.json
rm -f ${PVCONT_NAME}/src.json.new
pvr app install ${PVCONT_NAME}
fi
if [ -f "${WORKDIR}/pvs/key.default.pem" ]; then
Expand All @@ -123,6 +127,7 @@ do_compile(){
do_deploy[dirs] += "${PVR_CONFIG_DIR} ${B}/pvrrepo"

do_deploy(){
cd ${B}/pvrrepo
pvr export ${DEPLOYDIR}/${BPN}-${PV}.pvrexport.tgz
ln -fsr ${DEPLOYDIR}/${BPN}-${PV}.pvrexport.tgz ${DEPLOYDIR}/${BPN}.pvrexport.tgz
}
Expand All @@ -141,3 +146,4 @@ do_packagedata[noexec] = "1"
do_package_write_ipk[noexec] = "1"
do_package_write_deb[noexec] = "1"
do_package_write_rpm[noexec] = "1"

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"PV_VOLUME_IMPORTS": [
"core-image-minimal:/run/dbus:/run/dbus:rw"
"::PV_DBUS_PROVIDER:::/run/dbus:/run/dbus:rw"
]
}

4 changes: 3 additions & 1 deletion recipes-pv/pantavisor/pantavisor_019.bb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}_${PV}:"

S = "${WORKDIR}/git"

SRC_URI = "git://github.com/pantavisor/pantavisor.git;protocol=https;nobranch=1"
PANTAVISOR_BRANCH ??= "master"

SRC_URI = "git://github.com/pantavisor/pantavisor.git;protocol=https"
SRC_URI += " file://pantavisor-run"
SRC_URI += " file://rev0json"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ SRC_URI = " \
https://gitlab.com/api/v4/projects/pantacor%2Fpvr/packages/generic/pvr/${PV}/pvr.${PV}.vendor.tar.gz;name=vendor;subdir=src/${GO_IMPORT} \
"

SRC_URI[pvr.sha256sum] = "de3f8418101f419e4f913f8e94a400c8553ba0a0f864053df2f89fe787737270"
SRC_URI[vendor.sha256sum] = "35a8e085f7f8b3b88d3da0e5ea1f229b01ddf5e455e97cee209657d69e14dd1b"
SRC_URI[pvr.sha256sum] = "db044cfe220ee646c30b8dce51b2189f8a6a1e4393945238f21e918cbb4b3f46"
SRC_URI[vendor.sha256sum] = "31714ada0098727131b18bee122253521c9fb3cf2f097f60d3ddb53abdd3ec2f"

GO_IMPORT = "gitlab.com/pantacor/pvr"
export GO111MODULE="on"
Expand All @@ -28,6 +28,6 @@ do_unpack[cleandirs] += "${S}/src/${GO_IMPORT}"
relocate_source() {
cp -fr ${S}/pvr-*/* ${S}/src/${GO_IMPORT}
}
do_unpack[postfuncs] += "relocate_source"
do_patch[postfuncs] += "relocate_source"

BBCLASSEXTEND = "native nativesdk"