Skip to content

Commit

Permalink
Help opkg with recipes that have COMPATIBLE_MACHINE
Browse files Browse the repository at this point in the history
There's a problem in OE's opkg and that's when you use COMPATIBLE_MACHINE on a bb file, BitBake won't allow that recipe to be builded for anything other than what you wrote in COMPATIBLE_MACHINE but the builded ipk file could be installed later via opkg as it has the compatible architecture with some machines.

The only way to bypass this is you use MACHINE_ARCH on any bb file that has COMPATIBLE_MACHINE so opkg won't install it later but this is a quick fix and results in more compiling time and more feed size but if we use common ipk files we could reduce them all.

For example we have 'machine1', 'machine2' and 'machine3' also in the bb file we have:

COMPATIBLE_MACHINE = '^(machine1|machine2|machine3)$'

So BitBake will compile this for the 3 machines but later it could be installed via opkg for other machines too if they have the compatible architecture unless you use MACHINE_ARCH and compile a common packge for each of those 3 machines individually.

If we could have a new field in control file of ipk files called 'Machine' and list those compatible machine opkg could check for:

Machine: machine1, machine2, machine3

In the control file and do not install it for the rest.

We need a new abiltiy in opkg!
  • Loading branch information
persianpros committed Oct 17, 2021
1 parent 0e6d405 commit fc34f99
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions recipes-bsp/drivers/sh4-dvb-modules.bb
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ inherit module machine_kernel_pr gitpkgv

PACKAGES = "${PN} ${PN}-dev"

PV = "${KV}+git${SRCPV}-${MACHINE}"
PV = "${KV}+git${SRCPV}"
PKGV = "git${GITPKGV}"

PTI_NP_PATH ?= "/data/pti_np"

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

SRC_URI = "\
git://git@github.com/OpenVisionE2/sh4-driver.git;protocol=ssh \
git://github.com/OpenVisionE2/sh4-driver.git;protocol=git \
file://modules.conf \
file://modules-conf.conf \
"
Expand Down
4 changes: 3 additions & 1 deletion recipes-bsp/extra/flash-tools_1.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SRC_URI = "file://fw_env.config \
file://flash_erase \
"

FILES_${PN} = "${localstatedir}/* /bin/* /sbin/*"
FILES_${PN} = "${localstatedir}/* ${base_bindir}/* ${base_sbindir}/*"

do_install () {
install -d ${D}${localstatedir}
Expand All @@ -22,3 +22,5 @@ do_install () {
install -d ${D}${base_sbindir}
install -m 755 ${WORKDIR}/flash_erase ${D}${base_sbindir}/
}

PACKAGE_ARCH = "${MACHINE_ARCH}"
1 change: 1 addition & 0 deletions recipes-bsp/extra/mount-sh4_1.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ INITSCRIPT_PARAMS = "start 39 S ."

inherit update-rc.d

PACKAGE_ARCH = "${MACHINE_ARCH}"
2 changes: 2 additions & 0 deletions recipes-bsp/extra/stslave-fw_0.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ do_install () {
install -m 644 ${WORKDIR}/${VIDEOELF} ${D}/boot/video.elf
fi
}

PACKAGE_ARCH = "${MACHINE_ARCH}"
1 change: 0 additions & 1 deletion recipes-bsp/sh4-apps/libmme-host_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ require sh4-apps.inc

FILES_${PN} += "${libdir}/libmme_host.so"
FILES_${PN}-dev = "${libdir}/libmme_host.la"

2 changes: 0 additions & 2 deletions recipes-bsp/sh4-apps/libmme-image_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ do_install_append () {

FILES_${PN} += "${libdir}/libmmeimage.so"
FILES_${PN}-dev += "${includedir}/mmeimage ${includedir}/libmmeimage ${libdir}/libmmeimage.la"


1 change: 0 additions & 1 deletion recipes-bsp/sh4-apps/libstgles_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ CFLAGS_append = " -I${STAGING_INCDIR}/directfb -I${WORKDIR}/git/libs/libstgles/i
PROVIDES = "virtual/libgles1 virtual/egl"

S = "${WORKDIR}/git/libs/libstgles"

2 changes: 1 addition & 1 deletion recipes-bsp/sh4-apps/sh4-apps.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SRCREV = "${AUTOREV}"
PV = "git${SRCPV}"
PKGV = "git${GITPKGV}"

SRC_URI = "git://git@github.com/OpenVisionE2/sh4-apps.git;protocol=ssh"
SRC_URI = "git://github.com/OpenVisionE2/sh4-apps.git;protocol=git"

S = "${WORKDIR}/git/tools/${@d.getVar('PN',1).replace('-', '_')}"

Expand Down
2 changes: 1 addition & 1 deletion recipes-bsp/sh4-native-tools/sh4-native-tools.inc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SRCREV = "${AUTOREV}"
PV = "git${SRCPV}"
PKGV = "git${GITPKGV}"

SRC_URI = "git://git@github.com/OpenVisionE2/sh4-native-tools.git;protocol=ssh"
SRC_URI = "git://github.com/OpenVisionE2/sh4-native-tools.git;protocol=git"

S = "${WORKDIR}/git/tools/${@d.getVar('PN',1).replace('-native', '')}"

Expand Down

0 comments on commit fc34f99

Please sign in to comment.