[OE-core] [PATCH] linux-yocto: introduce KMETABRANCH

2024-03-18 Thread Ming Liu
From: Ming Liu 

If I want to try a different branch of linux-yocto in a bbappend, that
could be easily done by setting KBRANCH, but there is not such a way to
do the same for kernel meta.

Introduce a variable KMETABRANCH to satisfy that.

Signed-off-by: Ming Liu 
---
 meta/recipes-kernel/linux/linux-yocto_6.6.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto_6.6.bb 
b/meta/recipes-kernel/linux/linux-yocto_6.6.bb
index 0f62dea29a..381e20461f 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.6.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.6.bb
@@ -39,9 +39,10 @@ BBCLASSEXTEND = "devupstream:target"
 SRCREV_machine:class-devupstream ?= "9b4a8eac17f0d840729384618b4b1e876233026c"
 PN:class-devupstream = "linux-yocto-upstream"
 KBRANCH:class-devupstream = "v6.6/base"
+KMETABRANCH ?= "yocto-6.6"
 
 SRC_URI = 
"git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH};protocol=https
 \
-   
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-6.6;destsuffix=${KMETA};protocol=https"
+   
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETABRANCH};destsuffix=${KMETA};protocol=https"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
 LINUX_VERSION ?= "6.6.20"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#197295): 
https://lists.openembedded.org/g/openembedded-core/message/197295
Mute This Topic: https://lists.openembedded.org/mt/104998899/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2] qemu.bbclass: fix a python TypeError

2024-01-07 Thread Ming Liu
From: Ming Liu 

QEMU_OPTIONS can be empty which will trigger a exception TypeError:
| can only concatenate str (not "NoneType") to str. Fix it by setting a
empty string.

ALso removed two useless blanks.

Signed-off-by: Ming Liu 
---
 meta/classes-recipe/qemu.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/qemu.bbclass b/meta/classes-recipe/qemu.bbclass
index 874b15127c..dbb5ee0b66 100644
--- a/meta/classes-recipe/qemu.bbclass
+++ b/meta/classes-recipe/qemu.bbclass
@@ -34,7 +34,7 @@ def qemu_wrapper_cmdline(data, rootfs_path, library_paths):
 if qemu_binary == "qemu-allarch":
 qemu_binary = "qemuwrapper"
 
-qemu_options = data.getVar("QEMU_OPTIONS")
+qemu_options = data.getVar("QEMU_OPTIONS") or ""
 
 return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + 
rootfs_path\
 + " -E LD_LIBRARY_PATH=" + ":".join(library_paths) + " "
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193383): 
https://lists.openembedded.org/g/openembedded-core/message/193383
Mute This Topic: https://lists.openembedded.org/mt/103575906/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] qemu.bbclass: fix a python TypeError

2024-01-06 Thread Ming Liu
From: Ming Liu 

QEMU_OPTIONS can be empty which will trigger a exception TypeError:
| can only concatenate str (not "NoneType") to str

fix it by setting a empty string.

Signed-off-by: Ming Liu 
---
 meta/classes-recipe/qemu.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes-recipe/qemu.bbclass b/meta/classes-recipe/qemu.bbclass
index 874b15127c..e556a3189e 100644
--- a/meta/classes-recipe/qemu.bbclass
+++ b/meta/classes-recipe/qemu.bbclass
@@ -34,7 +34,7 @@ def qemu_wrapper_cmdline(data, rootfs_path, library_paths):
 if qemu_binary == "qemu-allarch":
 qemu_binary = "qemuwrapper"
 
-qemu_options = data.getVar("QEMU_OPTIONS")
+qemu_options = data.getVar("QEMU_OPTIONS") or "" 
 
 return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + 
rootfs_path\
 + " -E LD_LIBRARY_PATH=" + ":".join(library_paths) + " "
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193382): 
https://lists.openembedded.org/g/openembedded-core/message/193382
Mute This Topic: https://lists.openembedded.org/mt/103569914/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] grub: fs/fat: Don't error when mtime is 0

2024-01-04 Thread Ming Liu
Hi, Alexandre:

Sorry, my bad, will resend it.

//Ming Liu

Alexandre Belloni  於 2024年1月4日 週四 上午10:49寫道:

> Hello,
>
> Your patch has a declared charset of 'y' which is not a thing and git am
> fails with:
>
> error: cannot convert from y to UTF-8
> fatal: could not parse patch
>
> You got the following prompt:
>
> The following files are 8bit, but do not declare a
> Content-Transfer-Encoding.
> something.patch
> Which 8bit encoding should I declare [UTF-8]?
>
> At that point, you pressed y but you should simply press enter. Please
> resend.
>
>
> On 03/01/2024 13:30:52+0100, Ming Liu wrote:
> > From: Ming Liu 
> >
> > A issue was found when I run "runqemu genericx86-64 ovmf", grub failed
> > to boot, it's a known issue has been fixed in grub upstream, backport
> > the fix.
> >
> > Signed-off-by: Ming Liu 
> > ---
> >  ...1-fs-fat-Don-t-error-when-mtime-is-0.patch | 70 +++
> >  meta/recipes-bsp/grub/grub2.inc   |  1 +
> >  2 files changed, 71 insertions(+)
> >  create mode 100644
> meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch
> >
> > diff --git
> a/meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch
> b/meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch
> > new file mode 100644
> > index 00..a5fbd58f46
> > --- /dev/null
> > +++
> b/meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch
> > @@ -0,0 +1,70 @@
> > +From e43f3d93b28cce852c110c7a8e40d8311bcd8bb1 Mon Sep 17 00:00:00 2001
> > +From: Robbie Harwood 
> > +Date: Fri, 15 Jul 2022 16:13:02 -0400
> > +Subject: [PATCH] fs/fat: Don't error when mtime is 0
> > +MIME-Version: 1.0
> > +Content-Type: text/plain; charset=UTF-8
> > +Content-Transfer-Encoding: 8bit
> > +
> > +In the wild, we occasionally see valid ESPs where some file modification
> > +times are 0. For instance:
> > +
> > +├── [Dec 31  1979]  EFI
> > +│   ├── [Dec 31  1979]  BOOT
> > +│   │   ├── [Dec 31  1979]  BOOTX64.EFI
> > +│   │   └── [Dec 31  1979]  fbx64.efi
> > +│   └── [Jun 27 02:41]  fedora
> > +│   ├── [Dec 31  1979]  BOOTX64.CSV
> > +│   ├── [Dec 31  1979]  fonts
> > +│   ├── [Mar 14 03:35]  fw
> > +│   │   ├── [Mar 14 03:35]
> fwupd-359c1169-abd6-4a0d-8bce-e4d4713335c1.cap
> > +│   │   ├── [Mar 14 03:34]
> fwupd-9d255c4b-2d88-4861-860d-7ee52ade9463.cap
> > +│   │   └── [Mar 14 03:34]
> fwupd-b36438d8-9128-49d2-b280-487be02d948b.cap
> > +│   ├── [Dec 31  1979]  fwupdx64.efi
> > +│   ├── [May 10 10:47]  grub.cfg
> > +│   ├── [Jun  3 12:38]  grub.cfg.new.new
> > +│   ├── [May 10 10:41]  grub.cfg.old
> > +│   ├── [Jun 27 02:41]  grubenv
> > +│   ├── [Dec 31  1979]  grubx64.efi
> > +│   ├── [Dec 31  1979]  mmx64.efi
> > +│   ├── [Dec 31  1979]  shim.efi
> > +│   ├── [Dec 31  1979]  shimx64.efi
> > +│   └── [Dec 31  1979]  shimx64-fedora.efi
> > +└── [Dec 31  1979]  FSCK.REC
> > +
> > +5 directories, 17 files
> > +
> > +This causes grub-probe failure, which in turn causes grub-mkconfig
> > +failure. They are valid filesystems that appear intact, and the Linux
> > +FAT stack is able to mount and manipulate them without complaint.
> > +
> > +The check for mtime of 0 has been present since
> > +20def1a3c3952982395cd7c3ea7e78638527962b (fat: support file
> > +modification times).
> > +
> > +Upstream-Status: Backport [
> https://git.savannah.gnu.org/cgit/grub.git/commit/?id=e43f3d93b28cce852c110c7a8e40d8311bcd8bb1
> ]
> > +
> > +Signed-off-by: Robbie Harwood 
> > +Reviewed-by: Daniel Kiper 
> > +Signed-off-by: Ming Liu 
> > +---
> > + grub-core/fs/fat.c | 3 ---
> > + 1 file changed, 3 deletions(-)
> > +
> > +diff --git a/grub-core/fs/fat.c b/grub-core/fs/fat.c
> > +index 0951b2e63..c5efed724 100644
> > +--- a/grub-core/fs/fat.c
> >  b/grub-core/fs/fat.c
> > +@@ -1027,9 +1027,6 @@ grub_fat_dir (grub_device_t device, const char
> *path, grub_fs_dir_hook_t hook,
> > +   grub_le_to_cpu16
> (ctxt.dir.w_date),
> > +   );
> > + #endif
> > +-  if (info.mtimeset == 0)
> > +-grub_error (GRUB_ERR_OUT_OF_RANGE,
> > +-"invalid modification timestamp for %s", path);
> > +
> > +   if (hoo

[OE-core] [PATCH] grub: fs/fat: Don't error when mtime is 0

2024-01-03 Thread Ming Liu
From: Ming Liu 

A issue was found when I run "runqemu genericx86-64 ovmf", grub failed
to boot, it's a known issue has been fixed in grub upstream, backport
the fix.

Signed-off-by: Ming Liu 
---
 ...1-fs-fat-Don-t-error-when-mtime-is-0.patch | 70 +++
 meta/recipes-bsp/grub/grub2.inc   |  1 +
 2 files changed, 71 insertions(+)
 create mode 100644 
meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch

diff --git 
a/meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch 
b/meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch
new file mode 100644
index 00..a5fbd58f46
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch
@@ -0,0 +1,70 @@
+From e43f3d93b28cce852c110c7a8e40d8311bcd8bb1 Mon Sep 17 00:00:00 2001
+From: Robbie Harwood 
+Date: Fri, 15 Jul 2022 16:13:02 -0400
+Subject: [PATCH] fs/fat: Don't error when mtime is 0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In the wild, we occasionally see valid ESPs where some file modification
+times are 0. For instance:
+
+? [Dec 31  1979]  EFI
+???   ? [Dec 31  1979]  BOOT
+???   ???   ? [Dec 31  1979]  BOOTX64.EFI
+???   ???   ? [Dec 31  1979]  fbx64.efi
+???   ? [Jun 27 02:41]  fedora
+???   ? [Dec 31  1979]  BOOTX64.CSV
+???   ? [Dec 31  1979]  fonts
+???   ? [Mar 14 03:35]  fw
+???   ???   ? [Mar 14 03:35]  
fwupd-359c1169-abd6-4a0d-8bce-e4d4713335c1.cap
+???   ???   ? [Mar 14 03:34]  
fwupd-9d255c4b-2d88-4861-860d-7ee52ade9463.cap
+???   ???   ? [Mar 14 03:34]  
fwupd-b36438d8-9128-49d2-b280-487be02d948b.cap
+???   ? [Dec 31  1979]  fwupdx64.efi
+???   ? [May 10 10:47]  grub.cfg
+???   ? [Jun  3 12:38]  grub.cfg.new.new
+???   ? [May 10 10:41]  grub.cfg.old
+???   ? [Jun 27 02:41]  grubenv
+???   ? [Dec 31  1979]  grubx64.efi
+???   ? [Dec 31  1979]  mmx64.efi
+???   ? [Dec 31  1979]  shim.efi
+???   ? [Dec 31  1979]  shimx64.efi
+???   ? [Dec 31  1979]  shimx64-fedora.efi
+? [Dec 31  1979]  FSCK.REC
+
+5 directories, 17 files
+
+This causes grub-probe failure, which in turn causes grub-mkconfig
+failure. They are valid filesystems that appear intact, and the Linux
+FAT stack is able to mount and manipulate them without complaint.
+
+The check for mtime of 0 has been present since
+20def1a3c3952982395cd7c3ea7e78638527962b (fat: support file
+modification times).
+
+Upstream-Status: Backport 
[https://git.savannah.gnu.org/cgit/grub.git/commit/?id=e43f3d93b28cce852c110c7a8e40d8311bcd8bb1]
+
+Signed-off-by: Robbie Harwood 
+Reviewed-by: Daniel Kiper 
+Signed-off-by: Ming Liu 
+---
+ grub-core/fs/fat.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/grub-core/fs/fat.c b/grub-core/fs/fat.c
+index 0951b2e63..c5efed724 100644
+--- a/grub-core/fs/fat.c
 b/grub-core/fs/fat.c
+@@ -1027,9 +1027,6 @@ grub_fat_dir (grub_device_t device, const char *path, 
grub_fs_dir_hook_t hook,
+ grub_le_to_cpu16 (ctxt.dir.w_date),
+ );
+ #endif
+-  if (info.mtimeset == 0)
+-  grub_error (GRUB_ERR_OUT_OF_RANGE,
+-  "invalid modification timestamp for %s", path);
+ 
+   if (hook (ctxt.filename, , hook_data))
+   break;
+-- 
+2.34.1
+
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index f594e7d3a4..1215b24668 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -44,6 +44,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
file://0001-fs-ext2-Ignore-checksum-seed-incompat-feature.patch \
file://CVE-2023-4692.patch \
file://CVE-2023-4693.patch \
+   file://0001-fs-fat-Don-t-error-when-mtime-is-0.patch \
 "
 
 SRC_URI[sha256sum] = 
"23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f"
-- 
2.34.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193286): 
https://lists.openembedded.org/g/openembedded-core/message/193286
Mute This Topic: https://lists.openembedded.org/mt/103500707/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] meta: introduce KCONFIG_CONFIG_ENABLE_MENUCONFIG

2023-06-06 Thread Ming Liu
Hi, Dear maintainers:

Ping, could you please review this at your convenient time? It's blocking
our uboot do_menuconfig task.

the best,
thank you

 於 2023年5月13日 週六 下午6:05寫道:

> From: Ming Liu 
>
> Currently, uboot do_menuconfig task is breaking when UBOOT_CONFIG is
> chosen rather than UBOOT_MACHINE, it simply fails with the following
> errors:
> | make: *** No rule to make target 'menuconfig'. Stio.
> | Command failed.
> | Press any key to continue...
>
> this is due to the work directory of do_menuconfig is set to ${B} but
> not ${B}/$config.
>
> We should distinguish two situations:
> 1) When there is only one config item in UBOOT_CONFIG, do_menuconfig
>should work just like how it works for UBOOT_MACHINE.
> 2) When there are multiple config items in UBOOT_CONFIG, do_menuconfig
>should print out some information saying it's not supported other
>than just failing.
>
> This patch mainly aims to fix that by introducing a extra variable
> KCONFIG_CONFIG_ENABLE_MENUCONFIG, it would be set to 'false' for
> situation 2), and when it's set to 'true', then set
> KCONFIG_CONFIG_ROOTDIR correctly in uboot-config.bbclass to let
> do_menuconfig task work.
>
> DEVTOOL_DISABLE_MENUCONFIG could be replaced by this new variable
> KCONFIG_CONFIG_ENABLE_MENUCONFIG.
>
> Signed-off-by: Ming Liu 
> ---
>  meta/classes-recipe/cml1.bbclass | 5 +
>  meta/classes-recipe/uboot-config.bbclass | 6 ++
>  meta/recipes-bsp/u-boot/u-boot-configure.inc | 1 -
>  scripts/lib/devtool/standard.py  | 6 +++---
>  4 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes-recipe/cml1.bbclass
> b/meta/classes-recipe/cml1.bbclass
> index a09a042c3f..d87d8204e4 100644
> --- a/meta/classes-recipe/cml1.bbclass
> +++ b/meta/classes-recipe/cml1.bbclass
> @@ -32,10 +32,15 @@ CROSS_CURSES_INC = '-DCURSES_LOC=""'
>  TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
>
>  KCONFIG_CONFIG_COMMAND ??= "menuconfig"
> +KCONFIG_CONFIG_ENABLE_MENUCONFIG ??= "true"
>  KCONFIG_CONFIG_ROOTDIR ??= "${B}"
>  python do_menuconfig() {
>  import shutil
>
> +if not
> bb.utils.to_boolean(d.getVar("KCONFIG_CONFIG_ENABLE_MENUCONFIG")):
> +bb.fatal("do_menuconfig is disabled, please check
> KCONFIG_CONFIG_ENABLE_MENUCONFIG variable.")
> +return
> +
>  config = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config")
>  configorig = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'),
> ".config.orig")
>
> diff --git a/meta/classes-recipe/uboot-config.bbclass
> b/meta/classes-recipe/uboot-config.bbclass
> index fb7a4bc498..9be1d64d3e 100644
> --- a/meta/classes-recipe/uboot-config.bbclass
> +++ b/meta/classes-recipe/uboot-config.bbclass
> @@ -140,4 +140,10 @@ python () {
>
>  if not found:
>  raise bb.parse.SkipRecipe("The selected UBOOT_CONFIG key
> %s has no match in %s." % (ubootconfig, ubootconfigflags.keys()))
> +
> +if len(ubootconfig) == 1:
> +d.setVar('KCONFIG_CONFIG_ROOTDIR',
> os.path.join(d.getVar("B"), d.getVar("UBOOT_MACHINE").strip()))
> +else:
> +# Disable menuconfig for multiple configs
> +d.setVar('KCONFIG_CONFIG_ENABLE_MENUCONFIG', "false")
>  }
> diff --git a/meta/recipes-bsp/u-boot/u-boot-configure.inc
> b/meta/recipes-bsp/u-boot/u-boot-configure.inc
> index 04e0894752..235623d25a 100644
> --- a/meta/recipes-bsp/u-boot/u-boot-configure.inc
> +++ b/meta/recipes-bsp/u-boot/u-boot-configure.inc
> @@ -26,7 +26,6 @@ do_configure () {
>  unset j
>  done
>  unset i
> -DEVTOOL_DISABLE_MENUCONFIG=true
>  else
>  if [ -n "${UBOOT_MACHINE}" ]; then
>  oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
> diff --git a/scripts/lib/devtool/standard.py
> b/scripts/lib/devtool/standard.py
> index 0339d12763..852672810a 100644
> --- a/scripts/lib/devtool/standard.py
> +++ b/scripts/lib/devtool/standard.py
> @@ -968,9 +968,9 @@ def modify(args, config, basepath, workspace):
>  '}\n')
>  if rd.getVarFlag('do_menuconfig','task'):
>  f.write('\ndo_configure:append() {\n'
> -'if [ ! ${DEVTOOL_DISABLE_MENUCONFIG} ]; then\n'
> -'cp ${B}/.config ${S}/.config.baseline\n'
> -'ln -sfT ${B}/.config ${S}/.config.new\n'
> +'if [ ${@
> oe.types.boolean(\'${KCONFIG_CONFIG_ENABLE_MENUCONFIG}\') } = True ];
> then\n'
> +'   

[OE-core] [PATCH] weston-init: introduce xwayland PACKAGECONFIG

2023-06-06 Thread Ming Liu
From: Ming Liu 

Some BSPs dont support xwayland in weston, this is easier for them to
control that.

Signed-off-by: Ming Liu 
---
 meta/recipes-graphics/wayland/weston-init.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 77dda03cf5..a7adce7fda 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -14,10 +14,11 @@ SRC_URI = "file://init \
 
 S = "${WORKDIR}"
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xwayland', 
'', d)}"
 PACKAGECONFIG:append:qemuriscv64 = " use-pixman"
 PACKAGECONFIG:append:qemuppc64 = " use-pixman"
 
+PACKAGECONFIG[xwayland] = ",,"
 PACKAGECONFIG[no-idle-timeout] = ",,"
 PACKAGECONFIG[use-pixman] = ",,"
 
@@ -50,7 +51,7 @@ do_install() {
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-   if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'yes', 'no', d)}" 
= "yes" ]; then
+   if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', 
d)}" = "yes" ]; then
sed -i -e "/^\[core\]/a xwayland=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#182424): 
https://lists.openembedded.org/g/openembedded-core/message/182424
Mute This Topic: https://lists.openembedded.org/mt/99360767/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2] kernel.bbclass: introduce KERNEL_LOCALVERSION

2023-05-30 Thread Ming Liu
From: Ming Liu 

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION
to append a string to the name of the local version of the kernel
image.

Signed-off-by: Ming Liu 
---
 meta/classes-recipe/kernel.bbclass | 6 +-
 meta/conf/documentation.conf   | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index e634eabd49..0d357407d9 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -616,6 +616,7 @@ do_shared_workdir () {
 # We don't need to stage anything, not the modules/firmware since those would 
clash with linux-firmware
 SYSROOT_DIRS = ""
 
+KERNEL_LOCALVERSION ??= ""
 KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || 
oe_runmake -C ${S} O=${B} oldnoconfig"
 
 python check_oldest_kernel() {
@@ -637,7 +638,10 @@ kernel_do_configure() {
# $ scripts/setlocalversion . => +
# $ make kernelversion => 2.6.37
# $ make kernelrelease => 2.6.37+
-   touch ${B}/.scmversion ${S}/.scmversion
+   if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+   echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+   echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+   fi
 
if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f 
"${B}/.config" ]; then
mv "${S}/.config" "${B}/.config"
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index a27d7a53c3..66b8e2f24f 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for 
which the build system
 KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 
'kernel'."
 KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set 
to the value of the STAGING_KERNEL_DIR within the module class 
(module.bbclass)."
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to 
the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
+KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local version 
of the kernel image."
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration 
fragment. You use this variable in the .scc file that describes a configuration 
fragment file."
 KMACHINE[doc] = "The machine as known by the kernel."
 KTYPE[doc] = "Defines the kernel type to be used in assembling the 
configuration."
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181949): 
https://lists.openembedded.org/g/openembedded-core/message/181949
Mute This Topic: https://lists.openembedded.org/mt/99228164/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] kernel.bbclass: introduce KERNEL_LOCALVERSION

2023-05-30 Thread Ming Liu
Hi, Bruce:

OK, thanks for the explanation, that makes sense, will add them back in V2.

the best,
thank you

Bruce Ashfield  於 2023年5月30日 週二 下午10:09寫道:

> On Tue, May 30, 2023 at 3:58 PM Ming Liu  wrote:
> >
> > Hi, Bruce:
> >
> > Please see my answers as below:
> >
> > > You've confirmed that the result is the same as the touches previously
> did when that variable isn't set ?
> >
> > Yes, I have verified that on a qemuarm64 machine.
> >
> > > Those comments are still valid
> >
> > I think after we introduce KERNEL_LOCALVERSION, then we generate the
> .scmversion on purpose, not as a workaround or fix so those comments not
> valid any more?
> >
>
> They are definitely still valid.  The files need to exist, or the +
> gets added. Other layers and kernel recipes have been touching and
> using those files in their own way, the kernel.bbclass was just a
> default to ensure if they didn't handle it, that those noise wouldn't
> be generated.
>
> That variable is completely optional, so we are not always generating
> it on purpose. Also CONFIG_LOCALVERSION is used by linux-yocto and
> other recipes, so the default of empty to ensure that nothing is added
> by kbuild is the case, and also makes them valid.
>
> Bruce
>
>
> > the best,
> > thank you
> >
> >
> > Bruce Ashfield  於 2023年5月30日 週二 下午7:21寫道:
> >>
> >> On Tue, May 30, 2023 at 1:10 PM Ming Liu  wrote:
> >> >
> >> > From: Ming Liu 
> >> >
> >> > Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION
> >> > to append a string to the name of the local version of the kernel
> >> > image.
> >> >
> >> > Signed-off-by: Ming Liu 
> >> > ---
> >> >  meta/classes-recipe/kernel.bbclass | 10 +-
> >> >  meta/conf/documentation.conf   |  1 +
> >> >  2 files changed, 6 insertions(+), 5 deletions(-)
> >> >
> >> > diff --git a/meta/classes-recipe/kernel.bbclass
> b/meta/classes-recipe/kernel.bbclass
> >> > index e634eabd49..3dd139eda9 100644
> >> > --- a/meta/classes-recipe/kernel.bbclass
> >> > +++ b/meta/classes-recipe/kernel.bbclass
> >> > @@ -616,6 +616,7 @@ do_shared_workdir () {
> >> >  # We don't need to stage anything, not the modules/firmware since
> those would clash with linux-firmware
> >> >  SYSROOT_DIRS = ""
> >> >
> >> > +KERNEL_LOCALVERSION ??= ""
> >> >  KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B}
> olddefconfig || oe_runmake -C ${S} O=${B} oldnoconfig"
> >> >
> >> >  python check_oldest_kernel() {
> >> > @@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] +=
> "OLDEST_KERNEL KERNEL_VERSION"
> >> >  do_configure[prefuncs] += "check_oldest_kernel"
> >> >
> >> >  kernel_do_configure() {
> >> > -   # fixes extra + in /lib/modules/2.6.37+
> >> > -   # $ scripts/setlocalversion . => +
> >> > -   # $ make kernelversion => 2.6.37
> >> > -   # $ make kernelrelease => 2.6.37+
> >>
> >> Those comments are still valid.
> >>
> >> > -   touch ${B}/.scmversion ${S}/.scmversion
> >> > +   if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
> >> > +   echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
> >> > +   echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
> >> > +   fi
> >>
> >> You've confirmed that the result is the same as the touches previously
> >> did when that variable isn't set ?
> >>
> >> Bruce
> >>
> >> >
> >> > if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f
> "${B}/.config" ]; then
> >> > mv "${S}/.config" "${B}/.config"
> >> > diff --git a/meta/conf/documentation.conf
> b/meta/conf/documentation.conf
> >> > index a27d7a53c3..66b8e2f24f 100644
> >> > --- a/meta/conf/documentation.conf
> >> > +++ b/meta/conf/documentation.conf
> >> > @@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel
> modules for which the build system
> >> >  KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages.
> Defaults to 'kernel'."
> >> >  KERNEL_PATH[doc] = "The location of the kernel sources. This
> variab

Re: [OE-core] [PATCH] kernel.bbclass: introduce KERNEL_LOCALVERSION

2023-05-30 Thread Ming Liu
Hi, Bruce:

Please see my answers as below:

> You've confirmed that the result is the same as the touches previously
did when that variable isn't set ?

Yes, I have verified that on a qemuarm64 machine.

> Those comments are still valid

I think after we introduce KERNEL_LOCALVERSION, then we generate
the .scmversion on purpose, not as a workaround or fix so those comments
not valid any more?

the best,
thank you


Bruce Ashfield  於 2023年5月30日 週二 下午7:21寫道:

> On Tue, May 30, 2023 at 1:10 PM Ming Liu  wrote:
> >
> > From: Ming Liu 
> >
> > Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION
> > to append a string to the name of the local version of the kernel
> > image.
> >
> > Signed-off-by: Ming Liu 
> > ---
> >  meta/classes-recipe/kernel.bbclass | 10 +-
> >  meta/conf/documentation.conf   |  1 +
> >  2 files changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/meta/classes-recipe/kernel.bbclass
> b/meta/classes-recipe/kernel.bbclass
> > index e634eabd49..3dd139eda9 100644
> > --- a/meta/classes-recipe/kernel.bbclass
> > +++ b/meta/classes-recipe/kernel.bbclass
> > @@ -616,6 +616,7 @@ do_shared_workdir () {
> >  # We don't need to stage anything, not the modules/firmware since those
> would clash with linux-firmware
> >  SYSROOT_DIRS = ""
> >
> > +KERNEL_LOCALVERSION ??= ""
> >  KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig
> || oe_runmake -C ${S} O=${B} oldnoconfig"
> >
> >  python check_oldest_kernel() {
> > @@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] +=
> "OLDEST_KERNEL KERNEL_VERSION"
> >  do_configure[prefuncs] += "check_oldest_kernel"
> >
> >  kernel_do_configure() {
> > -   # fixes extra + in /lib/modules/2.6.37+
> > -   # $ scripts/setlocalversion . => +
> > -   # $ make kernelversion => 2.6.37
> > -   # $ make kernelrelease => 2.6.37+
>
> Those comments are still valid.
>
> > -   touch ${B}/.scmversion ${S}/.scmversion
> > +   if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
> > +   echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
> > +   echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
> > +   fi
>
> You've confirmed that the result is the same as the touches previously
> did when that variable isn't set ?
>
> Bruce
>
> >
> > if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f
> "${B}/.config" ]; then
> > mv "${S}/.config" "${B}/.config"
> > diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
> > index a27d7a53c3..66b8e2f24f 100644
> > --- a/meta/conf/documentation.conf
> > +++ b/meta/conf/documentation.conf
> > @@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules
> for which the build system
> >  KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults
> to 'kernel'."
> >  KERNEL_PATH[doc] = "The location of the kernel sources. This variable
> is set to the value of the STAGING_KERNEL_DIR within the module class
> (module.bbclass)."
> >  KERNEL_SRC[doc] = "The location of the kernel sources. This variable is
> set to the value of the STAGING_KERNEL_DIR within the module class
> (module.bbclass)."
> > +KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local
> version of the kernel image."
> >  KFEATURE_DESCRIPTION[doc] = "Provides a short description of a
> configuration fragment. You use this variable in the .scc file that
> describes a configuration fragment file."
> >  KMACHINE[doc] = "The machine as known by the kernel."
> >  KTYPE[doc] = "Defines the kernel type to be used in assembling the
> configuration."
> > --
> > 2.25.1
> >
> >
> > 
> >
>
>
> --
> - Thou shalt not follow the NULL pointer, for chaos and madness await
> thee at its end
> - "Use the force Harry" - Gandalf, Star Trek II
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181946): 
https://lists.openembedded.org/g/openembedded-core/message/181946
Mute This Topic: https://lists.openembedded.org/mt/99224358/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel.bbclass: introduce KERNEL_LOCALVERSION

2023-05-30 Thread Ming Liu
From: Ming Liu 

Just like UBOOT_LOCALVERSION, an end user can set KERNEL_LOCALVERSION
to append a string to the name of the local version of the kernel
image.

Signed-off-by: Ming Liu 
---
 meta/classes-recipe/kernel.bbclass | 10 +-
 meta/conf/documentation.conf   |  1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index e634eabd49..3dd139eda9 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -616,6 +616,7 @@ do_shared_workdir () {
 # We don't need to stage anything, not the modules/firmware since those would 
clash with linux-firmware
 SYSROOT_DIRS = ""
 
+KERNEL_LOCALVERSION ??= ""
 KERNEL_CONFIG_COMMAND ?= "oe_runmake_call -C ${S} O=${B} olddefconfig || 
oe_runmake -C ${S} O=${B} oldnoconfig"
 
 python check_oldest_kernel() {
@@ -633,11 +634,10 @@ check_oldest_kernel[vardepsexclude] += "OLDEST_KERNEL 
KERNEL_VERSION"
 do_configure[prefuncs] += "check_oldest_kernel"
 
 kernel_do_configure() {
-   # fixes extra + in /lib/modules/2.6.37+
-   # $ scripts/setlocalversion . => +
-   # $ make kernelversion => 2.6.37
-   # $ make kernelrelease => 2.6.37+
-   touch ${B}/.scmversion ${S}/.scmversion
+   if [ ! -e ${B}/.scmversion -a ! -e ${S}/.scmversion ]; then
+   echo ${KERNEL_LOCALVERSION} > ${B}/.scmversion
+   echo ${KERNEL_LOCALVERSION} > ${S}/.scmversion
+   fi
 
if [ "${S}" != "${B}" ] && [ -f "${S}/.config" ] && [ ! -f 
"${B}/.config" ]; then
mv "${S}/.config" "${B}/.config"
diff --git a/meta/conf/documentation.conf b/meta/conf/documentation.conf
index a27d7a53c3..66b8e2f24f 100644
--- a/meta/conf/documentation.conf
+++ b/meta/conf/documentation.conf
@@ -253,6 +253,7 @@ KERNEL_MODULE_PROBECONF[doc] = "Lists kernel modules for 
which the build system
 KERNEL_PACKAGE_NAME[doc] = "Name prefix for kernel packages. Defaults to 
'kernel'."
 KERNEL_PATH[doc] = "The location of the kernel sources. This variable is set 
to the value of the STAGING_KERNEL_DIR within the module class 
(module.bbclass)."
 KERNEL_SRC[doc] = "The location of the kernel sources. This variable is set to 
the value of the STAGING_KERNEL_DIR within the module class (module.bbclass)."
+KERNEL_LOCALVERSION[doc] = "Appends a string to the name of the local version 
of the kernel image."
 KFEATURE_DESCRIPTION[doc] = "Provides a short description of a configuration 
fragment. You use this variable in the .scc file that describes a configuration 
fragment file."
 KMACHINE[doc] = "The machine as known by the kernel."
 KTYPE[doc] = "Defines the kernel type to be used in assembling the 
configuration."
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181939): 
https://lists.openembedded.org/g/openembedded-core/message/181939
Mute This Topic: https://lists.openembedded.org/mt/99224358/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] meta: introduce KCONFIG_CONFIG_ENABLE_MENUCONFIG

2023-05-13 Thread Ming Liu
From: Ming Liu 

Currently, uboot do_menuconfig task is breaking when UBOOT_CONFIG is
chosen rather than UBOOT_MACHINE, it simply fails with the following
errors:
| make: *** No rule to make target 'menuconfig'. Stio.
| Command failed.
| Press any key to continue...

this is due to the work directory of do_menuconfig is set to ${B} but
not ${B}/$config.

We should distinguish two situations:
1) When there is only one config item in UBOOT_CONFIG, do_menuconfig
   should work just like how it works for UBOOT_MACHINE.
2) When there are multiple config items in UBOOT_CONFIG, do_menuconfig
   should print out some information saying it's not supported other
   than just failing.

This patch mainly aims to fix that by introducing a extra variable
KCONFIG_CONFIG_ENABLE_MENUCONFIG, it would be set to 'false' for
situation 2), and when it's set to 'true', then set
KCONFIG_CONFIG_ROOTDIR correctly in uboot-config.bbclass to let
do_menuconfig task work.

DEVTOOL_DISABLE_MENUCONFIG could be replaced by this new variable
KCONFIG_CONFIG_ENABLE_MENUCONFIG.

Signed-off-by: Ming Liu 
---
 meta/classes-recipe/cml1.bbclass | 5 +
 meta/classes-recipe/uboot-config.bbclass | 6 ++
 meta/recipes-bsp/u-boot/u-boot-configure.inc | 1 -
 scripts/lib/devtool/standard.py  | 6 +++---
 4 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/meta/classes-recipe/cml1.bbclass b/meta/classes-recipe/cml1.bbclass
index a09a042c3f..d87d8204e4 100644
--- a/meta/classes-recipe/cml1.bbclass
+++ b/meta/classes-recipe/cml1.bbclass
@@ -32,10 +32,15 @@ CROSS_CURSES_INC = '-DCURSES_LOC=""'
 TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
 
 KCONFIG_CONFIG_COMMAND ??= "menuconfig"
+KCONFIG_CONFIG_ENABLE_MENUCONFIG ??= "true"
 KCONFIG_CONFIG_ROOTDIR ??= "${B}"
 python do_menuconfig() {
 import shutil
 
+if not bb.utils.to_boolean(d.getVar("KCONFIG_CONFIG_ENABLE_MENUCONFIG")):
+bb.fatal("do_menuconfig is disabled, please check 
KCONFIG_CONFIG_ENABLE_MENUCONFIG variable.")
+return
+
 config = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), ".config")
 configorig = os.path.join(d.getVar('KCONFIG_CONFIG_ROOTDIR'), 
".config.orig")
 
diff --git a/meta/classes-recipe/uboot-config.bbclass 
b/meta/classes-recipe/uboot-config.bbclass
index fb7a4bc498..9be1d64d3e 100644
--- a/meta/classes-recipe/uboot-config.bbclass
+++ b/meta/classes-recipe/uboot-config.bbclass
@@ -140,4 +140,10 @@ python () {
 
 if not found:
 raise bb.parse.SkipRecipe("The selected UBOOT_CONFIG key %s 
has no match in %s." % (ubootconfig, ubootconfigflags.keys()))
+
+if len(ubootconfig) == 1:
+d.setVar('KCONFIG_CONFIG_ROOTDIR', os.path.join(d.getVar("B"), 
d.getVar("UBOOT_MACHINE").strip()))
+else:
+# Disable menuconfig for multiple configs
+d.setVar('KCONFIG_CONFIG_ENABLE_MENUCONFIG', "false")
 }
diff --git a/meta/recipes-bsp/u-boot/u-boot-configure.inc 
b/meta/recipes-bsp/u-boot/u-boot-configure.inc
index 04e0894752..235623d25a 100644
--- a/meta/recipes-bsp/u-boot/u-boot-configure.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-configure.inc
@@ -26,7 +26,6 @@ do_configure () {
 unset j
 done
 unset i
-DEVTOOL_DISABLE_MENUCONFIG=true
 else
 if [ -n "${UBOOT_MACHINE}" ]; then
 oe_runmake -C ${S} O=${B} ${UBOOT_MACHINE}
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 0339d12763..852672810a 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -968,9 +968,9 @@ def modify(args, config, basepath, workspace):
 '}\n')
 if rd.getVarFlag('do_menuconfig','task'):
 f.write('\ndo_configure:append() {\n'
-'if [ ! ${DEVTOOL_DISABLE_MENUCONFIG} ]; then\n'
-'cp ${B}/.config ${S}/.config.baseline\n'
-'ln -sfT ${B}/.config ${S}/.config.new\n'
+'if [ ${@ 
oe.types.boolean(\'${KCONFIG_CONFIG_ENABLE_MENUCONFIG}\') } = True ]; then\n'
+'cp ${KCONFIG_CONFIG_ROOTDIR}/.config 
${S}/.config.baseline\n'
+'ln -sfT ${KCONFIG_CONFIG_ROOTDIR}/.config 
${S}/.config.new\n'
 'fi\n'
 '}\n')
 if initial_rev:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181196): 
https://lists.openembedded.org/g/openembedded-core/message/181196
Mute This Topic: https://lists.openembedded.org/mt/98870753/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] weston: add xwayland to DEPENDS for PACKAGECONFIG xwayland

2023-04-28 Thread Ming Liu
From: Ming Liu 

Otherwise xwayland.pc would not be present in sysroot, this leads to
some xwayland configs missing like have_listenfd, have_glamor.

Signed-off-by: Ming Liu 
---
 meta/recipes-graphics/wayland/weston_11.0.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston_11.0.1.bb 
b/meta/recipes-graphics/wayland/weston_11.0.1.bb
index 2daecc9856..4f6ce19915 100644
--- a/meta/recipes-graphics/wayland/weston_11.0.1.bb
+++ b/meta/recipes-graphics/wayland/weston_11.0.1.bb
@@ -73,7 +73,7 @@ PACKAGECONFIG[webp] = 
"-Dimage-webp=true,-Dimage-webp=false,libwebp"
 # Weston with systemd-login support
 PACKAGECONFIG[systemd] = "-Dsystemd=true 
-Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
 # Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false"
+PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,xwayland"
 # colord CMS support
 PACKAGECONFIG[colord] = 
"-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord"
 # Clients support
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#180529): 
https://lists.openembedded.org/g/openembedded-core/message/180529
Mute This Topic: https://lists.openembedded.org/mt/98558927/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] linux: inherit pkgconfig in kernel.bbclass

2023-03-04 Thread Ming Liu
From: Ming Liu 

pkgconfig is being required to find dependencies for building kernel
native tools, move "inherit pkgconfig" to kernel.bbclass so BSP kernel
recipes can also benefit from it.

Signed-off-by: Ming Liu 
---
 meta/classes-recipe/kernel.bbclass   | 2 +-
 meta/recipes-kernel/linux/linux-yocto-dev.bb | 2 --
 meta/recipes-kernel/linux/linux-yocto.inc| 1 -
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/classes-recipe/kernel.bbclass 
b/meta/classes-recipe/kernel.bbclass
index 3f9c6c00e6..92090ac14e 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -660,7 +660,7 @@ do_savedefconfig() {
 do_savedefconfig[nostamp] = "1"
 addtask savedefconfig after do_configure
 
-inherit cml1
+inherit cml1 pkgconfig
 
 # Need LD, HOSTLDFLAGS and more for config operations
 KCONFIG_CONFIG_COMMAND:append = " ${EXTRA_OEMAKE}"
diff --git a/meta/recipes-kernel/linux/linux-yocto-dev.bb 
b/meta/recipes-kernel/linux/linux-yocto-dev.bb
index 9ef5b80a37..8039a52324 100644
--- a/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -10,8 +10,6 @@
 
 inherit kernel
 require recipes-kernel/linux/linux-yocto.inc
-# for ncurses tests
-inherit pkgconfig
 
 # provide this .inc to set specific revisions
 include recipes-kernel/linux/linux-yocto-dev-revisions.inc
diff --git a/meta/recipes-kernel/linux/linux-yocto.inc 
b/meta/recipes-kernel/linux/linux-yocto.inc
index 93eef9e946..934591ff1c 100644
--- a/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/meta/recipes-kernel/linux/linux-yocto.inc
@@ -47,7 +47,6 @@ LINUX_VERSION_EXTENSION ??= "-yocto-${LINUX_KERNEL_TYPE}"
 # Pick up shared functions
 inherit kernel
 inherit kernel-yocto
-inherit pkgconfig
 
 B = "${WORKDIR}/linux-${PACKAGE_ARCH}-${LINUX_KERNEL_TYPE}-build"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#178027): 
https://lists.openembedded.org/g/openembedded-core/message/178027
Mute This Topic: https://lists.openembedded.org/mt/97386391/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] go-crosssdk: avoid host contamination by GOCACHE

2022-12-11 Thread Ming Liu
From: Robert Andersson 

By default GOCACHE is set to $HOME/.cache.

Same issue for all other go recipes had been fixed by commit 9a6d208b:
[ go: avoid host contamination by GOCACHE ]

but that commit missed go-crosssdk recipe.

Signed-off-by: Robert Andersson 
Signed-off-by: Ming Liu 
---
 meta/recipes-devtools/go/go-crosssdk.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-devtools/go/go-crosssdk.inc 
b/meta/recipes-devtools/go/go-crosssdk.inc
index cd23cca2fe..766938670a 100644
--- a/meta/recipes-devtools/go/go-crosssdk.inc
+++ b/meta/recipes-devtools/go/go-crosssdk.inc
@@ -4,6 +4,8 @@ DEPENDS = "go-native virtual/${TARGET_PREFIX}gcc-crosssdk 
virtual/nativesdk-${TA
 PN = "go-crosssdk-${SDK_SYS}"
 PROVIDES = "virtual/${TARGET_PREFIX}go-crosssdk"
 
+export GOCACHE = "${B}/.cache"
+
 do_configure[noexec] = "1"
 
 do_compile() {
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174476): 
https://lists.openembedded.org/g/openembedded-core/message/174476
Mute This Topic: https://lists.openembedded.org/mt/95603035/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH V4 1/2] bluez5: change configuration directory mode

2022-10-07 Thread Ming Liu
Hi, Ross:

I think it applies for both systemd and sysvinit, it's bluez5's requirement
that /etc/bluetooth should be read-only.

//Ming Liu

Ross Burton  於 2022年10月6日 週四 下午2:19寫道:

> Is this in a build with systemd or sysvinit?  Looking at the referenced
> commit, that’s when running in a systemd-managed contained environment.  In
> sysv that isn’t the case, so I’m not convinced this is the correct solution.
>
> Ross
>
> > On 6 Oct 2022, at 12:27, Ming Liu via lists.openembedded.org
>  wrote:
> >
> > From: Ming Liu 
> >
> > Change configuration directory mode from 0755 to 0555, this fixes a
> > following warning when bluetoothd starts:
> > | ConfigurationDirectory 'bluetooth' already exists but the mode is
> different.
> > | (File system: 755 ConfigurationDirectoryMode: 555)
> >
> > Reference:
> >
> https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=00cfb36e20e3c35db2150e7d0351ad7b8442e2d8
> >
> > Signed-off-by: Ming Liu 
> > ---
> > meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc
> b/meta/recipes-connectivity/bluez5/bluez5.inc
> > index 79d4645ca8..9f5c78b81e 100644
> > --- a/meta/recipes-connectivity/bluez5/bluez5.inc
> > +++ b/meta/recipes-connectivity/bluez5/bluez5.inc
> > @@ -82,7 +82,7 @@ do_install:append() {
> >   install -d ${D}${INIT_D_DIR}
> >   install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
> >
> > - install -d ${D}${sysconfdir}/bluetooth/
> > + install -m 0555 -d ${D}${sysconfdir}/bluetooth/
> >   if [ -f ${S}/profiles/network/network.conf ]; then
> >   install -m 0644 ${S}/profiles/network/network.conf
> ${D}/${sysconfdir}/bluetooth/
> >   fi
> > --
> > 2.25.1
> >
> >
> > 
> >
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171517): 
https://lists.openembedded.org/g/openembedded-core/message/171517
Mute This Topic: https://lists.openembedded.org/mt/94155398/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V4 2/2] testsdk.py: ensure the testsdk directory is writable before removing it

2022-10-06 Thread Ming Liu
From: Ming Liu 

We have to make sure all users have write permission to testsdk
directory before removing it, this is to avoid potential 'rm' failures.

Signed-off-by: Ming Liu 
---
 meta/lib/oeqa/sdk/testsdk.py | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/lib/oeqa/sdk/testsdk.py b/meta/lib/oeqa/sdk/testsdk.py
index 35e40187bc..e0179c9849 100644
--- a/meta/lib/oeqa/sdk/testsdk.py
+++ b/meta/lib/oeqa/sdk/testsdk.py
@@ -101,6 +101,10 @@ class TestSDK(TestSDKBase):
 processes = None
 
 sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
+
+# Ensure the Test SDK directory is writable for all users.
+subprocess.check_output(['chmod', 'ugo+w', '-R', sdk_dir], 
stderr=subprocess.STDOUT)
+
 bb.utils.remove(sdk_dir, True)
 bb.utils.mkdirhier(sdk_dir)
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171495): 
https://lists.openembedded.org/g/openembedded-core/message/171495
Mute This Topic: https://lists.openembedded.org/mt/94155399/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V4 1/2] bluez5: change configuration directory mode

2022-10-06 Thread Ming Liu
From: Ming Liu 

Change configuration directory mode from 0755 to 0555, this fixes a
following warning when bluetoothd starts:
| ConfigurationDirectory 'bluetooth' already exists but the mode is different.
| (File system: 755 ConfigurationDirectoryMode: 555)

Reference:
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=00cfb36e20e3c35db2150e7d0351ad7b8442e2d8

Signed-off-by: Ming Liu 
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
b/meta/recipes-connectivity/bluez5/bluez5.inc
index 79d4645ca8..9f5c78b81e 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -82,7 +82,7 @@ do_install:append() {
install -d ${D}${INIT_D_DIR}
install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
 
-   install -d ${D}${sysconfdir}/bluetooth/
+   install -m 0555 -d ${D}${sysconfdir}/bluetooth/
if [ -f ${S}/profiles/network/network.conf ]; then
install -m 0644 ${S}/profiles/network/network.conf 
${D}/${sysconfdir}/bluetooth/
fi
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171494): 
https://lists.openembedded.org/g/openembedded-core/message/171494
Mute This Topic: https://lists.openembedded.org/mt/94155398/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V4 0/2] bluez5: change configuration directory mode

2022-10-06 Thread Ming Liu
From: Ming Liu 

The changes in V4:
1 In commit message, add reference to
  
https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=00cfb36e20e3c35db2150e7d0351ad7b8442e2d8

2 Make testsdk directory writable before removing it.

Both as suggested by @Luca Ceresoli.

Ming Liu (2):
  bluez5: change configuration directory mode
  testsdk.py: ensure the testsdk directory is writable before removing
it

 meta/lib/oeqa/sdk/testsdk.py| 4 
 meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171493): 
https://lists.openembedded.org/g/openembedded-core/message/171493
Mute This Topic: https://lists.openembedded.org/mt/94155396/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] dropbear: add pam to PACKAGECONFIG

2022-10-06 Thread Ming Liu
From: Ming Liu 

Add pam to PACKAGECONFIG to make the code cleaner.

Signed-off-by: Ming Liu 
---
 meta/recipes-core/dropbear/dropbear_2022.82.bb | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/dropbear/dropbear_2022.82.bb 
b/meta/recipes-core/dropbear/dropbear_2022.82.bb
index 41c14ff2f1..4ed4c65cc1 100644
--- a/meta/recipes-core/dropbear/dropbear_2022.82.bb
+++ b/meta/recipes-core/dropbear/dropbear_2022.82.bb
@@ -12,8 +12,6 @@ DEPENDS = "zlib virtual/crypt"
 RPROVIDES:${PN} = "ssh sshd"
 RCONFLICTS:${PN} = "openssh-sshd openssh"
 
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
 SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://0001-urandom-xauth-changes-to-options.h.patch \
file://init \
@@ -36,8 +34,6 @@ PAM_PLUGINS = "libpam-runtime \
pam-plugin-permit \
pam-plugin-unix \
"
-RDEPENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
'${PAM_PLUGINS}', '', d)}"
-
 inherit autotools update-rc.d systemd
 
 CVE_PRODUCT = "dropbear_ssh"
@@ -51,14 +47,12 @@ SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
 BINCOMMANDS = "dbclient ssh scp"
 EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} 
${BINCOMMANDS}"'
 
-PACKAGECONFIG ?= "disable-weak-ciphers"
+PACKAGECONFIG ?= "disable-weak-ciphers ${@bb.utils.filter('DISTRO_FEATURES', 
'pam', d)}"
+PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
 PACKAGECONFIG[system-libtom] = 
"--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
 PACKAGECONFIG[disable-weak-ciphers] = ""
 PACKAGECONFIG[enable-x11-forwarding] = ""
 
-EXTRA_OECONF += "\
- ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam', 
'--disable-pam', d)}"
-
 # This option appends to CFLAGS and LDFLAGS from OE
 # This is causing [textrel] QA warning
 EXTRA_OECONF += "--disable-harden"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171489): 
https://lists.openembedded.org/g/openembedded-core/message/171489
Mute This Topic: https://lists.openembedded.org/mt/94154722/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V3] bluez5: change configuration directory mode

2022-10-05 Thread Ming Liu
From: Ming Liu 

Change configuration directory mode from 0755 to 0555, this fixes a
following warning when bluetoothd starts:
| ConfigurationDirectory 'bluetooth' already exists but the mode is different.
| (File system: 755 ConfigurationDirectoryMode: 555)

Signed-off-by: Ming Liu 
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
b/meta/recipes-connectivity/bluez5/bluez5.inc
index 79d4645ca8..9f5c78b81e 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -82,7 +82,7 @@ do_install:append() {
install -d ${D}${INIT_D_DIR}
install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
 
-   install -d ${D}${sysconfdir}/bluetooth/
+   install -m 0555 -d ${D}${sysconfdir}/bluetooth/
if [ -f ${S}/profiles/network/network.conf ]; then
install -m 0644 ${S}/profiles/network/network.conf 
${D}/${sysconfdir}/bluetooth/
fi
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171477): 
https://lists.openembedded.org/g/openembedded-core/message/171477
Mute This Topic: https://lists.openembedded.org/mt/94143567/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH V2] bluez5: change configuration directory mode

2022-10-05 Thread Ming Liu
Hi, Peter:

You are absolutely right, I also noticed that, it’s a typo, it should be
0555, will send a V3 soon.

//Ming Liu

> -Original Message-
> > From: openembedded-core@lists.openembedded.org <
> openembedded-core@lists.openembedded.org> On Behalf Of Ming Liu
> > Sent: den 5 oktober 2022 15:59
> > To: openembedded-core@lists.openembedded.org
> > Cc: Ming Liu 
> > Subject: [OE-core] [PATCH V2] bluez5: change configuration directory mode
> >
> > From: Ming Liu 
> >
> > Change configuration directory mode from 0755 to 0555, this fixes a
> > following warning when bluetoothd starts:
> > | ConfigurationDirectory 'bluetooth' already exists but the mode is
> different.
> > | (File system: 755 ConfigurationDirectoryMode: 555)
> >
> > Signed-off-by: Ming Liu 
> > ---
> >  meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc
> b/meta/recipes-connectivity/bluez5/bluez5.inc
> > index 79d4645ca8..48b8bcbe75 100644
> > --- a/meta/recipes-connectivity/bluez5/bluez5.inc
> > +++ b/meta/recipes-connectivity/bluez5/bluez5.inc
> > @@ -82,7 +82,7 @@ do_install:append() {
> >   install -d ${D}${INIT_D_DIR}
> >   install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
> >
> > - install -d ${D}${sysconfdir}/bluetooth/
> > + install -m 0755 -d ${D}${sysconfdir}/bluetooth/
>
> The default mode used by `install` if not specified is 0755.
> The above change should not make any difference...
>
> >   if [ -f ${S}/profiles/network/network.conf ]; then
> >   install -m 0644 ${S}/profiles/network/network.conf
> ${D}/${sysconfdir}/bluetooth/
> >   fi
> > --
> > 2.25.1
>
> //Peter
>
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171464): 
https://lists.openembedded.org/g/openembedded-core/message/171464
Mute This Topic: https://lists.openembedded.org/mt/94135755/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2] bluez5: change configuration directory mode

2022-10-05 Thread Ming Liu
From: Ming Liu 

Change configuration directory mode from 0755 to 0555, this fixes a
following warning when bluetoothd starts:
| ConfigurationDirectory 'bluetooth' already exists but the mode is different.
| (File system: 755 ConfigurationDirectoryMode: 555)

Signed-off-by: Ming Liu 
---
 meta/recipes-connectivity/bluez5/bluez5.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc 
b/meta/recipes-connectivity/bluez5/bluez5.inc
index 79d4645ca8..48b8bcbe75 100644
--- a/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -82,7 +82,7 @@ do_install:append() {
install -d ${D}${INIT_D_DIR}
install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
 
-   install -d ${D}${sysconfdir}/bluetooth/
+   install -m 0755 -d ${D}${sysconfdir}/bluetooth/
if [ -f ${S}/profiles/network/network.conf ]; then
install -m 0644 ${S}/profiles/network/network.conf 
${D}/${sysconfdir}/bluetooth/
fi
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#171459): 
https://lists.openembedded.org/g/openembedded-core/message/171459
Mute This Topic: https://lists.openembedded.org/mt/94135755/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 2/2] kernel-fitimage.bbclass: add padding algorithm property in config nodes

2022-09-01 Thread Ming Liu
From: LUIS ENRIQUEZ 

This allows choosing padding algorithm when building fitImage. It may be 
pkcs-1.5 or pss.

Signed-off-by: LUIS ENRIQUEZ 
Signed-off-by: Alexandre Belloni 
(cherry picked from commit 29d5336c728b28890bbaadebf0ccff00ad90a64d)
Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 2 ++
 meta/classes/uboot-sign.bbclass  | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 7b16633f6f..983392c23a 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -346,6 +346,7 @@ fitimage_emit_section_config() {
 
conf_csum="${FIT_HASH_ALG}"
conf_sign_algo="${FIT_SIGN_ALG}"
+   conf_padding_algo="${FIT_PAD_ALG}"
if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then
conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
fi
@@ -465,6 +466,7 @@ EOF
 signature-1 {
 algo = "$conf_csum,$conf_sign_algo";
 key-name-hint = "$conf_sign_keyname";
+padding = "$conf_padding_algo";
 $sign_line
 };
 EOF
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index 31ffe1f472..eecdec9160 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -73,6 +73,9 @@ UBOOT_FIT_HASH_ALG ?= "sha256"
 FIT_SIGN_ALG ?= "rsa2048"
 UBOOT_FIT_SIGN_ALG ?= "rsa2048"
 
+# Kernel / U-Boot fitImage Padding Algo
+FIT_PAD_ALG ?= "pkcs-1.5"
+
 # Generate keys for signing Kernel / U-Boot fitImage
 FIT_GENERATE_KEYS ?= "0"
 UBOOT_FIT_GENERATE_KEYS ?= "0"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170159): 
https://lists.openembedded.org/g/openembedded-core/message/170159
Mute This Topic: https://lists.openembedded.org/mt/93390626/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 1/2] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

2022-09-01 Thread Ming Liu
From: Ming Liu 

Sometimes an end user might want to choose another kernel type argument
for uboot-mkimage other than "kernel", for instance: "kernel_noload".

Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that,
and it could be used by BSP layers as well.

(From OE-Core rev: e288686e97de1265eeeaf452141e1473867efb1b)

Signed-off-by: Ming Liu 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
(cherry picked from commit 4eb7bbcc2f08b25387a15b7e4a89ef199783c973)
Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 meta/classes/kernel-uboot.bbclass| 3 +++
 meta/classes/kernel-uimage.bbclass   | 2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py | 4 +++-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 56d71ba8fa..7b16633f6f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -148,7 +148,7 @@ fitimage_emit_section_kernel() {
 kernel-$2 {
 description = "Linux kernel";
 data = /incbin/("$3");
-type = "kernel";
+type = "${UBOOT_MKIMAGE_KERNEL_TYPE}";
 arch = "${UBOOT_ARCH}";
 os = "linux";
 compression = "$4";
diff --git a/meta/classes/kernel-uboot.bbclass 
b/meta/classes/kernel-uboot.bbclass
index 2facade818..1bc98e042d 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -2,6 +2,9 @@
 FIT_KERNEL_COMP_ALG ?= "gzip"
 FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz"
 
+# Kernel image type passed to mkimage (i.e. kernel kernel_noload...)
+UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel"
+
 uboot_prep_kimage() {
if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
diff --git a/meta/classes/kernel-uimage.bbclass 
b/meta/classes/kernel-uimage.bbclass
index cedb4fa070..2e661ea916 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -30,6 +30,6 @@ do_uboot_mkimage() {
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
fi
 
-   uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a 
${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d 
linux.bin ${B}/arch/${ARCH}/boot/uImage
+   uboot-mkimage -A ${UBOOT_ARCH} -O linux -T ${UBOOT_MKIMAGE_KERNEL_TYPE} 
-C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n 
"${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
rm -f linux.bin
 }
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py 
b/meta/lib/oeqa/selftest/cases/fitimage.py
index e6bfd1257e..d732a9020d 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -738,6 +738,7 @@ UBOOT_LOADADDRESS = "0x8000"
 UBOOT_DTB_LOADADDRESS = "0x8200"
 UBOOT_ARCH = "arm"
 UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
+UBOOT_MKIMAGE_KERNEL_TYPE = "kernel"
 UBOOT_EXTLINUX = "0"
 FIT_GENERATE_KEYS = "1"
 KERNEL_IMAGETYPE_REPLACEMENT = "zImage"
@@ -763,6 +764,7 @@ FIT_HASH_ALG = "sha256"
 
 kernel_load = str(get_bb_var('UBOOT_LOADADDRESS'))
 kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT'))
+kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE'))
 kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG'))
 uboot_arch = str(get_bb_var('UBOOT_ARCH'))
 fit_hash_alg = str(get_bb_var('FIT_HASH_ALG'))
@@ -775,7 +777,7 @@ FIT_HASH_ALG = "sha256"
 'kernel-1 {',
 'description = "Linux kernel";',
 'data = /incbin/("linux.bin");',
-'type = "kernel";',
+'type = "' + kernel_type + '";',
 'arch = "' + uboot_arch + '";',
 'os = "linux";',
 'compression = "' + kernel_compression + '";',
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170158): 
https://lists.openembedded.org/g/openembedded-core/message/170158
Mute This Topic: https://lists.openembedded.org/mt/93390625/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 0/2] kernel-fitimage.bbclass: backport some fixes from master

2022-09-01 Thread Ming Liu
From: Ming Liu 

Backport some fixes from master branch to kernel-fitimage.bbclass,
otherwise some features are incomplete.


LUIS ENRIQUEZ (1):
  kernel-fitimage.bbclass: add padding algorithm property in config
nodes

Ming Liu (1):
  meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

 meta/classes/kernel-fitimage.bbclass | 4 +++-
 meta/classes/kernel-uboot.bbclass| 3 +++
 meta/classes/kernel-uimage.bbclass   | 2 +-
 meta/classes/uboot-sign.bbclass  | 3 +++
 meta/lib/oeqa/selftest/cases/fitimage.py | 4 +++-
 5 files changed, 13 insertions(+), 3 deletions(-)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#170157): 
https://lists.openembedded.org/g/openembedded-core/message/170157
Mute This Topic: https://lists.openembedded.org/mt/93390624/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] udev-extraconf:mount.sh: fix a umount issue

2022-07-20 Thread Ming Liu
From: Ming Liu 

Only touching /tmp/.automount-$name is not good enough, it must contain
the mount name, otherwise umount could not get the path from it.

Signed-off-by: Ming Liu 
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 43acb3a7a0..b7e86dbc0e 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -89,7 +89,7 @@ automount_systemd() {
 rm_dir "$MOUNT_BASE/$name"
 else
 logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] 
successful"
-touch "/tmp/.automount-$name"
+echo "$name" > "/tmp/.automount-$name"
 fi
 }
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168357): 
https://lists.openembedded.org/g/openembedded-core/message/168357
Mute This Topic: https://lists.openembedded.org/mt/92501368/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 9/9] udev-extraconf:mount.sh: fix path mismatching issues

2022-07-17 Thread Ming Liu
From: Ming Liu 

Since commit f077befd5f36ad88623aaf6a38b1a837ecb18650:
[ udev-extraconf: let automount base directory configurable ]

the mount base directory was configurable, we need drop 'run-media'
usage as well, change to figure it out from MOUNT_BASE.

Also 'get_label_name' function needs to be called ealier in
automount_systemd before checking '/tmp/.automount-$name', otherwise
they would never match.

(From OE-Core rev: c013b33162546fb5bd4bcc1daac75aa65d0be1a3)

Signed-off-by: Ming Liu 
Signed-off-by: Alexandre Belloni 
Signed-off-by: Richard Purdie 
(cherry picked from commit 7ed210054b3e253d5a67075bb9d4768d1661bef1)
Signed-off-by: Ming Liu 
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 8b6ce77741..43acb3a7a0 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -40,11 +40,14 @@ automount_systemd() {
 name="`basename "$DEVNAME"`"
 
 # Skip already mounted partitions
-if [ -f /run/systemd/transient/run-media-$name.mount ]; then
+if [ -f /run/systemd/transient/$(echo $MOUNT_BASE | cut -d '/' -f 2- | sed 
's#/#-#g')-*$name.mount ]; then
 logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted"
 return
 fi
 
+# Get the unique name for mount point
+get_label_name "${DEVNAME}"
+
 # Only go for auto-mounting when the device has been cleaned up in remove
 # or has not been identified yet
 if [ -e "/tmp/.automount-$name" ]; then
@@ -61,9 +64,6 @@ automount_systemd() {
 grep "^[[:space:]]*$tmp" /etc/fstab && return
 done
 
-# Get the unique name for mount point
-get_label_name "${DEVNAME}"
-
 [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name"
 
 MOUNT="$MOUNT -o silent"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168157): 
https://lists.openembedded.org/g/openembedded-core/message/168157
Mute This Topic: https://lists.openembedded.org/mt/92437762/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 8/9] udev-extraconf: fix some systemd automount issues

2022-07-17 Thread Ming Liu
From: Ming Liu 

The '.include' syntax has been dropped from latest systemd releases,
we need drop the systemd-udevd.service here, introduce a postinst
function to add "MountFlags=shared" to systemd-udevd.service.

Also lsblk binary is being called in mount.sh automount_systemd
function, add it to RDEPENDS.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit 356520d60b9429c6f62124821e42468ff2b7b1d6)
Signed-off-by: Ming Liu 
---
 .../udev/udev-extraconf/systemd-udevd.service |  3 ---
 meta/recipes-core/udev/udev-extraconf_1.1.bb  | 20 +++
 2 files changed, 12 insertions(+), 11 deletions(-)
 delete mode 100644 meta/recipes-core/udev/udev-extraconf/systemd-udevd.service

diff --git a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service 
b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service
deleted file mode 100644
index a9b86eb6e4..00
--- a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service
+++ /dev/null
@@ -1,3 +0,0 @@
-.include @systemd_unitdir@/system/systemd-udevd.service
-[Service]
-MountFlags=shared
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb 
b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index ef6019259e..30f1fe76d0 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -11,7 +11,6 @@ SRC_URI = " \
file://autonet.rules \
file://network.sh \
file://localextra.rules \
-   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'file://systemd-udevd.service', '', d)} \
 "
 
 S = "${WORKDIR}"
@@ -36,16 +35,21 @@ do_install() {
 sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' 
${D}${sysconfdir}/udev/scripts/mount.sh
 
 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
+}
+
+pkg_postinst:${PN} () {
+   if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
+   sed -i "/\[Service\]/aMountFlags=shared" 
$D${systemd_unitdir}/system/systemd-udevd.service
+   fi
+}
 
-if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
-install -d ${D}${sysconfdir}/systemd/system
-install ${WORKDIR}/systemd-udevd.service 
${D}${sysconfdir}/systemd/system/systemd-udevd.service
-sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' 
${D}${sysconfdir}/systemd/system/systemd-udevd.service
-fi
+pkg_postrm:${PN} () {
+   if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
+   sed -i "/MountFlags=shared/d" 
$D${systemd_unitdir}/system/systemd-udevd.service
+   fi
 }
 
-FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 
'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}"
-RDEPENDS:${PN} = "udev util-linux-blkid"
+RDEPENDS:${PN} = "udev util-linux-blkid 
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"
 CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
 
 # to replace udev-extra-rules from meta-oe
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168156): 
https://lists.openembedded.org/g/openembedded-core/message/168156
Mute This Topic: https://lists.openembedded.org/mt/92437761/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 7/9] udev-extraconf/mount.sh: ignore lvm in automount

2022-07-17 Thread Ming Liu
From: Muhammad Hamza 

Failure message is shown in boot logs when trying to
mount lvm as automounter does not handle cases where
lvm is mounted. This simply skips lvm while automounting
to avoid failure message in boot logs.

Signed-off-by: Ansar Rasool 
Signed-off-by: Muhammad Hamza 
Signed-off-by: Luca Ceresoli 
(cherry picked from commit b1d18072ed9a8b0bca0f20f8e5deefa73ab6acbe)
Signed-off-by: Ming Liu 
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 537828e3e3..8b6ce77741 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -76,6 +76,8 @@ automount_systemd() {
 ;;
 swap)
 return ;;
+lvm*|LVM*)
+return ;;
 # TODO
 *)
 ;;
@@ -129,6 +131,8 @@ automount() {
;;
swap)
return ;;
+   lvm*|LVM*)
+return ;;
# TODO
*)
;;
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168155): 
https://lists.openembedded.org/g/openembedded-core/message/168155
Mute This Topic: https://lists.openembedded.org/mt/92437760/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 6/9] udev-extraconf: force systemd-udevd to use shared MountFlags

2022-07-17 Thread Ming Liu
From: Muhammad Hamza 

Automounting does not work cleanly in case systemd as well as
udev rules are being used simultaneously and in most cases
race conditions and unknown behavior can come up.
In case we're running on top of systemd we need to make sure
that systemd-udevd knows that udev is in play as well and
mounting should be done using shared flags. Also as we're
using mount from sources other than systemd-mount in current
scripts this is the most manageable fix to automounting
problems.

Signed-off-by: Awais Belal 
Signed-off-by: Muhammad Hamza 
Signed-off-by: Luca Ceresoli 
(cherry picked from commit 1e770416b4c9a0468404fb64d55114d93e84763b)
Signed-off-by: Ming Liu 
---
 .../udev/udev-extraconf/systemd-udevd.service| 3 +++
 meta/recipes-core/udev/udev-extraconf_1.1.bb | 9 -
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/udev/udev-extraconf/systemd-udevd.service

diff --git a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service 
b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service
new file mode 100644
index 00..a9b86eb6e4
--- /dev/null
+++ b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service
@@ -0,0 +1,3 @@
+.include @systemd_unitdir@/system/systemd-udevd.service
+[Service]
+MountFlags=shared
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb 
b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 8213c1a930..ef6019259e 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -11,6 +11,7 @@ SRC_URI = " \
file://autonet.rules \
file://network.sh \
file://localextra.rules \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'file://systemd-udevd.service', '', d)} \
 "
 
 S = "${WORKDIR}"
@@ -35,9 +36,15 @@ do_install() {
 sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' 
${D}${sysconfdir}/udev/scripts/mount.sh
 
 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
+
+if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
+install -d ${D}${sysconfdir}/systemd/system
+install ${WORKDIR}/systemd-udevd.service 
${D}${sysconfdir}/systemd/system/systemd-udevd.service
+sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' 
${D}${sysconfdir}/systemd/system/systemd-udevd.service
+fi
 }
 
-FILES:${PN} = "${sysconfdir}/udev"
+FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 
'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}"
 RDEPENDS:${PN} = "udev util-linux-blkid"
 CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168154): 
https://lists.openembedded.org/g/openembedded-core/message/168154
Mute This Topic: https://lists.openembedded.org/mt/92437759/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 5/9] udev-extraconf/mount.sh: only mount devices on hotplug

2022-07-17 Thread Ming Liu
From: Muhammad Hamza 

fdisk from util-linux (2.31.1) and above allows the user to
manipulate an already mounted device. In order to achieve this
functionality it issues a BLKRRPART (block device re-read part)
ioctl and in response the kernel generates remove/change/add
events if the device is not mounted (manually unmounted etc)
which are caught and processed by udev. This causes our auto-mounter
to remount everything because it does not keep track and things
go out of control.
Differentiating between types of remove events such as the one
described above (generated by BLKRRPART) and one where the device
is physically plugged out is only possible using the DEVPATH variable
which is cleaned up only when the device is actually plugged-out.
This fixes the above anomaly by only mounting a device in add event
which is cleaned up properly (tmp cache deleted) in the remove event
or is not present in the tmp cache while making use of the DEVPATH
variable during the remove action.

Signed-off-by: Awais Belal 
Signed-off-by: Muhammad Hamza 
Signed-off-by: Luca Ceresoli 
(cherry picked from commit 11a5e6c17535438ea1e7a8403ed260c8b3a22bc8)
Signed-off-by: Ming Liu 
---
 .../recipes-core/udev/udev-extraconf/mount.sh | 34 +++
 1 file changed, 27 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index c4695ee27d..537828e3e3 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -45,6 +45,13 @@ automount_systemd() {
 return
 fi
 
+# Only go for auto-mounting when the device has been cleaned up in remove
+# or has not been identified yet
+if [ -e "/tmp/.automount-$name" ]; then
+logger "mount.sh/automount" "[$MOUNT_BASE/$name] is already cached"
+return
+fi
+
 # Skip the partition which are already in /etc/fstab
 grep "^[[:space:]]*$DEVNAME" /etc/fstab && return
 for n in LABEL PARTLABEL UUID PARTUUID; do
@@ -100,6 +107,13 @@ automount() {
# Get the unique name for mount point
get_label_name "${DEVNAME}"
 
+# Only go for auto-mounting when the device has been cleaned up in 
remove
+# or has not been identified yet
+if [ -e "/tmp/.automount-$name" ]; then
+logger "mount.sh/automount" "[$MOUNT_BASE/$name] is already 
cached"
+return
+fi
+
! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name"
# Silent util-linux's version of mounting auto
if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
@@ -172,12 +186,18 @@ if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n 
"$ID_FS_TYPE" -o "$media_t
 fi
 
 if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && [ -x "$UMOUNT" ] && 
[ -n "$DEVNAME" ]; then
-for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
-do
-$UMOUNT $mnt
-done
-
-# Remove empty directories from auto-mounter
 name="`basename "$DEVNAME"`"
-test -e "/tmp/.automount-$name" && rm_dir "$MOUNT_BASE/$name"
+tmpfile=`find /tmp | grep "\.automount-.*${name}$"`
+if [ ! -e "/sys/$DEVPATH" -a -e "$tmpfile" ]; then
+logger "mount.sh/remove" "cleaning up $DEVNAME, was mounted by the 
auto-mounter"
+for mnt in `cat /proc/mounts | grep "$DEVNAME" | cut -f 2 -d " " `
+do
+$UMOUNT $mnt
+done
+# Remove mount directory created by the auto-mounter
+# and clean up our tmp cache file
+mntdir=`cat "$tmpfile"`
+rm_dir "$MOUNT_BASE/$mntdir"
+rm "$tmpfile"
+fi
 fi
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168153): 
https://lists.openembedded.org/g/openembedded-core/message/168153
Mute This Topic: https://lists.openembedded.org/mt/92437756/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 4/9] udev-extraconf/mount.sh: save mount name in our tmp filecache

2022-07-17 Thread Ming Liu
From: Muhammad Hamza 

Doing this will allow to fetch the exact name created by the
auto-mounter during the remove action where depending on the
scenario utilities such as the blkid might not be usable due
to actual device not being present on the system.

Signed-off-by: Awais Belal 
Signed-off-by: Muhammad Hamza 
Signed-off-by: Luca Ceresoli 
(cherry picked from commit 496b76f8775a620c1d449eb6f62a41656abf2a9b)
Signed-off-by: Ming Liu 
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 40910be8bd..c4695ee27d 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -126,7 +126,10 @@ automount() {
rm_dir "$MOUNT_BASE/$name"
else
logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] 
successful"
-   touch "/tmp/.automount-$name"
+   # The actual device might not be present in the remove event so 
blkid cannot
+   # be used to calculate what name was generated here. Simply 
save the mount
+   # name in our tmp file.
+   echo "$name" > "/tmp/.automount-$name"
fi
 }

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168152): 
https://lists.openembedded.org/g/openembedded-core/message/168152
Mute This Topic: https://lists.openembedded.org/mt/92437754/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 3/9] udev-extraconf/mount.sh: add LABELs to mountpoints

2022-07-17 Thread Ming Liu
From: Muhammad Hamza 

This alters the mountpoints such that if a device has a LABEL or
a PARTLABEL, it will be mounted at e.g.:

  /run/media/$LABEL-
  /run/media/$PARTLABEL-
  /run/media/rootfs-sda2

otherwise the device will be mounted at e.g.:

  /run/media/
  /run/media/sda1

The  appended with LABEL or PARTLABEL makes sure that
the mountpoint is unique, therefore, avoids overlapping mounts.

Signed-off-by: Arsalan H. Awan 
Signed-off-by: Muhammad Hamza 
Signed-off-by: Luca Ceresoli 
(cherry picked from commit a9a0a0967832445f1bcc65d58f95343d1b562e1b)
Signed-off-by: Ming Liu 
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 18 ++
 meta/recipes-core/udev/udev-extraconf_1.1.bb   |  2 +-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index c8b773bc07..40910be8bd 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -54,6 +54,9 @@ automount_systemd() {
 grep "^[[:space:]]*$tmp" /etc/fstab && return
 done
 
+# Get the unique name for mount point
+get_label_name "${DEVNAME}"
+
 [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name"
 
 MOUNT="$MOUNT -o silent"
@@ -94,6 +97,9 @@ automount() {
# configured in fstab
grep -q "^$DEVNAME " /proc/mounts && return
 
+   # Get the unique name for mount point
+   get_label_name "${DEVNAME}"
+
! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name"
# Silent util-linux's version of mounting auto
if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
@@ -134,6 +140,18 @@ rm_dir() {
fi
 }
 
+get_label_name() {
+   # Get the LABEL or PARTLABEL
+   LABEL=`/sbin/blkid | grep "$1:" | grep -o 'LABEL=".*"' | cut -d '"' -f2`
+   # If the $DEVNAME has a LABEL or a PARTLABEL
+   if [ -n "$LABEL" ]; then
+   # Set the mount location dir name to LABEL appended
+   # with $name e.g. label-sda. That would avoid overlapping
+   # mounts in case two devices have same LABEL
+   name="${LABEL}-${name}"
+   fi
+}
+
 # No ID_FS_TYPE for cdrom device, yet it should be mounted
 name="`basename "$DEVNAME"`"
 [ -e /sys/block/$name/device/media ] && media_type=`cat 
/sys/block/$name/device/media`
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb 
b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 2b908ac05b..8213c1a930 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -38,7 +38,7 @@ do_install() {
 }
 
 FILES:${PN} = "${sysconfdir}/udev"
-RDEPENDS:${PN} = "udev"
+RDEPENDS:${PN} = "udev util-linux-blkid"
 CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
 
 # to replace udev-extra-rules from meta-oe
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168151): 
https://lists.openembedded.org/g/openembedded-core/message/168151
Mute This Topic: https://lists.openembedded.org/mt/92437753/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 2/9] udev-extraconf: let automount base directory configurable

2022-07-17 Thread Ming Liu
From: Ming Liu 

Dont hard-code automount base directory to '/run/media', introduce a
variable MOUNT_BASE to let it configurable, like in udisks2 the mount
base is also configurable by setting option: --enable-fhs-media.

Signed-off-by: Ming Liu 
Signed-off-by: Luca Ceresoli 
Signed-off-by: Richard Purdie 
(cherry picked from commit f077befd5f36ad88623aaf6a38b1a837ecb18650)
Signed-off-by: Ming Liu 
---
 .../recipes-core/udev/udev-extraconf/mount.sh | 25 ++-
 meta/recipes-core/udev/udev-extraconf_1.1.bb  |  2 ++
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 5ba66e98e2..c8b773bc07 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -6,6 +6,7 @@
 
 BASE_INIT="`readlink -f "@base_sbindir@/init"`"
 INIT_SYSTEMD="@systemd_unitdir@/systemd"
+MOUNT_BASE="@MOUNT_BASE@"
 
 if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then
 # systemd as init uses systemd-mount to mount block devices
@@ -40,7 +41,7 @@ automount_systemd() {
 
 # Skip already mounted partitions
 if [ -f /run/systemd/transient/run-media-$name.mount ]; then
-logger "mount.sh/automount" "/run/media/$name already mounted"
+logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted"
 return
 fi
 
@@ -53,7 +54,7 @@ automount_systemd() {
 grep "^[[:space:]]*$tmp" /etc/fstab && return
 done
 
-[ -d "/run/media/$name" ] || mkdir -p "/run/media/$name"
+[ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name"
 
 MOUNT="$MOUNT -o silent"
 
@@ -70,12 +71,12 @@ automount_systemd() {
 ;;
 esac
 
-if ! $MOUNT --no-block -t auto $DEVNAME "/run/media/$name"
+if ! $MOUNT --no-block -t auto $DEVNAME "$MOUNT_BASE/$name"
 then
-#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"/run/media/$name\" failed!"
-rm_dir "/run/media/$name"
+#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"$MOUNT_BASE/$name\" failed!"
+rm_dir "$MOUNT_BASE/$name"
 else
-logger "mount.sh/automount" "Auto-mount of [/run/media/$name] 
successful"
+logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] 
successful"
 touch "/tmp/.automount-$name"
 fi
 }
@@ -93,7 +94,7 @@ automount() {
# configured in fstab
grep -q "^$DEVNAME " /proc/mounts && return
 
-   ! test -d "/run/media/$name" && mkdir -p "/run/media/$name"
+   ! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name"
# Silent util-linux's version of mounting auto
if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
then
@@ -113,12 +114,12 @@ automount() {
;;
esac
 
-   if ! $MOUNT -t auto $DEVNAME "/run/media/$name"
+   if ! $MOUNT -t auto $DEVNAME "$MOUNT_BASE/$name"
then
-   #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"/run/media/$name\" failed!"
-   rm_dir "/run/media/$name"
+   #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"$MOUNT_BASE/$name\" failed!"
+   rm_dir "$MOUNT_BASE/$name"
else
-   logger "mount.sh/automount" "Auto-mount of [/run/media/$name] 
successful"
+   logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] 
successful"
touch "/tmp/.automount-$name"
fi
 }
@@ -157,5 +158,5 @@ if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && 
[ -x "$UMOUNT" ] && [
 
 # Remove empty directories from auto-mounter
 name="`basename "$DEVNAME"`"
-test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name"
+test -e "/tmp/.automount-$name" && rm_dir "$MOUNT_BASE/$name"
 fi
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb 
b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 7da04379c0..2b908ac05b 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
 
 S = "${WORKDIR}"
 
+MOUNT_BASE = "/run/media"
 
 do_install() {
 install -d ${D}${sysconfdir}/udev/rules.d
@@ -31,6 +32,7 @@ do_install() {
 install -m 0755 ${WO

[OE-core] [kirkstone] [PATCH 1/9] udev-extraconf/initrdscripts/parted: Rename mount.blacklist -> mount.ignorelist

2022-07-17 Thread Ming Liu
From: Richard Purdie 

Signed-off-by: Richard Purdie 
Signed-off-by: Luca Ceresoli 
Signed-off-by: Richard Purdie 
(cherry picked from commit 69e486ddb3059f80ba538e1f59c2ca8a8df0faf9)
Signed-off-by: Ming Liu 
---
 .../initrdscripts/files/init-install-efi-testfs.sh |  2 +-
 .../initrdscripts/files/init-install-efi.sh|  2 +-
 .../initrdscripts/files/init-install-testfs.sh |  2 +-
 meta/recipes-core/initrdscripts/files/init-install.sh  |  2 +-
 .../{mount.blacklist => mount.ignorelist}  |  0
 meta/recipes-core/udev/udev-extraconf/mount.sh |  4 ++--
 meta/recipes-core/udev/udev-extraconf_1.1.bb   | 10 +-
 meta/recipes-extended/parted/files/run-ptest   |  6 +++---
 8 files changed, 14 insertions(+), 14 deletions(-)
 rename meta/recipes-core/udev/udev-extraconf/{mount.blacklist => 
mount.ignorelist} (100%)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
index 1fcd29e54c..4bd6ace7b3 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
@@ -138,7 +138,7 @@ touch /ssd/etc/controllerimage
 if [ -d /ssd/etc/ ] ; then
 # We dont want udev to mount our root device while we're booting...
 if [ -d /ssd/etc/udev/ ] ; then
-echo "/dev/${device}" >> /ssd/etc/udev/mount.blacklist
+echo "/dev/${device}" >> /ssd/etc/udev/mount.ignorelist
 fi
 fi
 
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh 
b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f667518b89..ffd3870199 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -229,7 +229,7 @@ if [ -d /tgt_root/etc/ ] ; then
 echo "UUID=$boot_uuid  /bootvfat   defaults
  1  2" >> /tgt_root/etc/fstab
 # We dont want udev to mount our root device while we're booting...
 if [ -d /tgt_root/etc/udev/ ] ; then
-echo "${device}" >> /tgt_root/etc/udev/mount.blacklist
+echo "${device}" >> /tgt_root/etc/udev/mount.ignorelist
 fi
 fi
 
diff --git a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh 
b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
index 7b49001659..8ab74ddc5d 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
@@ -164,7 +164,7 @@ if [ -d /tgt_root/etc/ ] ; then
 echo "$bootfs  /bootext3   defaults
  1  2" >> /tgt_root/etc/fstab
 # We dont want udev to mount our root device while we're booting...
 if [ -d /tgt_root/etc/udev/ ] ; then
-   echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
+   echo "/dev/${device}" >> /tgt_root/etc/udev/mount.ignorelist
 fi
 fi
 umount /tgt_root
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh 
b/meta/recipes-core/initrdscripts/files/init-install.sh
index e71579631b..df33791ec7 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -261,7 +261,7 @@ if [ -d /tgt_root/etc/ ] ; then
 echo "$bootdev  /bootext3   defaults   
   1  2" >> /tgt_root/etc/fstab
 # We dont want udev to mount our root device while we're booting...
 if [ -d /tgt_root/etc/udev/ ] ; then
-echo "${device}" >> /tgt_root/etc/udev/mount.blacklist
+echo "${device}" >> /tgt_root/etc/udev/mount.ignorelist
 fi
 fi
 umount /tgt_root
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.blacklist 
b/meta/recipes-core/udev/udev-extraconf/mount.ignorelist
similarity index 100%
rename from meta/recipes-core/udev/udev-extraconf/mount.blacklist
rename to meta/recipes-core/udev/udev-extraconf/mount.ignorelist
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index b23731870e..5ba66e98e2 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -26,11 +26,11 @@ fi
 
 PMOUNT="/usr/bin/pmount"
 
-for line in `grep -h -v ^# /etc/udev/mount.blacklist 
/etc/udev/mount.blacklist.d/*`
+for line in `grep -h -v ^# /etc/udev/mount.ignorelist 
/etc/udev/mount.ignorelist.d/*`
 do
if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
then
-   logger "udev/mount.sh" "[$DEVNAME] is blacklisted, ignoring"
+   logger "udev/mount.sh" "[$DEVNAME] is marked to ignore"
exit 0

[OE-core] [kirkstone] [PATCH 0/9] udev-extraconf fixes

2022-07-17 Thread Ming Liu
From: Ming Liu 

udev-extraconf of kirkstone does not work, back-ported several fixes from
upstream.

Ming Liu (3):
  udev-extraconf: let automount base directory configurable
  udev-extraconf: fix some systemd automount issues
  udev-extraconf:mount.sh: fix path mismatching issues

Muhammad Hamza (5):
  udev-extraconf/mount.sh: add LABELs to mountpoints
  udev-extraconf/mount.sh: save mount name in our tmp filecache
  udev-extraconf/mount.sh: only mount devices on hotplug
  udev-extraconf: force systemd-udevd to use shared MountFlags
  udev-extraconf/mount.sh: ignore lvm in automount

Richard Purdie (1):
  udev-extraconf/initrdscripts/parted: Rename mount.blacklist ->
mount.ignorelist

 .../files/init-install-efi-testfs.sh  |  2 +-
 .../initrdscripts/files/init-install-efi.sh   |  2 +-
 .../files/init-install-testfs.sh  |  2 +-
 .../initrdscripts/files/init-install.sh   |  2 +-
 .../{mount.blacklist => mount.ignorelist} |  0
 .../recipes-core/udev/udev-extraconf/mount.sh | 90 ++-
 meta/recipes-core/udev/udev-extraconf_1.1.bb  | 27 --
 meta/recipes-extended/parted/files/run-ptest  |  6 +-
 8 files changed, 95 insertions(+), 36 deletions(-)
 rename meta/recipes-core/udev/udev-extraconf/{mount.blacklist => 
mount.ignorelist} (100%)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168148): 
https://lists.openembedded.org/g/openembedded-core/message/168148
Mute This Topic: https://lists.openembedded.org/mt/92437747/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] rootfs-postcommands.bbclass: move host-user-contaminated.txt to ${S}

2022-07-15 Thread Ming Liu
From: Ming Liu 

This is to ensure host-user-contaminated.txt would be removed before
do_rootfs runs, since ${S} is in cleandirs of do_rootfs, otherwise, a
host-user-contaminated.txt file that generated from previous builds
could be used which is wrong.

Signed-off-by: Ming Liu 
---
 meta/classes/rootfs-postcommands.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index 452b87f9b3..a8a952f31d 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -305,7 +305,7 @@ rootfs_trim_schemas () {
 }
 
 rootfs_check_host_user_contaminated () {
-   contaminated="${WORKDIR}/host-user-contaminated.txt"
+   contaminated="${S}/host-user-contaminated.txt"
HOST_USER_UID="$(PSEUDO_UNLOAD=1 id -u)"
HOST_USER_GID="$(PSEUDO_UNLOAD=1 id -g)"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168058): 
https://lists.openembedded.org/g/openembedded-core/message/168058
Mute This Topic: https://lists.openembedded.org/mt/92398381/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] udev-extraconf:mount.sh: fix path mismatching issues

2022-07-14 Thread Ming Liu
From: Ming Liu 

Since commit f077befd5f36ad88623aaf6a38b1a837ecb18650:
[ udev-extraconf: let automount base directory configurable ]

the mount base directory was configurable, we need drop 'run-media'
usage as well, change to figure it out from MOUNT_BASE.

Also 'get_label_name' function needs to be called ealier in
automount_systemd before checking '/tmp/.automount-$name', otherwise
they would never match.

Signed-off-by: Ming Liu 
---
 meta/recipes-core/udev/udev-extraconf/mount.sh | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 8b6ce77741..43acb3a7a0 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -40,11 +40,14 @@ automount_systemd() {
 name="`basename "$DEVNAME"`"
 
 # Skip already mounted partitions
-if [ -f /run/systemd/transient/run-media-$name.mount ]; then
+if [ -f /run/systemd/transient/$(echo $MOUNT_BASE | cut -d '/' -f 2- | sed 
's#/#-#g')-*$name.mount ]; then
 logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted"
 return
 fi
 
+# Get the unique name for mount point
+get_label_name "${DEVNAME}"
+
 # Only go for auto-mounting when the device has been cleaned up in remove
 # or has not been identified yet
 if [ -e "/tmp/.automount-$name" ]; then
@@ -61,9 +64,6 @@ automount_systemd() {
 grep "^[[:space:]]*$tmp" /etc/fstab && return
 done
 
-# Get the unique name for mount point
-get_label_name "${DEVNAME}"
-
 [ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name"
 
 MOUNT="$MOUNT -o silent"
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168037): 
https://lists.openembedded.org/g/openembedded-core/message/168037
Mute This Topic: https://lists.openembedded.org/mt/92381790/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V3 1/1] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

2022-07-14 Thread Ming Liu
From: Ming Liu 

Sometimes an end user might want to choose another kernel type argument
for uboot-mkimage other than "kernel", for instance: "kernel_noload".

Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that,
and it could be used by BSP layers as well.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 meta/classes/kernel-uboot.bbclass| 3 +++
 meta/classes/kernel-uimage.bbclass   | 2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py | 4 +++-
 4 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 7e09b075ff..2112ae4cfa 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -148,7 +148,7 @@ fitimage_emit_section_kernel() {
 kernel-$2 {
 description = "Linux kernel";
 data = /incbin/("$3");
-type = "kernel";
+type = "${UBOOT_MKIMAGE_KERNEL_TYPE}";
 arch = "${UBOOT_ARCH}";
 os = "linux";
 compression = "$4";
diff --git a/meta/classes/kernel-uboot.bbclass 
b/meta/classes/kernel-uboot.bbclass
index 2facade818..1bc98e042d 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -2,6 +2,9 @@
 FIT_KERNEL_COMP_ALG ?= "gzip"
 FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz"
 
+# Kernel image type passed to mkimage (i.e. kernel kernel_noload...)
+UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel"
+
 uboot_prep_kimage() {
if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
diff --git a/meta/classes/kernel-uimage.bbclass 
b/meta/classes/kernel-uimage.bbclass
index cedb4fa070..2e661ea916 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -30,6 +30,6 @@ do_uboot_mkimage() {
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
fi
 
-   uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a 
${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d 
linux.bin ${B}/arch/${ARCH}/boot/uImage
+   uboot-mkimage -A ${UBOOT_ARCH} -O linux -T ${UBOOT_MKIMAGE_KERNEL_TYPE} 
-C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n 
"${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
rm -f linux.bin
 }
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py 
b/meta/lib/oeqa/selftest/cases/fitimage.py
index e6bfd1257e..d732a9020d 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -738,6 +738,7 @@ UBOOT_LOADADDRESS = "0x8000"
 UBOOT_DTB_LOADADDRESS = "0x8200"
 UBOOT_ARCH = "arm"
 UBOOT_MKIMAGE_DTCOPTS = "-I dts -O dtb -p 2000"
+UBOOT_MKIMAGE_KERNEL_TYPE = "kernel"
 UBOOT_EXTLINUX = "0"
 FIT_GENERATE_KEYS = "1"
 KERNEL_IMAGETYPE_REPLACEMENT = "zImage"
@@ -763,6 +764,7 @@ FIT_HASH_ALG = "sha256"
 
 kernel_load = str(get_bb_var('UBOOT_LOADADDRESS'))
 kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT'))
+kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE'))
 kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG'))
 uboot_arch = str(get_bb_var('UBOOT_ARCH'))
 fit_hash_alg = str(get_bb_var('FIT_HASH_ALG'))
@@ -775,7 +777,7 @@ FIT_HASH_ALG = "sha256"
 'kernel-1 {',
 'description = "Linux kernel";',
 'data = /incbin/("linux.bin");',
-'type = "kernel";',
+'type = "' + kernel_type + '";',
 'arch = "' + uboot_arch + '";',
 'os = "linux";',
 'compression = "' + kernel_compression + '";',
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168036): 
https://lists.openembedded.org/g/openembedded-core/message/168036
Mute This Topic: https://lists.openembedded.org/mt/92381737/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V3 0/1] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

2022-07-14 Thread Ming Liu
From: Ming Liu 

Changes in V3:
1 Fixed a oe-selftest failure.


Ming Liu (1):
  meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

 meta/classes/kernel-fitimage.bbclass | 2 +-
 meta/classes/kernel-uboot.bbclass| 3 +++
 meta/classes/kernel-uimage.bbclass   | 2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py | 4 +++-
 4 files changed, 8 insertions(+), 3 deletions(-)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168035): 
https://lists.openembedded.org/g/openembedded-core/message/168035
Mute This Topic: https://lists.openembedded.org/mt/92381734/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2 1/1] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

2022-07-09 Thread Ming Liu
From: Ming Liu 

Sometimes an end user might want to choose another kernel type argument
for uboot-mkimage other than "kernel", for instance: "kernel_noload".

Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that,
and it could be used by BSP layers as well.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 meta/classes/kernel-uboot.bbclass| 3 +++
 meta/classes/kernel-uimage.bbclass   | 2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py | 3 ++-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 7e09b075ff..2112ae4cfa 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -148,7 +148,7 @@ fitimage_emit_section_kernel() {
 kernel-$2 {
 description = "Linux kernel";
 data = /incbin/("$3");
-type = "kernel";
+type = "${UBOOT_MKIMAGE_KERNEL_TYPE}";
 arch = "${UBOOT_ARCH}";
 os = "linux";
 compression = "$4";
diff --git a/meta/classes/kernel-uboot.bbclass 
b/meta/classes/kernel-uboot.bbclass
index 2facade818..1bc98e042d 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -2,6 +2,9 @@
 FIT_KERNEL_COMP_ALG ?= "gzip"
 FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz"
 
+# Kernel image type passed to mkimage (i.e. kernel kernel_noload...)
+UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel"
+
 uboot_prep_kimage() {
if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
diff --git a/meta/classes/kernel-uimage.bbclass 
b/meta/classes/kernel-uimage.bbclass
index cedb4fa070..2e661ea916 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -30,6 +30,6 @@ do_uboot_mkimage() {
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
fi
 
-   uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a 
${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d 
linux.bin ${B}/arch/${ARCH}/boot/uImage
+   uboot-mkimage -A ${UBOOT_ARCH} -O linux -T ${UBOOT_MKIMAGE_KERNEL_TYPE} 
-C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n 
"${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
rm -f linux.bin
 }
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py 
b/meta/lib/oeqa/selftest/cases/fitimage.py
index e6bfd1257e..7e6479c9ca 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -763,6 +763,7 @@ FIT_HASH_ALG = "sha256"
 
 kernel_load = str(get_bb_var('UBOOT_LOADADDRESS'))
 kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT'))
+kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE'))
 kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG'))
 uboot_arch = str(get_bb_var('UBOOT_ARCH'))
 fit_hash_alg = str(get_bb_var('FIT_HASH_ALG'))
@@ -775,7 +776,7 @@ FIT_HASH_ALG = "sha256"
 'kernel-1 {',
 'description = "Linux kernel";',
 'data = /incbin/("linux.bin");',
-'type = "kernel";',
+'type = "' + kernel_type + '";',
 'arch = "' + uboot_arch + '";',
 'os = "linux";',
 'compression = "' + kernel_compression + '";',
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167837): 
https://lists.openembedded.org/g/openembedded-core/message/167837
Mute This Topic: https://lists.openembedded.org/mt/92268338/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2 0/1] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

2022-07-09 Thread Ming Liu
From: Ming Liu 

Changes in patch set V2:

1 Fix a wrong parameter mess pointed out by Alexandre Belloni.

Ming Liu (1):
  meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

 meta/classes/kernel-fitimage.bbclass | 2 +-
 meta/classes/kernel-uboot.bbclass| 3 +++
 meta/classes/kernel-uimage.bbclass   | 2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py | 3 ++-
 4 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167836): 
https://lists.openembedded.org/g/openembedded-core/message/167836
Mute This Topic: https://lists.openembedded.org/mt/92268337/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

2022-07-07 Thread Ming Liu
Hi, Alexandre:

Thanks for the review, I did not quite follow you, you meant the 'type'
argument being replaced wrongly? I dont see how. Could you share some
details about your comment?

//Ming Liu

Alexandre Belloni  於 2022年7月6日 週三 下午4:06寫道:

> Hello,
>
> On 06/07/2022 13:10:28+0200, Ming Liu wrote:
> > From: Ming Liu 
> >
> > Sometimes an end user might want to choose another kernel type argument
> > for uboot-mkimage other than "kernel", for instance: "kernel_noload".
> >
> > Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that,
> > and it could be used by BSP layers as well.
> >
> > Signed-off-by: Ming Liu 
> > ---
> >  meta/classes/kernel-fitimage.bbclass | 2 +-
> >  meta/classes/kernel-uboot.bbclass| 3 +++
> >  meta/classes/kernel-uimage.bbclass   | 2 +-
> >  meta/lib/oeqa/selftest/cases/fitimage.py | 3 ++-
> >  4 files changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/meta/classes/kernel-fitimage.bbclass
> b/meta/classes/kernel-fitimage.bbclass
> > index 7e09b075ff..2112ae4cfa 100644
> > --- a/meta/classes/kernel-fitimage.bbclass
> > +++ b/meta/classes/kernel-fitimage.bbclass
> > @@ -148,7 +148,7 @@ fitimage_emit_section_kernel() {
> >  kernel-$2 {
> >  description = "Linux kernel";
> >  data = /incbin/("$3");
> > -type = "kernel";
> > +type = "${UBOOT_MKIMAGE_KERNEL_TYPE}";
> >  arch = "${UBOOT_ARCH}";
> >  os = "linux";
> >  compression = "$4";
> > diff --git a/meta/classes/kernel-uboot.bbclass
> b/meta/classes/kernel-uboot.bbclass
> > index 2facade818..1bc98e042d 100644
> > --- a/meta/classes/kernel-uboot.bbclass
> > +++ b/meta/classes/kernel-uboot.bbclass
> > @@ -2,6 +2,9 @@
> >  FIT_KERNEL_COMP_ALG ?= "gzip"
> >  FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz"
> >
> > +# Kernel image type passed to mkimage (i.e. kernel kernel_noload...)
> > +UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel"
> > +
> >  uboot_prep_kimage() {
> >   if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
> >   vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
> > diff --git a/meta/classes/kernel-uimage.bbclass
> b/meta/classes/kernel-uimage.bbclass
> > index cedb4fa070..e116bf0265 100644
> > --- a/meta/classes/kernel-uimage.bbclass
> > +++ b/meta/classes/kernel-uimage.bbclass
> > @@ -30,6 +30,6 @@ do_uboot_mkimage() {
> >   awk '$3=="${UBOOT_ENTRYSYMBOL}" {print
> "0x"$1;exit}'`
> >   fi
> >
> > - uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C
> "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n
> "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
> > + uboot-mkimage -A ${UBOOT_ARCH} -O ${UBOOT_MKIMAGE_KERNEL_TYPE} -T
> kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n
> "${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
>
> I feel like you replace the wrong argument here.
>
> >   rm -f linux.bin
> >  }
> > diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py
> b/meta/lib/oeqa/selftest/cases/fitimage.py
> > index e6bfd1257e..7e6479c9ca 100644
> > --- a/meta/lib/oeqa/selftest/cases/fitimage.py
> > +++ b/meta/lib/oeqa/selftest/cases/fitimage.py
> > @@ -763,6 +763,7 @@ FIT_HASH_ALG = "sha256"
> >
> >  kernel_load = str(get_bb_var('UBOOT_LOADADDRESS'))
> >  kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT'))
> > +kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE'))
> >  kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG'))
> >  uboot_arch = str(get_bb_var('UBOOT_ARCH'))
> >  fit_hash_alg = str(get_bb_var('FIT_HASH_ALG'))
> > @@ -775,7 +776,7 @@ FIT_HASH_ALG = "sha256"
> >  'kernel-1 {',
> >  'description = "Linux kernel";',
> >  'data = /incbin/("linux.bin");',
> > -'type = "kernel";',
> > +'type = "' + kernel_type + '";',
> >  'arch = "' + uboot_arch + '";',
> >  'os = "linux";',
> >  'compression = "' + kernel_compression + '";',
> > --
> > 2.25.1
> >
>
> >
> > 
> >
>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167763): 
https://lists.openembedded.org/g/openembedded-core/message/167763
Mute This Topic: https://lists.openembedded.org/mt/92204115/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] meta: introduce UBOOT_MKIMAGE_KERNEL_TYPE

2022-07-06 Thread Ming Liu
From: Ming Liu 

Sometimes an end user might want to choose another kernel type argument
for uboot-mkimage other than "kernel", for instance: "kernel_noload".

Let's introduce a variable UBOOT_MKIMAGE_KERNEL_TYPE to support that,
and it could be used by BSP layers as well.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 meta/classes/kernel-uboot.bbclass| 3 +++
 meta/classes/kernel-uimage.bbclass   | 2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py | 3 ++-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 7e09b075ff..2112ae4cfa 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -148,7 +148,7 @@ fitimage_emit_section_kernel() {
 kernel-$2 {
 description = "Linux kernel";
 data = /incbin/("$3");
-type = "kernel";
+type = "${UBOOT_MKIMAGE_KERNEL_TYPE}";
 arch = "${UBOOT_ARCH}";
 os = "linux";
 compression = "$4";
diff --git a/meta/classes/kernel-uboot.bbclass 
b/meta/classes/kernel-uboot.bbclass
index 2facade818..1bc98e042d 100644
--- a/meta/classes/kernel-uboot.bbclass
+++ b/meta/classes/kernel-uboot.bbclass
@@ -2,6 +2,9 @@
 FIT_KERNEL_COMP_ALG ?= "gzip"
 FIT_KERNEL_COMP_ALG_EXTENSION ?= ".gz"
 
+# Kernel image type passed to mkimage (i.e. kernel kernel_noload...)
+UBOOT_MKIMAGE_KERNEL_TYPE ?= "kernel"
+
 uboot_prep_kimage() {
if [ -e arch/${ARCH}/boot/compressed/vmlinux ]; then
vmlinux_path="arch/${ARCH}/boot/compressed/vmlinux"
diff --git a/meta/classes/kernel-uimage.bbclass 
b/meta/classes/kernel-uimage.bbclass
index cedb4fa070..e116bf0265 100644
--- a/meta/classes/kernel-uimage.bbclass
+++ b/meta/classes/kernel-uimage.bbclass
@@ -30,6 +30,6 @@ do_uboot_mkimage() {
awk '$3=="${UBOOT_ENTRYSYMBOL}" {print "0x"$1;exit}'`
fi
 
-   uboot-mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C "${linux_comp}" -a 
${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n "${DISTRO_NAME}/${PV}/${MACHINE}" -d 
linux.bin ${B}/arch/${ARCH}/boot/uImage
+   uboot-mkimage -A ${UBOOT_ARCH} -O ${UBOOT_MKIMAGE_KERNEL_TYPE} -T 
kernel -C "${linux_comp}" -a ${UBOOT_LOADADDRESS} -e $ENTRYPOINT -n 
"${DISTRO_NAME}/${PV}/${MACHINE}" -d linux.bin ${B}/arch/${ARCH}/boot/uImage
rm -f linux.bin
 }
diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py 
b/meta/lib/oeqa/selftest/cases/fitimage.py
index e6bfd1257e..7e6479c9ca 100644
--- a/meta/lib/oeqa/selftest/cases/fitimage.py
+++ b/meta/lib/oeqa/selftest/cases/fitimage.py
@@ -763,6 +763,7 @@ FIT_HASH_ALG = "sha256"
 
 kernel_load = str(get_bb_var('UBOOT_LOADADDRESS'))
 kernel_entry = str(get_bb_var('UBOOT_ENTRYPOINT'))
+kernel_type = str(get_bb_var('UBOOT_MKIMAGE_KERNEL_TYPE'))
 kernel_compression = str(get_bb_var('FIT_KERNEL_COMP_ALG'))
 uboot_arch = str(get_bb_var('UBOOT_ARCH'))
 fit_hash_alg = str(get_bb_var('FIT_HASH_ALG'))
@@ -775,7 +776,7 @@ FIT_HASH_ALG = "sha256"
 'kernel-1 {',
 'description = "Linux kernel";',
 'data = /incbin/("linux.bin");',
-'type = "kernel";',
+'type = "' + kernel_type + '";',
 'arch = "' + uboot_arch + '";',
 'os = "linux";',
 'compression = "' + kernel_compression + '";',
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167719): 
https://lists.openembedded.org/g/openembedded-core/message/167719
Mute This Topic: https://lists.openembedded.org/mt/92204115/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] udev-extraconf: fix some systemd automount issues

2022-06-23 Thread Ming Liu
From: Ming Liu 

The '.include' syntax has been dropped from latest systemd releases,
we need drop the systemd-udevd.service here, introduce a postinst
function to add "MountFlags=shared" to systemd-udevd.service.

Also lsblk binary is being called in mount.sh automount_systemd
function, add it to RDEPENDS.

Signed-off-by: Ming Liu 
---
 .../udev/udev-extraconf/systemd-udevd.service |  3 ---
 meta/recipes-core/udev/udev-extraconf_1.1.bb  | 20 +++
 2 files changed, 12 insertions(+), 11 deletions(-)
 delete mode 100644 meta/recipes-core/udev/udev-extraconf/systemd-udevd.service

diff --git a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service 
b/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service
deleted file mode 100644
index a9b86eb6e4..00
--- a/meta/recipes-core/udev/udev-extraconf/systemd-udevd.service
+++ /dev/null
@@ -1,3 +0,0 @@
-.include @systemd_unitdir@/system/systemd-udevd.service
-[Service]
-MountFlags=shared
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb 
b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index ef6019259e..30f1fe76d0 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -11,7 +11,6 @@ SRC_URI = " \
file://autonet.rules \
file://network.sh \
file://localextra.rules \
-   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'file://systemd-udevd.service', '', d)} \
 "
 
 S = "${WORKDIR}"
@@ -36,16 +35,21 @@ do_install() {
 sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' 
${D}${sysconfdir}/udev/scripts/mount.sh
 
 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
+}
+
+pkg_postinst:${PN} () {
+   if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
+   sed -i "/\[Service\]/aMountFlags=shared" 
$D${systemd_unitdir}/system/systemd-udevd.service
+   fi
+}
 
-if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
-install -d ${D}${sysconfdir}/systemd/system
-install ${WORKDIR}/systemd-udevd.service 
${D}${sysconfdir}/systemd/system/systemd-udevd.service
-sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' 
${D}${sysconfdir}/systemd/system/systemd-udevd.service
-fi
+pkg_postrm:${PN} () {
+   if [ -e $D${systemd_unitdir}/system/systemd-udevd.service ]; then
+   sed -i "/MountFlags=shared/d" 
$D${systemd_unitdir}/system/systemd-udevd.service
+   fi
 }
 
-FILES:${PN} = "${sysconfdir}/udev ${@bb.utils.contains('DISTRO_FEATURES', 
'systemd', '${sysconfdir}/systemd/system/systemd-udevd.service', '', d)}"
-RDEPENDS:${PN} = "udev util-linux-blkid"
+RDEPENDS:${PN} = "udev util-linux-blkid 
${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'util-linux-lsblk', '', d)}"
 CONFFILES:${PN} = "${sysconfdir}/udev/mount.ignorelist"
 
 # to replace udev-extra-rules from meta-oe
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167283): 
https://lists.openembedded.org/g/openembedded-core/message/167283
Mute This Topic: https://lists.openembedded.org/mt/91950311/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] udev-extraconf: let automount base directory configurable

2022-06-06 Thread Ming Liu
From: Ming Liu 

Dont hard-code automount base directory to '/run/media', introduce a
variable MOUNT_BASE to let it configurable, like in udisks2 the mount
base is also configurable by setting option: --enable-fhs-media.

Signed-off-by: Ming Liu 
---
 .../recipes-core/udev/udev-extraconf/mount.sh | 25 ++-
 meta/recipes-core/udev/udev-extraconf_1.1.bb  |  2 ++
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh 
b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 5ba66e98e2..c8b773bc07 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -6,6 +6,7 @@
 
 BASE_INIT="`readlink -f "@base_sbindir@/init"`"
 INIT_SYSTEMD="@systemd_unitdir@/systemd"
+MOUNT_BASE="@MOUNT_BASE@"
 
 if [ "x$BASE_INIT" = "x$INIT_SYSTEMD" ];then
 # systemd as init uses systemd-mount to mount block devices
@@ -40,7 +41,7 @@ automount_systemd() {
 
 # Skip already mounted partitions
 if [ -f /run/systemd/transient/run-media-$name.mount ]; then
-logger "mount.sh/automount" "/run/media/$name already mounted"
+logger "mount.sh/automount" "$MOUNT_BASE/$name already mounted"
 return
 fi
 
@@ -53,7 +54,7 @@ automount_systemd() {
 grep "^[[:space:]]*$tmp" /etc/fstab && return
 done
 
-[ -d "/run/media/$name" ] || mkdir -p "/run/media/$name"
+[ -d "$MOUNT_BASE/$name" ] || mkdir -p "$MOUNT_BASE/$name"
 
 MOUNT="$MOUNT -o silent"
 
@@ -70,12 +71,12 @@ automount_systemd() {
 ;;
 esac
 
-if ! $MOUNT --no-block -t auto $DEVNAME "/run/media/$name"
+if ! $MOUNT --no-block -t auto $DEVNAME "$MOUNT_BASE/$name"
 then
-#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"/run/media/$name\" failed!"
-rm_dir "/run/media/$name"
+#logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"$MOUNT_BASE/$name\" failed!"
+rm_dir "$MOUNT_BASE/$name"
 else
-logger "mount.sh/automount" "Auto-mount of [/run/media/$name] 
successful"
+logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] 
successful"
 touch "/tmp/.automount-$name"
 fi
 }
@@ -93,7 +94,7 @@ automount() {
# configured in fstab
grep -q "^$DEVNAME " /proc/mounts && return
 
-   ! test -d "/run/media/$name" && mkdir -p "/run/media/$name"
+   ! test -d "$MOUNT_BASE/$name" && mkdir -p "$MOUNT_BASE/$name"
# Silent util-linux's version of mounting auto
if [ "x`readlink $MOUNT`" = "x/bin/mount.util-linux" ] ;
then
@@ -113,12 +114,12 @@ automount() {
;;
esac
 
-   if ! $MOUNT -t auto $DEVNAME "/run/media/$name"
+   if ! $MOUNT -t auto $DEVNAME "$MOUNT_BASE/$name"
then
-   #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"/run/media/$name\" failed!"
-   rm_dir "/run/media/$name"
+   #logger "mount.sh/automount" "$MOUNT -t auto $DEVNAME 
\"$MOUNT_BASE/$name\" failed!"
+   rm_dir "$MOUNT_BASE/$name"
else
-   logger "mount.sh/automount" "Auto-mount of [/run/media/$name] 
successful"
+   logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] 
successful"
touch "/tmp/.automount-$name"
fi
 }
@@ -157,5 +158,5 @@ if [ "$ACTION" = "remove" ] || [ "$ACTION" = "change" ] && 
[ -x "$UMOUNT" ] && [
 
 # Remove empty directories from auto-mounter
 name="`basename "$DEVNAME"`"
-test -e "/tmp/.automount-$name" && rm_dir "/run/media/$name"
+test -e "/tmp/.automount-$name" && rm_dir "$MOUNT_BASE/$name"
 fi
diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb 
b/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 7da04379c0..2b908ac05b 100644
--- a/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -15,6 +15,7 @@ SRC_URI = " \
 
 S = "${WORKDIR}"
 
+MOUNT_BASE = "/run/media"
 
 do_install() {
 install -d ${D}${sysconfdir}/udev/rules.d
@@ -31,6 +32,7 @@ do_install() {
 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
 sed -i 's|@systemd_unitdir@|${systemd_unitdir}|g' 
${D}${sysconfdir}/udev/scripts/mount.sh
 sed -i 's|@base_sbindir@|${base_sbindir}|g' 
${D}${sysconfdir}/udev/scripts/mount.sh
+sed -i 's|@MOUNT_BASE@|${MOUNT_BASE}|g' 
${D}${sysconfdir}/udev/scripts/mount.sh
 
 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
 }
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#166588): 
https://lists.openembedded.org/g/openembedded-core/message/166588
Mute This Topic: https://lists.openembedded.org/mt/91573445/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [kirkstone] [PATCH 1/1] mmc-utils: upgrade to latest revision

2022-05-17 Thread Ming Liu
Yes, this only occurs on 5.4 kernel, will CC to you next time for kirkstone
patches.

//Ming Liu

Steve Sakoman  於 2022年5月16日 週一 下午4:29寫道:

> On Sun, May 15, 2022 at 9:17 PM Ming Liu  wrote:
>
> > Our products are based on LTS kirkstone, we found a build issue of
> mmc-utils, which has been fixed by
> https://kernel.googlesource.com/pub/scm/utils/mmc/mmc-utils/+/0d493fb091b592bde6004a618c28f1c3619af1a4
>
> So this error only occurs if you are using a BSP with a 5.4 kernel?
> That would explain why I don't see this in my testing, since it uses
> only 5.10 and 5.15
>
> BTW, for future kirkstone patches you should cc me instead of Richard
> since I am the kirkstone maintainer.
>
> > this uplift only involves in two commits including the above fix:
> >
> > ```
> > b7e4d5a mmc-utils: Add General command CMD56 read support
> > 0d493fb mmc-utils: Fix build error MMC_BLOCK_MAJOR undeclared
> > ```
> >
> > considering kirkstone mmc-utils recipe fetches mmc-utils master branch
> and does not stick to any release tag, so I think we can uplift mmc-utils
> to the latest rather than backport that fix to kirkstone.
>
> This seems reasonable to me. I will add this patch to my test queue
> and edit the commit message to include the above information.
>
> Steve
>
> >  於 2022年5月15日 週日 下午11:42寫道:
> >>
> >> On Sun, 2022-05-15 at 14:43 +0200, liu.min...@gmail.com wrote:
> >> > From: Alexander Kanavin 
> >> >
> >> > Signed-off-by: Alexander Kanavin 
> >> > Signed-off-by: Luca Ceresoli 
> >> > Signed-off-by: Richard Purdie 
> >> > (cherry picked from commit d98b06c9c6f480de1e5167bfe8392e39300fc02c)
> >> > Signed-off-by: Ming Liu 
> >> > ---
> >> >  meta/recipes-devtools/mmc/mmc-utils_git.bb | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >>
> >> Why does kirkstone need this though?
> >>
> >> Cheers,
> >>
> >> Richard
> >
> >
> > 
> >
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#165710): 
https://lists.openembedded.org/g/openembedded-core/message/165710
Mute This Topic: https://lists.openembedded.org/mt/91117508/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [kirkstone] [PATCH 1/1] mmc-utils: upgrade to latest revision

2022-05-16 Thread Ming Liu
Hi, Richard:

Our products are based on LTS kirkstone, we found a build issue of
mmc-utils, which has been fixed by
https://kernel.googlesource.com/pub/scm/utils/mmc/mmc-utils/+/0d493fb091b592bde6004a618c28f1c3619af1a4

this uplift only involves in two commits including the above fix:

```
b7e4d5a mmc-utils: Add General command CMD56 read support
0d493fb mmc-utils: Fix build error MMC_BLOCK_MAJOR undeclared
```

considering kirkstone mmc-utils recipe fetches mmc-utils master branch and
does not stick to any release tag, so I think we can uplift mmc-utils to
the latest rather than backport that fix to kirkstone.

//Ming Liu


 於 2022年5月15日 週日 下午11:42寫道:

> On Sun, 2022-05-15 at 14:43 +0200, liu.min...@gmail.com wrote:
> > From: Alexander Kanavin 
> >
> > Signed-off-by: Alexander Kanavin 
> > Signed-off-by: Luca Ceresoli 
> > Signed-off-by: Richard Purdie 
> > (cherry picked from commit d98b06c9c6f480de1e5167bfe8392e39300fc02c)
> > Signed-off-by: Ming Liu 
> > ---
> >  meta/recipes-devtools/mmc/mmc-utils_git.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> Why does kirkstone need this though?
>
> Cheers,
>
> Richard
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#165665): 
https://lists.openembedded.org/g/openembedded-core/message/165665
Mute This Topic: https://lists.openembedded.org/mt/91117508/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 1/1] mmc-utils: upgrade to latest revision

2022-05-15 Thread Ming Liu
From: Alexander Kanavin 

Signed-off-by: Alexander Kanavin 
Signed-off-by: Luca Ceresoli 
Signed-off-by: Richard Purdie 
(cherry picked from commit d98b06c9c6f480de1e5167bfe8392e39300fc02c)
Signed-off-by: Ming Liu 
---
 meta/recipes-devtools/mmc/mmc-utils_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/mmc/mmc-utils_git.bb 
b/meta/recipes-devtools/mmc/mmc-utils_git.bb
index addefe9abf..3e611d1306 100644
--- a/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -5,7 +5,7 @@ LICENSE = "GPL-2.0-only"
 LIC_FILES_CHKSUM = 
"file://mmc.c;beginline=1;endline=20;md5=fae32792e20f4d27ade1c5a762d16b7d"
 
 SRCBRANCH ?= "master"
-SRCREV = "4303889c8bd9a2357587eb6ebacecb70098a264d"
+SRCREV = "b7e4d5a6ae9942d26a11de9b05ae7d52c0802802"
 
 PV = "0.1+git${SRCPV}"
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#165602): 
https://lists.openembedded.org/g/openembedded-core/message/165602
Mute This Topic: https://lists.openembedded.org/mt/91117508/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [kirkstone] [PATCH 0/1] Fix a compilation issue of mmc-utils

2022-05-15 Thread Ming Liu
From: Ming Liu 

Update mmc-utils to the latest git hash to fix a compilation issue,
which was observed on kirkstone when the kernel 5.4 is being used.

Alexander Kanavin (1):
  mmc-utils: upgrade to latest revision

 meta/recipes-devtools/mmc/mmc-utils_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#165601): 
https://lists.openembedded.org/g/openembedded-core/message/165601
Mute This Topic: https://lists.openembedded.org/mt/91117505/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/2] kernel-fitimage.bbclass: introduce FIT_SUPPORTED_INITRAMFS_FSTYPES

2022-03-28 Thread Ming Liu
From: Ming Liu 

It was found when a end user wants to build a squashfs type initramfs
into fitimage, it just fails without printing out any error or warning
messages, which is not right.

Introduce a FIT_SUPPORTED_INITRAMFS_FSTYPES variable to avoid
hard-coding the supported initramfs types, and it could be overridden
in config files. Also break the build when none of a supported
initramfs type is found.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 13af4daafc..f28c943860 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -65,6 +65,8 @@ FIT_SIGN_INDIVIDUAL ?= "0"
 FIT_CONF_PREFIX ?= "conf-"
 FIT_CONF_PREFIX[doc] = "Prefix to use for FIT configuration node name"
 
+FIT_SUPPORTED_INITRAMFS_FSTYPES ?= "cpio.lz4 cpio.lzo cpio.lzma cpio.xz 
cpio.zst cpio.gz ext2.gz cpio"
+
 # Keys used to sign individually image nodes.
 # The keys to sign image nodes must be different from those used to sign
 # configuration nodes, otherwise the "required" property, from
@@ -566,16 +568,22 @@ fitimage_assemble() {
#
if [ "x${ramdiskcount}" = "x1" ] && [ "${INITRAMFS_IMAGE_BUNDLE}" != 
"1" ]; then
# Find and use the first initramfs image archive type we find
-   for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz 
ext2.gz cpio; do
+   found=
+   for img in ${FIT_SUPPORTED_INITRAMFS_FSTYPES}; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img"
if [ -e "$initramfs_path" ]; then
bbnote "Found initramfs image: $initramfs_path"
+   found=true
fitimage_emit_section_ramdisk $1 
"$ramdiskcount" "$initramfs_path"
break
else
bbnote "Did not find initramfs image: 
$initramfs_path"
fi
done
+
+   if [ -z "$found" ]; then
+   bbfatal "Could not find a valid initramfs type for 
${INITRAMFS_IMAGE_NAME}, the supported types are: 
${FIT_SUPPORTED_INITRAMFS_FSTYPES}"
+   fi
fi
 
fitimage_emit_section_maint $1 sectend
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163709): 
https://lists.openembedded.org/g/openembedded-core/message/163709
Mute This Topic: https://lists.openembedded.org/mt/90085467/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/2] kernel-fitimage.bbclass: change 'echo' to 'bbnote'

2022-03-28 Thread Ming Liu
From: Ming Liu 

Change 'echo' usages to 'bbnote' for better logging.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index df5de0427b..13af4daafc 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -568,13 +568,12 @@ fitimage_assemble() {
# Find and use the first initramfs image archive type we find
for img in cpio.lz4 cpio.lzo cpio.lzma cpio.xz cpio.zst cpio.gz 
ext2.gz cpio; do

initramfs_path="${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE_NAME}.$img"
-   echo -n "Searching for $initramfs_path..."
if [ -e "$initramfs_path" ]; then
-   echo "found"
+   bbnote "Found initramfs image: $initramfs_path"
fitimage_emit_section_ramdisk $1 
"$ramdiskcount" "$initramfs_path"
break
else
-   echo "not found"
+   bbnote "Did not find initramfs image: 
$initramfs_path"
fi
done
fi
@@ -686,12 +685,12 @@ do_kernel_generate_rsa_keys() {
# make directory if it does not already exist
mkdir -p "${UBOOT_SIGN_KEYDIR}"
 
-   echo "Generating RSA private key for signing fitImage"
+   bbnote "Generating RSA private key for signing fitImage"
openssl genrsa ${FIT_KEY_GENRSA_ARGS} -out \

"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key \
"${FIT_SIGN_NUMBITS}"
 
-   echo "Generating certificate for signing fitImage"
+   bbnote "Generating certificate for signing fitImage"
openssl req ${FIT_KEY_REQ_ARGS} "${FIT_KEY_SIGN_PKCS}" \
-key 
"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key \
-out 
"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".crt
@@ -704,12 +703,12 @@ do_kernel_generate_rsa_keys() {
# make directory if it does not already exist
mkdir -p "${UBOOT_SIGN_KEYDIR}"
 
-   echo "Generating RSA private key for signing fitImage"
+   bbnote "Generating RSA private key for signing fitImage"
openssl genrsa ${FIT_KEY_GENRSA_ARGS} -out \

"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".key \
"${FIT_SIGN_NUMBITS}"
 
-   echo "Generating certificate for signing fitImage"
+   bbnote "Generating certificate for signing fitImage"
openssl req ${FIT_KEY_REQ_ARGS} "${FIT_KEY_SIGN_PKCS}" \
-key 
"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".key \
-out 
"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_IMG_KEYNAME}".crt
@@ -725,13 +724,13 @@ kernel_do_deploy:append() {
if echo ${KERNEL_IMAGETYPES} | grep -wq "fitImage"; then
 
if [ "${INITRAMFS_IMAGE_BUNDLE}" != "1" ]; then
-   echo "Copying fit-image.its source file..."
+   bbnote "Copying fit-image.its source file..."
install -m 0644 ${B}/fit-image.its 
"$deployDir/fitImage-its-${KERNEL_FIT_NAME}.its"
if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then
ln -snf fitImage-its-${KERNEL_FIT_NAME}.its 
"$deployDir/fitImage-its-${KERNEL_FIT_LINK_NAME}"
fi
 
-   echo "Copying linux.bin file..."
+   bbnote "Copying linux.bin file..."
install -m 0644 ${B}/linux.bin 
$deployDir/fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT}
if [ -n "${KERNEL_FIT_LINK_NAME}" ] ; then
ln -snf 
fitImage-linux.bin-${KERNEL_FIT_NAME}${KERNEL_FIT_BIN_EXT} 
"$deployDir/fitImage-linux.bin-${KERNEL_FIT_LINK_NAME}"
@@ -739,14 +738,14 @@ kernel_do_deploy:append() {
fi
 
if [ -n "${INITRAMFS_IMAGE}" ]; then
-   echo "Copying fit-image-

[OE-core] [PATCH 0/2] Some kernel fitimage build fixes

2022-03-28 Thread Ming Liu
From: Ming Liu 

Ming Liu (2):
  kernel-fitimage.bbclass: change 'echo' to 'bbnote'
  kernel-fitimage.bbclass: introduce FIT_SUPPORTED_INITRAMFS_FSTYPES

 meta/classes/kernel-fitimage.bbclass | 35 +---
 1 file changed, 21 insertions(+), 14 deletions(-)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163707): 
https://lists.openembedded.org/g/openembedded-core/message/163707
Mute This Topic: https://lists.openembedded.org/mt/90085464/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel-fitimage.bbclass: introduce get_fit_replacement_type function

2022-03-19 Thread Ming Liu
From: Ming Liu 

Avoid to set KERNEL_IMAGETYPE_REPLACEMENT in anonymous python function,
otherwise it chould not be overridden in config files, for instance,
it's being set now in meta/lib/oeqa/selftest/cases/fitimage.py.

Introduce a get_fit_replacement_type function to get the default value
of KERNEL_IMAGETYPE_REPLACEMENT, and it could be overridden in config
files.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 8a9b195d6e..df5de0427b 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -1,14 +1,9 @@
 inherit kernel-uboot kernel-artifact-names uboot-sign
 
-KERNEL_IMAGETYPE_REPLACEMENT = ""
-
-python __anonymous () {
+def get_fit_replacement_type(d):
 kerneltypes = d.getVar('KERNEL_IMAGETYPES') or ""
+replacementtype = ""
 if 'fitImage' in kerneltypes.split():
-depends = d.getVar("DEPENDS")
-depends = "%s u-boot-tools-native dtc-native" % depends
-d.setVar("DEPENDS", depends)
-
 uarch = d.getVar("UBOOT_ARCH")
 if uarch == "arm64":
 replacementtype = "Image"
@@ -22,15 +17,18 @@ python __anonymous () {
 replacementtype = "linux.bin"
 else:
 replacementtype = "zImage"
+return replacementtype
 
-d.setVar("KERNEL_IMAGETYPE_REPLACEMENT", replacementtype)
+KERNEL_IMAGETYPE_REPLACEMENT ?= "${@get_fit_replacement_type(d)}"
+DEPENDS:append = " ${@'u-boot-tools-native dtc-native' if 'fitImage' in 
(d.getVar('KERNEL_IMAGETYPES') or '').split() else ''}"
 
+python __anonymous () {
 # Override KERNEL_IMAGETYPE_FOR_MAKE variable, which is internal
 # to kernel.bbclass . We have to override it, since we pack zImage
 # (at least for now) into the fitImage .
 typeformake = d.getVar("KERNEL_IMAGETYPE_FOR_MAKE") or ""
 if 'fitImage' in typeformake.split():
-d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', replacementtype))
+d.setVar('KERNEL_IMAGETYPE_FOR_MAKE', 
typeformake.replace('fitImage', d.getVar('KERNEL_IMAGETYPE_REPLACEMENT')))
 
 image = d.getVar('INITRAMFS_IMAGE')
 if image:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163468): 
https://lists.openembedded.org/g/openembedded-core/message/163468
Mute This Topic: https://lists.openembedded.org/mt/89887420/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] weston-init: add use-pixman PACKAGECONFIG

2022-03-12 Thread Ming Liu
From: Ming Liu 

Fbdev backend has been deprecated since weston 10.0.0, and it could be
replaced by passing --use-pixman to drm backend, add a use-pixman
PACKAGECONFIG for convenience.

Signed-off-by: Ming Liu 
---
 meta/recipes-graphics/wayland/weston-init.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb 
b/meta/recipes-graphics/wayland/weston-init.bb
index 8e8c0454be..c34582137d 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -17,6 +17,7 @@ S = "${WORKDIR}"
 PACKAGECONFIG ??= ""
 
 PACKAGECONFIG[no-idle-timeout] = ",,"
+PACKAGECONFIG[use-pixman] = ",,"
 
 DEFAULTBACKEND ??= ""
 DEFAULTBACKEND:qemuall ?= "drm"
@@ -51,6 +52,10 @@ do_install() {
sed -i -e "/^\[core\]/a idle-time=0" 
${D}${sysconfdir}/xdg/weston/weston.ini
fi
 
+   if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', 
d)}" = "yes" ]; then
+   sed -i -e "/^\[core\]/a use-pixman=true" 
${D}${sysconfdir}/xdg/weston/weston.ini
+   fi
+
install -dm 755 -o weston -g weston ${D}/home/weston
 }
 
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163090): 
https://lists.openembedded.org/g/openembedded-core/message/163090
Mute This Topic: https://lists.openembedded.org/mt/89731972/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] image.bbclass: make sure do_rootfs run from a clean workspace

2022-03-12 Thread Ming Liu
From: Ming Liu 

Add ${IMAGE_ROOTFS} and ${IMGDEPLOYDIR} to do_rootfs[dirs] and
do_rootfs[cleandirs], this ensures do_rootfs run from a clean
workspace, with this change, we can now remove two bb.utils.mkdirhier
lines from meta/lib/oe/rootfs.py.

Also drop ${S} from do_rootfs[cleandirs], nothing being installed into
that directory.

Signed-off-by: Ming Liu 
---
 meta/classes/image.bbclass | 4 ++--
 meta/lib/oe/rootfs.py  | 4 
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 2b0ce4a988..98a0555040 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -252,8 +252,8 @@ fakeroot python do_rootfs () {
 
 progress_reporter.finish()
 }
-do_rootfs[dirs] = "${TOPDIR}"
-do_rootfs[cleandirs] += "${S} ${IMGDEPLOYDIR}"
+do_rootfs[dirs] = "${IMAGE_ROOTFS} ${IMGDEPLOYDIR} ${TOPDIR}"
+do_rootfs[cleandirs] += "${IMAGE_ROOTFS} ${IMGDEPLOYDIR}"
 do_rootfs[file-checksums] += "${POSTINST_INTERCEPT_CHECKSUMS}"
 addtask rootfs after do_prepare_recipe_sysroot
 
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index b0dd625539..98cf3f244d 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -190,10 +190,6 @@ class Rootfs(object, metaclass=ABCMeta):
 post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND")
 rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND')
 
-bb.utils.mkdirhier(self.image_rootfs)
-
-bb.utils.mkdirhier(self.deploydir)
-
 execute_pre_post_process(self.d, pre_process_cmds)
 
 if self.progress_reporter:
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#163087): 
https://lists.openembedded.org/g/openembedded-core/message/163087
Mute This Topic: https://lists.openembedded.org/mt/89730153/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2 1/1] depmodwrapper-cross: add config directory option

2022-02-24 Thread Ming Liu
From: Oleksandr Suvorov 

Native depmod by default try to find config files from the following
directories:
```
${STAGING_ETCDIR_NATIVE}/depmod.d
/run/depmod.d
/usr/local/lib/depmod.d
/lib/depmod.d
```

but none of them is correct, change to load config files from
${sysconfdir}/depmod.d of basedir.

Signed-off-by: Oleksandr Suvorov 
Signed-off-by: Ming Liu 
---
 meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb 
b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 9a172675af..04fc14a6d2 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -32,9 +32,9 @@ fi
 
 if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != 
"\$4" ]; then
 echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
-exec env depmod "\$1" "\$2" "\$3" "\$4"
+exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" "\$4"
 else
-exec env depmod "\$1" "\$2" "\$3" -F 
"${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
+exec env depmod -C "\$3${sysconfdir}/depmod.d" "\$1" "\$2" "\$3" -F 
"${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
 fi
 EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162307): 
https://lists.openembedded.org/g/openembedded-core/message/162307
Mute This Topic: https://lists.openembedded.org/mt/89361870/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2 0/1] depmodwrapper-cross: add config directory option

2022-02-24 Thread Ming Liu
From: Ming Liu 

Changes in V2:
- Replace hard-coded /etc to ${sysconfdir}

Oleksandr Suvorov (1):
  depmodwrapper-cross: add config directory option

 meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162306): 
https://lists.openembedded.org/g/openembedded-core/message/162306
Mute This Topic: https://lists.openembedded.org/mt/89361869/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core]] depmodwrapper-cross: add config directory option

2022-02-24 Thread Ming Liu
From: Oleksandr Suvorov 

Native depmod by default try to find config files from the following
directories:
```
${STAGING_ETCDIR_NATIVE}/depmod.d
/run/depmod.d
/usr/local/lib/depmod.d
/lib/depmod.d
```

but none of them is correct, change to load config files from
${sysconfdir}/depmod.d of basedir.

Signed-off-by: Oleksandr Suvorov 
Signed-off-by: Ming Liu 
---
 meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb 
b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 9a172675af..14fb8ff612 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -32,9 +32,9 @@ fi
 
 if [ ! -r ${PKGDATA_DIR}/kernel-depmod/System.map-\$4 ] || [ "\$kernelabi" != 
"\$4" ]; then
 echo "Unable to read: ${PKGDATA_DIR}/kernel-depmod/System.map-\$4" >&2
-exec env depmod "\$1" "\$2" "\$3" "\$4"
+exec env depmod -C "\$3/etc/depmod.d" "\$1" "\$2" "\$3" "\$4"
 else
-exec env depmod "\$1" "\$2" "\$3" -F 
"${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
+exec env depmod -C "\$3/etc/depmod.d" "\$1" "\$2" "\$3" -F 
"${PKGDATA_DIR}/kernel-depmod/System.map-\$4" "\$4"
 fi
 EOF
chmod +x ${D}${bindir_crossscripts}/depmodwrapper
-- 
2.25.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#162305): 
https://lists.openembedded.org/g/openembedded-core/message/162305
Mute This Topic: https://lists.openembedded.org/mt/89361597/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] Revert "libubootenv: inherit uboot-config"

2021-07-07 Thread Ming Liu
@Otavio Salvador 

libubootenv will fall back to read environment from /etc/u-boot-initial-env
if loading /etc/fw_env.config fails, so attempt to say it's not too wrong.

To avoid world build failures, maybe set EXCLUDE_FROM_WORLD = "1"?

//Ming Liu

Otavio Salvador  於 2021年7月6日 週二 下午6:56寫道:

>
>
> Em ter., 6 de jul. de 2021 às 12:12, Peter Bergin 
> escreveu:
>
>> Then I can correct my earlier statement and a new wisdom that run-time
>> dependecies are scanned already in the early phases. Apparently it is
>> not possible to build libubootenv due to RRECOMMENDS to
>> u-boot-default-env. The build for a 'non-u-boot config' will fail if we
>> add 'inherit uboot-config' and it will fail without. What is the
>> difference for a 'world' build?
>>
>
> The dependency on the default-env seems too strong. It could be relaxed as
> it works without it.
>
> --
> Otavio Salvador O.S. Systems
> http://www.ossystems.com.brhttp://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854  Mobile: +1 (347) 903-9750
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#153635): 
https://lists.openembedded.org/g/openembedded-core/message/153635
Mute This Topic: https://lists.openembedded.org/mt/83938334/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] uboot-sign.bbclass: fix some install commands

2021-06-21 Thread Ming Liu
From: Ming Liu 

A "install -d" command is missing when dealing with
${UBOOT_NODTB_BINARY} in install_spl_helper function, this can lead
to invalid install error saying:

| install: cannot create .../usr/share/u-boot-nodtb-2021.04-r0.bin': No such 
file or directory

Let's drop all "install -d" and replace them with "install -Dm" in
install_helper/install_spl_helper functions.

Signed-off-by: Ming Liu 
---
 meta/classes/uboot-sign.bbclass | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index 29b2edc833..9671cf76a5 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -196,10 +196,9 @@ concat_spl_dtb() {
 # signing, and kernel will deploy UBOOT_DTB_BINARY after signs it.
 install_helper() {
if [ -f "${UBOOT_DTB_BINARY}" ]; then
-   install -d ${D}${datadir}
# UBOOT_DTB_BINARY is a symlink to UBOOT_DTB_IMAGE, so we
# need both of them.
-   install ${UBOOT_DTB_BINARY} ${D}${datadir}/${UBOOT_DTB_IMAGE}
+   install -Dm 0644 ${UBOOT_DTB_BINARY} 
${D}${datadir}/${UBOOT_DTB_IMAGE}
ln -sf ${UBOOT_DTB_IMAGE} ${D}${datadir}/${UBOOT_DTB_BINARY}
else
bbwarn "${UBOOT_DTB_BINARY} not found"
@@ -209,14 +208,13 @@ install_helper() {
 # Install SPL dtb and u-boot nodtb to datadir, 
 install_spl_helper() {
if [ -f "${SPL_DIR}/${SPL_DTB_BINARY}" ]; then
-   install -d ${D}${datadir}
-   install ${SPL_DIR}/${SPL_DTB_BINARY} 
${D}${datadir}/${SPL_DTB_IMAGE}
+   install -Dm 0644 ${SPL_DIR}/${SPL_DTB_BINARY} 
${D}${datadir}/${SPL_DTB_IMAGE}
ln -sf ${SPL_DTB_IMAGE} ${D}${datadir}/${SPL_DTB_BINARY}
else
bbwarn "${SPL_DTB_BINARY} not found"
fi
if [ -f "${UBOOT_NODTB_BINARY}" ] ; then
-   install ${UBOOT_NODTB_BINARY} 
${D}${datadir}/${UBOOT_NODTB_IMAGE}
+   install -Dm 0644 ${UBOOT_NODTB_BINARY} 
${D}${datadir}/${UBOOT_NODTB_IMAGE}
ln -sf ${UBOOT_NODTB_IMAGE} ${D}${datadir}/${UBOOT_NODTB_BINARY}
else
bbwarn "${UBOOT_NODTB_BINARY} not found"
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#153132): 
https://lists.openembedded.org/g/openembedded-core/message/153132
Mute This Topic: https://lists.openembedded.org/mt/83686054/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [REDEND] [ OE-core] [PATCH] u-boot-tools: fix a mkimage signature issue

2021-06-21 Thread Ming Liu
From: Ming Liu 

A following error was observed:
| Can't write signature for 'signature@1' signature node in 
'c...@imx6ull-colibri-wifi-eval-v3.dtb' conf node: 
| uboot-mkimage Can't add hashes to FIT blob: -1

This is caused by a wrong return value being used in uboot source.

The return value '-ENOSPC' of fit_set_timestamp function does not match
the caller fit_image_write_sig's expection which is '-FDT_ERR_NOSPACE'.

Fix it by not calling fit_set_timestamp, but call fdt_setprop instead.

Signed-off-by: Ming Liu 
---
 ...ls-image-host-fix-wrong-return-value.patch | 41 +++
 .../u-boot/u-boot-tools_2021.04.bb|  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 
meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch

diff --git 
a/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
 
b/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
new file mode 100644
index 00..81687203e4
--- /dev/null
+++ 
b/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
@@ -0,0 +1,41 @@
+From 77fe3ad2ab2953ccdf6e9417cbecc060b45d3e55 Mon Sep 17 00:00:00 2001
+From: Ming Liu 
+Date: Sun, 30 May 2021 10:32:08 +0200
+Subject: [PATCH] tools: image-host: fix wrong return value
+
+The return value '-ENOSPC' of fit_set_timestamp function does not match
+the caller fit_image_write_sig's expection which is '-FDT_ERR_NOSPACE'.
+
+Fix it by not calling fit_set_timestamp, but call fdt_setprop instead.
+
+This fixes a following mkimage error:
+| Can't write signature for 'signature@1' signature node in
+| 'c...@imx6ull-colibri-wifi-eval-v3.dtb' conf node: 
+| mkimage Can't add hashes to FIT blob: -1
+
+Upstream-Status: Submitted [ 
https://patchwork.ozlabs.org/project/uboot/patch/20210531070451.6561-1-liu.min...@gmail.com
 ]
+
+Signed-off-by: Ming Liu 
+---
+ tools/image-host.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tools/image-host.c b/tools/image-host.c
+index 270d36fe45..73095461a7 100644
+--- a/tools/image-host.c
 b/tools/image-host.c
+@@ -132,8 +132,10 @@ static int fit_image_write_sig(void *fit, int noffset, 
uint8_t *value,
+   if (!ret) {
+   time_t timestamp = imagetool_get_source_date(cmdname,
+time(NULL));
++  uint32_t t = cpu_to_uimage(timestamp);
+ 
+-  ret = fit_set_timestamp(fit, noffset, timestamp);
++  ret = fdt_setprop(fit, noffset, FIT_TIMESTAMP_PROP, ,
++  sizeof(uint32_t));
+   }
+   if (region_prop && !ret) {
+   uint32_t strdata[2];
+-- 
+2.29.0
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb 
b/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb
index ef386f76e6..4e90081911 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb
@@ -1,3 +1,4 @@
 require u-boot-common.inc
 require u-boot-tools.inc
 
+SRC_URI_append = " file://0001-tools-image-host-fix-wrong-return-value.patch"
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#153131): 
https://lists.openembedded.org/g/openembedded-core/message/153131
Mute This Topic: https://lists.openembedded.org/mt/83685911/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] u-boot-tools: fix a mkimage signature issue

2021-05-31 Thread Ming Liu
From: Ming Liu 

A following error was observed:
| Can't write signature for 'signature@1' signature node in 
'c...@imx6ull-colibri-wifi-eval-v3.dtb' conf node: 
| uboot-mkimage Can't add hashes to FIT blob: -1

This is caused by a wrong return value being used in uboot source.

The return value '-ENOSPC' of fit_set_timestamp function does not match
the caller fit_image_write_sig's expection which is '-FDT_ERR_NOSPACE'.

Fix it by not calling fit_set_timestamp, but call fdt_setprop instead.

Signed-off-by: Ming Liu 
---
 ...ls-image-host-fix-wrong-return-value.patch | 41 +++
 .../u-boot/u-boot-tools_2021.04.bb|  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 
meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch

diff --git 
a/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
 
b/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
new file mode 100644
index 00..c665c81b61
--- /dev/null
+++ 
b/meta/recipes-bsp/u-boot/files/0001-tools-image-host-fix-wrong-return-value.patch
@@ -0,0 +1,41 @@
+From 77fe3ad2ab2953ccdf6e9417cbecc060b45d3e55 Mon Sep 17 00:00:00 2001
+From: Ming Liu 
+Date: Sun, 30 May 2021 10:32:08 +0200
+Subject: [PATCH] tools: image-host: fix wrong return value
+
+The return value '-ENOSPC' of fit_set_timestamp function does not match
+the caller fit_image_write_sig's expection which is '-FDT_ERR_NOSPACE'.
+
+Fix it by not calling fit_set_timestamp, but call fdt_setprop instead.
+
+This fixes a following mkimage error:
+| Can't write signature for 'signature@1' signature node in
+| 'c...@imx6ull-colibri-wifi-eval-v3.dtb' conf node: 
+| mkimage Can't add hashes to FIT blob: -1
+
+Upstream-Status: Submitted [ Sent to u-b...@lists.denx.de on 2021-05-31 ]
+
+Signed-off-by: Ming Liu 
+---
+ tools/image-host.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tools/image-host.c b/tools/image-host.c
+index 270d36fe45..73095461a7 100644
+--- a/tools/image-host.c
 b/tools/image-host.c
+@@ -132,8 +132,10 @@ static int fit_image_write_sig(void *fit, int noffset, 
uint8_t *value,
+   if (!ret) {
+   time_t timestamp = imagetool_get_source_date(cmdname,
+time(NULL));
++  uint32_t t = cpu_to_uimage(timestamp);
+ 
+-  ret = fit_set_timestamp(fit, noffset, timestamp);
++  ret = fdt_setprop(fit, noffset, FIT_TIMESTAMP_PROP, ,
++  sizeof(uint32_t));
+   }
+   if (region_prop && !ret) {
+   uint32_t strdata[2];
+-- 
+2.29.0
+
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb 
b/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb
index ef386f76e6..4e90081911 100644
--- a/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-tools_2021.04.bb
@@ -1,3 +1,4 @@
 require u-boot-common.inc
 require u-boot-tools.inc
 
+SRC_URI_append = " file://0001-tools-image-host-fix-wrong-return-value.patch"
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152457): 
https://lists.openembedded.org/g/openembedded-core/message/152457
Mute This Topic: https://lists.openembedded.org/mt/83205281/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] uboot-sign/kernel-fitimage: split generate_rsa_keys task

2021-05-22 Thread Ming Liu
From: Ming Liu 

Currently generate_rsa_keys tasks are being executed parallelly in
kernel and uboot's task list, and both of them are calling openssl to
generate rsa keys in same path, this can lead to race condition.

Let's split it to kernel_generate_rsa_keys and uboot_generate_rsa_keys.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 37 
 meta/classes/uboot-sign.bbclass  | 29 ++
 2 files changed, 34 insertions(+), 32 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 5cfd8af99d..039640be1f 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -667,7 +667,34 @@ do_assemble_fitimage_initramfs() {
 
 addtask assemble_fitimage_initramfs before do_deploy after do_bundle_initramfs
 
-addtask generate_rsa_keys before do_assemble_fitimage after do_compile
+do_kernel_generate_rsa_keys() {
+   if [ "${UBOOT_SIGN_ENABLE}" = "0" ] && [ "${FIT_GENERATE_KEYS}" = "1" 
]; then
+   bbwarn "FIT_GENERATE_KEYS is set to 1 even though 
UBOOT_SIGN_ENABLE is set to 0. The keys will not be generated as they won't be 
used."
+   fi
+
+   if [ "${UBOOT_SIGN_ENABLE}" = "1" ] && [ "${FIT_GENERATE_KEYS}" = "1" 
]; then
+
+   # Generate keys only if they don't already exist
+   if [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key ] || 
\
+   [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".crt 
]; then
+
+   # make directory if it does not already exist
+   mkdir -p "${UBOOT_SIGN_KEYDIR}"
+
+   echo "Generating RSA private key for signing fitImage"
+   openssl genrsa ${FIT_KEY_GENRSA_ARGS} -out \
+   
"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key \
+   "${FIT_SIGN_NUMBITS}"
+
+   echo "Generating certificate for signing fitImage"
+   openssl req ${FIT_KEY_REQ_ARGS} "${FIT_KEY_SIGN_PKCS}" \
+   -key 
"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key \
+   -out 
"${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".crt
+   fi
+   fi
+}
+
+addtask kernel_generate_rsa_keys before do_assemble_fitimage after do_compile
 
 kernel_do_deploy[vardepsexclude] = "DATETIME"
 kernel_do_deploy_append() {
@@ -718,13 +745,13 @@ kernel_do_deploy_append() {
 # - Removes do_assemble_fitimage. FIT generation is done through
 #   do_assemble_fitimage_initramfs. do_assemble_fitimage is not needed
 #   and should not be part of the tasks to be executed.
-# - Since do_generate_rsa_keys is inserted by default
+# - Since do_kernel_generate_rsa_keys is inserted by default
 #   between do_compile and do_assemble_fitimage, this is
-#   not suitable in case of initramfs bundles.  do_generate_rsa_keys
+#   not suitable in case of initramfs bundles.  do_kernel_generate_rsa_keys
 #   should be between do_bundle_initramfs and do_assemble_fitimage_initramfs.
 python () {
 if d.getVar('INITRAMFS_IMAGE_BUNDLE') == "1":
 bb.build.deltask('do_assemble_fitimage', d)
-bb.build.deltask('generate_rsa_keys', d)
-bb.build.addtask('generate_rsa_keys', 
'do_assemble_fitimage_initramfs', 'do_bundle_initramfs', d)
+bb.build.deltask('kernel_generate_rsa_keys', d)
+bb.build.addtask('kernel_generate_rsa_keys', 
'do_assemble_fitimage_initramfs', 'do_bundle_initramfs', d)
 }
diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass
index d11882f90f..29b2edc833 100644
--- a/meta/classes/uboot-sign.bbclass
+++ b/meta/classes/uboot-sign.bbclass
@@ -255,32 +255,7 @@ do_install_append() {
fi
 }
 
-do_generate_rsa_keys() {
-   if [ "${UBOOT_SIGN_ENABLE}" = "0" ] && [ "${FIT_GENERATE_KEYS}" = "1" 
]; then
-   bbwarn "FIT_GENERATE_KEYS is set to 1 even though 
UBOOT_SIGN_ENABLE is set to 0. The keys will not be generated as they won't be 
used."
-   fi
-
-   if [ "${UBOOT_SIGN_ENABLE}" = "1" ] && [ "${FIT_GENERATE_KEYS}" = "1" 
]; then
-
-   # Generate keys only if they don't already exist
-   if [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".key ] || 
\
-   [ ! -f "${UBOOT_SIGN_KEYDIR}/${UBOOT_SIGN_KEYNAME}".crt 
]; then
-
-   # make directory if it does not already exist
-   mkdir -p "${UBOOT_SIGN_KEYDIR}"
-
-   echo "Generating RSA priva

[OE-core] [PATCH V2] kernel-fitimage.bbclass: drop unit addresses from bootscr sections

2021-05-22 Thread Ming Liu
From: Ming Liu 

In commit 6047be9f:
[ kernel-fitimage: Don't use unit addresses on FIT ]

It had dropped unit addresses from FIT image but missed on bootscr
part.

Drop unit addresses from bootscr sections in this patch.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 5cfd8af99d..4858037706 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -217,13 +217,13 @@ fitimage_emit_section_boot_script() {
bootscr_sign_keyname="${UBOOT_SIGN_KEYNAME}"
 
 cat << EOF >> ${1}
-bootscr@${2} {
+bootscr-${2} {
 description = "U-boot script";
 data = /incbin/("${3}");
 type = "script";
 arch = "${UBOOT_ARCH}";
 compression = "none";
-hash@1 {
+hash-1 {
 algo = "${bootscr_csum}";
 };
 };
@@ -232,7 +232,7 @@ EOF
if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a 
-n "${bootscr_sign_keyname}" ] ; then
sed -i '$ d' ${1}
cat << EOF >> ${1}
-signature@1 {
+signature-1 {
 algo = "${bootscr_csum},${bootscr_sign_algo}";
 key-name-hint = "${bootscr_sign_keyname}";
 };
@@ -383,7 +383,7 @@ fitimage_emit_section_config() {
if [ -n "${bootscr_id}" ]; then
conf_desc="${conf_desc}${sep}u-boot script"
sep=", "
-   bootscr_line="bootscr = \"bootscr@${bootscr_id}\";"
+   bootscr_line="bootscr = \"bootscr-${bootscr_id}\";"
fi
 
if [ -n "${config_id}" ]; then
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152135): 
https://lists.openembedded.org/g/openembedded-core/message/152135
Mute This Topic: https://lists.openembedded.org/mt/83004666/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core] [PATCH] kernel-fitimage.bbclass: fix wrong separators

2021-05-22 Thread Ming Liu
Hi, Andrey:

Thanks, exactly as you explained, it's to fix CVE-2021-27138, will add more
commit messages.

//Ming Liu

Andrey Zhizhikin  於 2021年5月21日 週五 下午6:04寫道:

> On Fri, May 21, 2021 at 4:44 PM Bruce Ashfield 
> wrote:
> >
> > On Fri, May 21, 2021 at 10:28 AM Richard Purdie
> >  wrote:
> > >
> > > On Fri, 2021-05-21 at 14:20 +0200, Ming Liu wrote:
> > > > From: Ming Liu 
> > > >
> > > > Change to use '-' rather than '@' as separators.
> > >
> > > Why? The commit message needs more information.
> > >
> >
> > I had exactly the same question/comment!
>
> I guess this comes from the attempt to fix CVE-2021-27138, which was
> already addressed in U-Boot with commit 3f04db891a35 ("image: Check
> for unit addresses in FITs").
>
> `@` is prohibied, so the `-` should be used instead.
>
> I believe it would throw the build error, somethign like this:
> | ./tools/mkimage: verify_header failed for FIT Image support with exit
> | code 1
>
> I do agree though - commit message should state this reason for this
> change.
>
> >
> > Bruce
> >
> > > Cheers,
> > >
> > > Richard
> > >
> > >
> > >
> > >
> >
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await
> > thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II
> >
> > 
> >
>
>
> --
> Regards,
> Andrey.
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152134): 
https://lists.openembedded.org/g/openembedded-core/message/152134
Mute This Topic: https://lists.openembedded.org/mt/82984249/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel-fitimage.bbclass: fix wrong separators

2021-05-21 Thread Ming Liu
From: Ming Liu 

Change to use '-' rather than '@' as separators.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 5cfd8af99d..4858037706 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -217,13 +217,13 @@ fitimage_emit_section_boot_script() {
bootscr_sign_keyname="${UBOOT_SIGN_KEYNAME}"
 
 cat << EOF >> ${1}
-bootscr@${2} {
+bootscr-${2} {
 description = "U-boot script";
 data = /incbin/("${3}");
 type = "script";
 arch = "${UBOOT_ARCH}";
 compression = "none";
-hash@1 {
+hash-1 {
 algo = "${bootscr_csum}";
 };
 };
@@ -232,7 +232,7 @@ EOF
if [ "${UBOOT_SIGN_ENABLE}" = "1" -a "${FIT_SIGN_INDIVIDUAL}" = "1" -a 
-n "${bootscr_sign_keyname}" ] ; then
sed -i '$ d' ${1}
cat << EOF >> ${1}
-signature@1 {
+signature-1 {
 algo = "${bootscr_csum},${bootscr_sign_algo}";
 key-name-hint = "${bootscr_sign_keyname}";
 };
@@ -383,7 +383,7 @@ fitimage_emit_section_config() {
if [ -n "${bootscr_id}" ]; then
conf_desc="${conf_desc}${sep}u-boot script"
sep=", "
-   bootscr_line="bootscr = \"bootscr@${bootscr_id}\";"
+   bootscr_line="bootscr = \"bootscr-${bootscr_id}\";"
fi
 
if [ -n "${config_id}" ]; then
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152120): 
https://lists.openembedded.org/g/openembedded-core/message/152120
Mute This Topic: https://lists.openembedded.org/mt/82984249/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] initramfs-framework:rootfs: fix wrong indentions

2021-05-21 Thread Ming Liu
From: Ming Liu 

Signed-off-by: Ming Liu 
---
 meta/recipes-core/initrdscripts/initramfs-framework/rootfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs 
b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index 10b9583172..e0efbe6ebe 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -56,8 +56,8 @@ rootfs_run() {
# It is unlikely to change, but keep 
trying anyway.
# Perhaps we pick a different device 
next time.
umount $ROOTFS_DIR
-   fi
fi
+   fi
fi
debug "Sleeping for $delay second(s) to wait root to settle..."
sleep $delay
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152119): 
https://lists.openembedded.org/g/openembedded-core/message/152119
Mute This Topic: https://lists.openembedded.org/mt/82984093/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2 1/1] kernel-fitimage.bbclass: fix a wrong conditional check

2021-05-21 Thread Ming Liu
From: Ming Liu 

It should check if "${UBOOT_SIGN_ENABLE}" equals to "1" instead of
checking if "${UBOOT_SIGN_ENABLE}" is not empty since it could be "0".

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 5cfd8af99d..993e159c75 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -331,7 +331,7 @@ fitimage_emit_section_config() {
 
conf_csum="${FIT_HASH_ALG}"
conf_sign_algo="${FIT_SIGN_ALG}"
-   if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then
+   if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then
conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
fi
 
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152118): 
https://lists.openembedded.org/g/openembedded-core/message/152118
Mute This Topic: https://lists.openembedded.org/mt/82984056/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH V2 0/1] RESEND

2021-05-21 Thread Ming Liu
From: Ming Liu 

Fixed a condition check issue

Ming Liu (1):
  kernel-fitimage.bbclass: fix a wrong conditional check

 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#152117): 
https://lists.openembedded.org/g/openembedded-core/message/152117
Mute This Topic: https://lists.openembedded.org/mt/82984053/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel-fitimage.bbclass: fix a wrong conditional check

2021-05-04 Thread Ming Liu
From: Ming Liu 

It should check if "${UBOOT_SIGN_ENABLE}" equals to "1" instead of
checking if "${UBOOT_SIGN_ENABLE}" is not empty since it could be "0".

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index 5cfd8af99d..993e159c75 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -331,7 +331,7 @@ fitimage_emit_section_config() {
 
conf_csum="${FIT_HASH_ALG}"
conf_sign_algo="${FIT_SIGN_ALG}"
-   if [ -n "${UBOOT_SIGN_ENABLE}" ] ; then
+   if [ "${UBOOT_SIGN_ENABLE}" = "1" ] ; then
conf_sign_keyname="${UBOOT_SIGN_KEYNAME}"
fi
 
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#151231): 
https://lists.openembedded.org/g/openembedded-core/message/151231
Mute This Topic: https://lists.openembedded.org/mt/82574447/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] initramfs-framework:rootfs: fix some conditional check

2021-03-24 Thread Ming Liu
From: Ming Liu 

Drop a duplicated check for "PARTLABEL=", also change to use elif to
avoid go through all the checks for root parameter.

Signed-off-by: Ming Liu 
---
 .../initrdscripts/initramfs-framework/rootfs| 17 +++--
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs 
b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
index ee24e82af3..10b9583172 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/rootfs
@@ -24,24 +24,13 @@ rootfs_run() {
if [ "`echo ${bootparam_root} | cut -c1-5`" = "UUID=" 
]; then
root_uuid=`echo $bootparam_root | cut -c6-`
bootparam_root="/dev/disk/by-uuid/$root_uuid"
-   fi
-
-   if [ "`echo ${bootparam_root} | cut -c1-9`" = 
"PARTUUID=" ]; then
+   elif [ "`echo ${bootparam_root} | cut -c1-9`" = 
"PARTUUID=" ]; then
root_partuuid=`echo $bootparam_root | cut -c10-`

bootparam_root="/dev/disk/by-partuuid/$root_partuuid"
-   fi
-
-   if [ "`echo ${bootparam_root} | cut -c1-10`" = 
"PARTLABEL=" ]; then
-   root_partlabel=`echo $bootparam_root | cut 
-c11-`
-   
bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
-   fi
-
-   if [ "`echo ${bootparam_root} | cut -c1-10`" = 
"PARTLABEL=" ]; then
+   elif [ "`echo ${bootparam_root} | cut -c1-10`" = 
"PARTLABEL=" ]; then
root_partlabel=`echo $bootparam_root | cut 
-c11-`

bootparam_root="/dev/disk/by-partlabel/$root_partlabel"
-   fi
-
-   if [ "`echo ${bootparam_root} | cut -c1-6`" = "LABEL=" 
]; then
+   elif [ "`echo ${bootparam_root} | cut -c1-6`" = 
"LABEL=" ]; then
root_label=`echo $bootparam_root | cut -c7-`
bootparam_root="/dev/disk/by-label/$root_label"
fi
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149865): 
https://lists.openembedded.org/g/openembedded-core/message/149865
Mute This Topic: https://lists.openembedded.org/mt/81575269/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH] kernel-fitimage.bbclass: support both KERNEL_DEVICETREE/EXTERNAL_KERNEL_DEVICETREE

2021-03-18 Thread Ming Liu
From: Ming Liu 

There are user cases that a developer wants to add both in-tree and
out-of-tree devicetrees to fitimage, and this is quite normal, for
instance, a developer might need the devicetrees from kernel source
meanwhile maintaining his/her own devicetree overlays to be applied
on top of them.

To support that, we now allow KERNEL_DEVICETREE and
EXTERNAL_KERNEL_DEVICETREE to be both set in configuration files, and
the devicetrees in EXTERNAL_KERNEL_DEVICETREE have higher priority to
override the same names in KERNEL_DEVICETREE.

Signed-off-by: Ming Liu 
---
 meta/classes/kernel-fitimage.bbclass | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index f5082c93df..b9d8270027 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -535,13 +535,19 @@ fitimage_assemble() {
# Step 2: Prepare a DTB image section
#
 
-   if [ -z "${EXTERNAL_KERNEL_DEVICETREE}" ] && [ -n 
"${KERNEL_DEVICETREE}" ]; then
+   if [ -n "${KERNEL_DEVICETREE}" ]; then
dtbcount=1
for DTB in ${KERNEL_DEVICETREE}; do
if echo ${DTB} | grep -q '/dts/'; then
bbwarn "${DTB} contains the full path to the 
the dts file, but only the dtb name should be used."
DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
fi
+
+   # Skip ${DTB} if it's also provided in 
${EXTERNAL_KERNEL_DEVICETREE}
+   if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ] && [ -s 
${EXTERNAL_KERNEL_DEVICETREE}/${DTB} ]; then
+   continue
+   fi
+
DTB_PATH="arch/${ARCH}/boot/dts/${DTB}"
if [ ! -e "${DTB_PATH}" ]; then
DTB_PATH="arch/${ARCH}/boot/${DTB}"
@@ -769,4 +775,4 @@ python () {
 bb.build.deltask('do_assemble_fitimage', d)
 bb.build.deltask('generate_rsa_keys', d)
 bb.build.addtask('generate_rsa_keys', 
'do_assemble_fitimage_initramfs', 'do_bundle_initramfs', d)
-}
\ No newline at end of file
+}
-- 
2.29.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#149633): 
https://lists.openembedded.org/g/openembedded-core/message/149633
Mute This Topic: https://lists.openembedded.org/mt/81427978/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [dunfell] [PATCH V2 4/4] libubootenv: inherit uboot-config

2020-08-26 Thread Ming Liu
From: Ming Liu 

This mainly aims to involve in the sanity check of UBOOT_CONFIG and
UBOOT_MACHINE, it will throw a error message at recipe parsing time if
neither of them is set, and libubootenv would be skipped.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit 10aa1291979fb90bed1beb49be4d406ed0e1e4d5)
---
 meta/recipes-bsp/u-boot/libubootenv_0.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.bb 
b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
index 47e64f9114..07711484ac 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
@@ -15,7 +15,7 @@ SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
 
 S = "${WORKDIR}/git"
 
-inherit cmake lib_package
+inherit uboot-config cmake lib_package
 
 EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
 
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141870): 
https://lists.openembedded.org/g/openembedded-core/message/141870
Mute This Topic: https://lists.openembedded.org/mt/76434354/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [dunfell] [PATCH V2 1/4] conf/machine: set UBOOT_MACHINE for qemumips and qemumips64

2020-08-26 Thread Ming Liu
From: Ming Liu 

These machines support booting U-Boot, so set the machine appropriately.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit b812fad85aed6cb9e433c689f3b14425488dfc68)
---
 meta/conf/machine/qemumips.conf   | 2 ++
 meta/conf/machine/qemumips64.conf | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index 4617c3c7b6..1373e4cba0 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -9,6 +9,8 @@ require conf/machine/include/qemuboot-mips.inc
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips"
diff --git a/meta/conf/machine/qemumips64.conf 
b/meta/conf/machine/qemumips64.conf
index 6d5174665f..1e77486491 100644
--- a/meta/conf/machine/qemumips64.conf
+++ b/meta/conf/machine/qemumips64.conf
@@ -11,6 +11,8 @@ QB_CPU = "-cpu MIPS64R2-generic"
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips64_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips64"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141867): 
https://lists.openembedded.org/g/openembedded-core/message/141867
Mute This Topic: https://lists.openembedded.org/mt/76434349/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [dunfell] [PATCH V2 0/4] libubootenv: uprev to v0.3

2020-08-26 Thread Ming Liu
From: Ming Liu 

Cherry pick the patches from master to upgrade libubootenv 0.2 -> 0.3.

Since libubootenv 0.2 is sort of buggy, it lacks of a lot of
bug/regression/security fixes which has been included in 0.3.

Changes in patch set V2:

1 Let libubootenv inherit uboot-config to get
  UBOOT_MAECHINE/UBOOT_CONFIG sanity check.


Ming Liu (4):
  conf/machine: set UBOOT_MACHINE for qemumips and qemumips64
  multilib.conf: add u-boot to NON_MULTILIB_RECIPES
  libubootenv: uprev to v0.3
  libubootenv: inherit uboot-config

 meta/conf/machine/qemumips.conf  | 2 ++
 meta/conf/machine/qemumips64.conf| 2 ++
 meta/conf/multilib.conf  | 2 +-
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}| 9 ++---
 4 files changed, 11 insertions(+), 4 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (78%)

-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141866): 
https://lists.openembedded.org/g/openembedded-core/message/141866
Mute This Topic: https://lists.openembedded.org/mt/76434346/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [dunfell] [PATCH V2 3/4] libubootenv: uprev to v0.3

2020-08-26 Thread Ming Liu
From: Ming Liu 

Update libubootenv to the latest 0.3 release, which comprises the
following commits:

```
1efed83 Increase max length for device name
6f4fc1c uboot_env: Use canonicalized pathname when reading device
23b3086 Fix bug introduced by commit 52a70114
ed1a53e Dont store to device if no value changes
4a0a466 Merge pull request #7 from TomzBench/cmake-fix
6117831 Added Coverity badge
49372a1 Fix coverity #293496
69a6819 Fix coverity #293503 and #293507
258bf52 Fix coverity #293501
aa52e61 Fix coverity #293505
52a7011 Fix coverity #293504 and #293506
e822218 Fix coverity #293495 and #293497
23b305f Fix coverity #293499
25ef1f6 Add coverity setup for Travis
41b5188 fixed install for static target, fixed BUILD_DOC acknowledgement
86bd30a Restore ability to feed script file via stdin, using `-s -`.
c91dcca ubi, write: fix invalid envsize ptr to UBI_IOCVOLUP
f4b9cde Allow negative offsets
45bf92a Detect sector size if not found in config
9f59db6 uboot_env: remove unused variables
65d243e README: libubootenv is now in oe-core
ba952d0 BUG: variable lists not released in close()
690f868 Variables are not removed when loading from file
9e3586a Make sure there's no file descriptor leakage in case of error
03647c4 Check config file defines a non-zero Sector size
3b2d4f1 Check environment size from fw_env.config
879c073 Do not hardcode path for install
d9c639b libubootenv: add pkg-config support
cc628ee libuboot: wrap libuboot in extern "C" for C++
```

Also add u-boot-default-env to RRECOMMENDS since
/etc/u-boot-initial-env is being referred in libubootenv source, and
turns libubootenv's PACKAGE_ARCH to be MACHINE_ARCH since
u-boot-default-env is a machine-arch package.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit 02d55cd35aac15095fc44f0cf8f9e7a71638f485)
---
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}  | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (82%)

diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb 
b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
similarity index 82%
rename from meta/recipes-bsp/u-boot/libubootenv_0.2.bb
rename to meta/recipes-bsp/u-boot/libubootenv_0.3.bb
index ea29b668e8..47e64f9114 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
@@ -10,9 +10,8 @@ LICENSE = "LGPL-2.1"
 LIC_FILES_CHKSUM = 
"file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
 SECTION = "libs"
 
-PV = "0.2+git${SRCPV}"
 SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
-SRCREV = "f4b9cde3815abe84a98079cedd515283ea08c16b"
+SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
 
 S = "${WORKDIR}/git"
 
@@ -24,4 +23,8 @@ DEPENDS = "zlib"
 PROVIDES += "u-boot-fw-utils"
 RPROVIDES_${PN}-bin += "u-boot-fw-utils"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
+
 BBCLASSEXTEND = "native"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141869): 
https://lists.openembedded.org/g/openembedded-core/message/141869
Mute This Topic: https://lists.openembedded.org/mt/76434353/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [dunfell] [PATCH V2 2/4] multilib.conf: add u-boot to NON_MULTILIB_RECIPES

2020-08-26 Thread Ming Liu
From: Ming Liu 

u-boot should be a non multilib recipe, add it in NON_MULTILIB_RECIPES.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit 5e7dc0d68efb2d43bbd5b1be9e6d555fc4456fb6)
---
 meta/conf/multilib.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 58f2ac5c86..d231107f8b 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -30,4 +30,4 @@ PKG_CONFIG_PATH[vardepvalueexclude] = 
":${WORKDIR}/recipe-sysroot/${datadir}/pkg
 
 # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES
 # ${MLPREFIX}${BPN}
-NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf"
+NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141868): 
https://lists.openembedded.org/g/openembedded-core/message/141868
Mute This Topic: https://lists.openembedded.org/mt/76434351/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] libubootenv: inherit uboot-config

2020-08-25 Thread Ming Liu
From: Ming Liu 

This mainly aims to involve in the sanity check of UBOOT_CONFIG and
UBOOT_MACHINE, it will throw a error message at recipe parsing time if
neither of them is set, and libubootenv would be skipped.

Signed-off-by: Ming Liu 
---
 meta/recipes-bsp/u-boot/libubootenv_0.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.3.bb 
b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
index 47e64f9114..07711484ac 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
@@ -15,7 +15,7 @@ SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
 
 S = "${WORKDIR}/git"
 
-inherit cmake lib_package
+inherit uboot-config cmake lib_package
 
 EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release"
 
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141831): 
https://lists.openembedded.org/g/openembedded-core/message/141831
Mute This Topic: https://lists.openembedded.org/mt/76412466/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH] [dunfell 3/3] libubootenv: uprev to v0.3

2020-08-24 Thread Ming Liu
Hi, Anuj:

Thanks for the review, I think this is a good suggestion, maybe we can let
it inherit uboot-config bbclass. Will send a patch to master.

//Ming Liu

Mittal, Anuj  於 2020年8月24日 週一 上午2:03寫道:

> On Sat, 2020-08-22 at 17:22 +0200, Ming Liu wrote:
> > From: Ming Liu 
> >
> > Update libubootenv to the latest 0.3 release, which comprises the
> > following commits:
> >
> > ```
> > 1efed83 Increase max length for device name
> > 6f4fc1c uboot_env: Use canonicalized pathname when reading device
> > 23b3086 Fix bug introduced by commit 52a70114
> > ed1a53e Dont store to device if no value changes
> > 4a0a466 Merge pull request #7 from TomzBench/cmake-fix
> > 6117831 Added Coverity badge
> > 49372a1 Fix coverity #293496
> > 69a6819 Fix coverity #293503 and #293507
> > 258bf52 Fix coverity #293501
> > aa52e61 Fix coverity #293505
> > 52a7011 Fix coverity #293504 and #293506
> > e822218 Fix coverity #293495 and #293497
> > 23b305f Fix coverity #293499
> > 25ef1f6 Add coverity setup for Travis
> > 41b5188 fixed install for static target, fixed BUILD_DOC
> > acknowledgement
> > 86bd30a Restore ability to feed script file via stdin, using `-s -`.
> > c91dcca ubi, write: fix invalid envsize ptr to UBI_IOCVOLUP
> > f4b9cde Allow negative offsets
> > 45bf92a Detect sector size if not found in config
> > 9f59db6 uboot_env: remove unused variables
> > 65d243e README: libubootenv is now in oe-core
> > ba952d0 BUG: variable lists not released in close()
> > 690f868 Variables are not removed when loading from file
> > 9e3586a Make sure there's no file descriptor leakage in case of error
> > 03647c4 Check config file defines a non-zero Sector size
> > 3b2d4f1 Check environment size from fw_env.config
> > 879c073 Do not hardcode path for install
> > d9c639b libubootenv: add pkg-config support
> > cc628ee libuboot: wrap libuboot in extern "C" for C++
> > ```
> >
> > Also add u-boot-default-env to RRECOMMENDS since
> > /etc/u-boot-initial-env is being referred in libubootenv source, and
> > turns libubootenv's PACKAGE_ARCH to be MACHINE_ARCH since
> > u-boot-default-env is a machine-arch package.
> >
> > Signed-off-by: Ming Liu 
> > Signed-off-by: Richard Purdie 
> > (cherry picked from commit 02d55cd35aac15095fc44f0cf8f9e7a71638f485)
> > ---
> >  .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}  | 7
> > +--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >  rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb =>
> > libubootenv_0.3.bb} (82%)
> >
> > diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
> > b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
> > similarity index 82%
> > rename from meta/recipes-bsp/u-boot/libubootenv_0.2.bb
> > rename to meta/recipes-bsp/u-boot/libubootenv_0.3.bb
> > index ea29b668e8..47e64f9114 100644
> > --- a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
> > +++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
> > @@ -10,9 +10,8 @@ LICENSE = "LGPL-2.1"
> >  LIC_FILES_CHKSUM = "file://Licenses/lgpl-
> > 2.1.txt;md5=4fbd65380cdd255951079008b364516c"
> >  SECTION = "libs"
> >
> > -PV = "0.2+git${SRCPV}"
> >  SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
> > -SRCREV = "f4b9cde3815abe84a98079cedd515283ea08c16b"
> > +SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
> >
> >  S = "${WORKDIR}/git"
> >
> > @@ -24,4 +23,8 @@ DEPENDS = "zlib"
> >  PROVIDES += "u-boot-fw-utils"
> >  RPROVIDES_${PN}-bin += "u-boot-fw-utils"
> >
> > +PACKAGE_ARCH = "${MACHINE_ARCH}"
> > +
> > +RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
> > +
>
> This causes world builds to fail when uboot build is skipped for a
> MACHINE value for example when UBOOT_CONFIG or UBOOT_MACHINE is not
> defined. Perhaps this recipe should also be skipped in those cases?
>
> Thanks,
>
> Anuj
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141761): 
https://lists.openembedded.org/g/openembedded-core/message/141761
Mute This Topic: https://lists.openembedded.org/mt/76349013/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] [dunfell 1/3] conf/machine: set UBOOT_MACHINE for qemumips and qemumips64

2020-08-22 Thread Ming Liu
From: Ming Liu 

These machines support booting U-Boot, so set the machine appropriately.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit b812fad85aed6cb9e433c689f3b14425488dfc68)
---
 meta/conf/machine/qemumips.conf   | 2 ++
 meta/conf/machine/qemumips64.conf | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index 4617c3c7b6..1373e4cba0 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -9,6 +9,8 @@ require conf/machine/include/qemuboot-mips.inc
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips"
diff --git a/meta/conf/machine/qemumips64.conf 
b/meta/conf/machine/qemumips64.conf
index 6d5174665f..1e77486491 100644
--- a/meta/conf/machine/qemumips64.conf
+++ b/meta/conf/machine/qemumips64.conf
@@ -11,6 +11,8 @@ QB_CPU = "-cpu MIPS64R2-generic"
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips64_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips64"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141708): 
https://lists.openembedded.org/g/openembedded-core/message/141708
Mute This Topic: https://lists.openembedded.org/mt/76349005/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] [dunfell 3/3] libubootenv: uprev to v0.3

2020-08-22 Thread Ming Liu
From: Ming Liu 

Update libubootenv to the latest 0.3 release, which comprises the
following commits:

```
1efed83 Increase max length for device name
6f4fc1c uboot_env: Use canonicalized pathname when reading device
23b3086 Fix bug introduced by commit 52a70114
ed1a53e Dont store to device if no value changes
4a0a466 Merge pull request #7 from TomzBench/cmake-fix
6117831 Added Coverity badge
49372a1 Fix coverity #293496
69a6819 Fix coverity #293503 and #293507
258bf52 Fix coverity #293501
aa52e61 Fix coverity #293505
52a7011 Fix coverity #293504 and #293506
e822218 Fix coverity #293495 and #293497
23b305f Fix coverity #293499
25ef1f6 Add coverity setup for Travis
41b5188 fixed install for static target, fixed BUILD_DOC acknowledgement
86bd30a Restore ability to feed script file via stdin, using `-s -`.
c91dcca ubi, write: fix invalid envsize ptr to UBI_IOCVOLUP
f4b9cde Allow negative offsets
45bf92a Detect sector size if not found in config
9f59db6 uboot_env: remove unused variables
65d243e README: libubootenv is now in oe-core
ba952d0 BUG: variable lists not released in close()
690f868 Variables are not removed when loading from file
9e3586a Make sure there's no file descriptor leakage in case of error
03647c4 Check config file defines a non-zero Sector size
3b2d4f1 Check environment size from fw_env.config
879c073 Do not hardcode path for install
d9c639b libubootenv: add pkg-config support
cc628ee libuboot: wrap libuboot in extern "C" for C++
```

Also add u-boot-default-env to RRECOMMENDS since
/etc/u-boot-initial-env is being referred in libubootenv source, and
turns libubootenv's PACKAGE_ARCH to be MACHINE_ARCH since
u-boot-default-env is a machine-arch package.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit 02d55cd35aac15095fc44f0cf8f9e7a71638f485)
---
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}  | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (82%)

diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb 
b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
similarity index 82%
rename from meta/recipes-bsp/u-boot/libubootenv_0.2.bb
rename to meta/recipes-bsp/u-boot/libubootenv_0.3.bb
index ea29b668e8..47e64f9114 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
@@ -10,9 +10,8 @@ LICENSE = "LGPL-2.1"
 LIC_FILES_CHKSUM = 
"file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
 SECTION = "libs"
 
-PV = "0.2+git${SRCPV}"
 SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
-SRCREV = "f4b9cde3815abe84a98079cedd515283ea08c16b"
+SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
 
 S = "${WORKDIR}/git"
 
@@ -24,4 +23,8 @@ DEPENDS = "zlib"
 PROVIDES += "u-boot-fw-utils"
 RPROVIDES_${PN}-bin += "u-boot-fw-utils"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
+
 BBCLASSEXTEND = "native"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141710): 
https://lists.openembedded.org/g/openembedded-core/message/141710
Mute This Topic: https://lists.openembedded.org/mt/76349013/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] [dunfell 2/3] multilib.conf: add u-boot to NON_MULTILIB_RECIPES

2020-08-22 Thread Ming Liu
From: Ming Liu 

u-boot should be a non multilib recipe, add it in NON_MULTILIB_RECIPES.

Signed-off-by: Ming Liu 
Signed-off-by: Richard Purdie 
(cherry picked from commit 5e7dc0d68efb2d43bbd5b1be9e6d555fc4456fb6)
---
 meta/conf/multilib.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 58f2ac5c86..d231107f8b 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -30,4 +30,4 @@ PKG_CONFIG_PATH[vardepvalueexclude] = 
":${WORKDIR}/recipe-sysroot/${datadir}/pkg
 
 # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES
 # ${MLPREFIX}${BPN}
-NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf"
+NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141709): 
https://lists.openembedded.org/g/openembedded-core/message/141709
Mute This Topic: https://lists.openembedded.org/mt/76349010/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] [dunfell 0/3] libubootenv: uprev to v0.3

2020-08-22 Thread Ming Liu
From: Ming Liu 

Cherry pick the patches from master to upgrade libubootenv 0.2 -> 0.3.

Since libubootenv 0.2 is sort of buggy, it lacks of a lot of
bug/regression/security fixes which has been included in 0.3.

Ming Liu (3):
  conf/machine: set UBOOT_MACHINE for qemumips and qemumips64
  multilib.conf: add u-boot to NON_MULTILIB_RECIPES
  libubootenv: uprev to v0.3

 meta/conf/machine/qemumips.conf| 2 ++
 meta/conf/machine/qemumips64.conf  | 2 ++
 meta/conf/multilib.conf| 2 +-
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}  | 7 +--
 4 files changed, 10 insertions(+), 3 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (82%)

-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141707): 
https://lists.openembedded.org/g/openembedded-core/message/141707
Mute This Topic: https://lists.openembedded.org/mt/76349002/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH] systemd: split systemd specific udev rules into its own package

2020-08-21 Thread Ming Liu
From: Ming Liu 

In case some other packages need these udev rules but they wont install
systemd, for instance, a issue was found that plymouth needs
71-seat.rules to be present in rootfs or it will fail.

Let systemd RDEPENDS on systemd-udev-rules.

Signed-off-by: Stefan Agner 
Signed-off-by: Ming Liu 
---
 meta/recipes-core/systemd/systemd_246.bb | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_246.bb 
b/meta/recipes-core/systemd/systemd_246.bb
index a463aab1e3..70154fcb8c 100644
--- a/meta/recipes-core/systemd/systemd_246.bb
+++ b/meta/recipes-core/systemd/systemd_246.bb
@@ -324,6 +324,7 @@ PACKAGE_BEFORE_PN = "\
 ${PN}-journal-upload \
 ${PN}-journal-remote \
 ${PN}-extra-utils \
+${PN}-udev-rules \
 udev \
 udev-hwdb \
 "
@@ -498,6 +499,13 @@ FILES_${PN}-extra-utils = "\
 ${rootlibexecdir}/systemd/systemd-cgroups-agent \
 "
 
+FILES_${PN}-udev-rules = "\
+${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
+${rootlibexecdir}/udev/rules.d/71-seat.rules \
+${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
+${rootlibexecdir}/udev/rules.d/99-systemd.rules \
+"
+
 CONFFILES_${PN} = "${sysconfdir}/systemd/coredump.conf \
${sysconfdir}/systemd/journald.conf \
${sysconfdir}/systemd/logind.conf \
@@ -553,10 +561,6 @@ FILES_${PN} = " ${base_bindir}/* \
 ${exec_prefix}/lib/sysusers.d \
 ${exec_prefix}/lib/environment.d \
 ${localstatedir} \
-${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
-${rootlibexecdir}/udev/rules.d/71-seat.rules \
-${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
-${rootlibexecdir}/udev/rules.d/99-systemd.rules \
 ${rootlibexecdir}/modprobe.d/systemd.conf \
 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
@@ -571,7 +575,7 @@ FILES_${PN} = " ${base_bindir}/* \
 
 FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ 
${sysconfdir}/rpm/macros.systemd"
 
-RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= 
${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
+RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= 
${EXTENDPKGV}) systemd-udev-rules util-linux-agetty util-linux-fsck"
 RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 
'serial-getty-generator', '', 'systemd-serialgetty', d)}"
 RDEPENDS_${PN} += "volatile-binds"
 
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141689): 
https://lists.openembedded.org/g/openembedded-core/message/141689
Mute This Topic: https://lists.openembedded.org/mt/76328026/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V4 3/3] libubootenv: uprev to v0.3

2020-08-17 Thread Ming Liu
From: Ming Liu 

Update libubootenv to the latest 0.3 release, which comprises the
following commits:

```
1efed83 Increase max length for device name
6f4fc1c uboot_env: Use canonicalized pathname when reading device
23b3086 Fix bug introduced by commit 52a70114
ed1a53e Dont store to device if no value changes
4a0a466 Merge pull request #7 from TomzBench/cmake-fix
6117831 Added Coverity badge
49372a1 Fix coverity #293496
69a6819 Fix coverity #293503 and #293507
258bf52 Fix coverity #293501
aa52e61 Fix coverity #293505
52a7011 Fix coverity #293504 and #293506
e822218 Fix coverity #293495 and #293497
23b305f Fix coverity #293499
25ef1f6 Add coverity setup for Travis
41b5188 fixed install for static target, fixed BUILD_DOC acknowledgement
86bd30a Restore ability to feed script file via stdin, using `-s -`.
c91dcca ubi, write: fix invalid envsize ptr to UBI_IOCVOLUP
f4b9cde Allow negative offsets
45bf92a Detect sector size if not found in config
9f59db6 uboot_env: remove unused variables
65d243e README: libubootenv is now in oe-core
ba952d0 BUG: variable lists not released in close()
690f868 Variables are not removed when loading from file
9e3586a Make sure there's no file descriptor leakage in case of error
03647c4 Check config file defines a non-zero Sector size
3b2d4f1 Check environment size from fw_env.config
879c073 Do not hardcode path for install
d9c639b libubootenv: add pkg-config support
cc628ee libuboot: wrap libuboot in extern "C" for C++
```

Also add u-boot-default-env to RRECOMMENDS since
/etc/u-boot-initial-env is being referred in libubootenv source, and
turns libubootenv's PACKAGE_ARCH to be MACHINE_ARCH since
u-boot-default-env is a machine-arch package.

Signed-off-by: Ming Liu 
---
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}  | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (82%)

diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb 
b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
similarity index 82%
rename from meta/recipes-bsp/u-boot/libubootenv_0.2.bb
rename to meta/recipes-bsp/u-boot/libubootenv_0.3.bb
index 3820ba262e..47e64f9114 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
@@ -10,9 +10,8 @@ LICENSE = "LGPL-2.1"
 LIC_FILES_CHKSUM = 
"file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
 SECTION = "libs"
 
-PV = "0.2+git${SRCPV}"
 SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
-SRCREV = "86bd30a14e153a18f670b25708795253d8736f0f"
+SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
 
 S = "${WORKDIR}/git"
 
@@ -24,4 +23,8 @@ DEPENDS = "zlib"
 PROVIDES += "u-boot-fw-utils"
 RPROVIDES_${PN}-bin += "u-boot-fw-utils"
 
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
+
 BBCLASSEXTEND = "native"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141563): 
https://lists.openembedded.org/g/openembedded-core/message/141563
Mute This Topic: https://lists.openembedded.org/mt/76240488/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V4 0/3] libubootenv: uprev to v0.3

2020-08-17 Thread Ming Liu
From: Ming Liu 

Changes in patch set V4:

1 Add UBOOT_MACHINE to qemumips/qemumips64 to fix a uboot build issue.
2 Set PACKAGE_ARCH = "${MACHINE_ARCH}" to fix a
  test_sstate_sametune_samesigs issue.


Ming Liu (3):
  conf/machine: set UBOOT_MACHINE for qemumips and qemumips64
  multilib.conf: add u-boot to NON_MULTILIB_RECIPES
  libubootenv: uprev to v0.3

 meta/conf/machine/qemumips.conf| 2 ++
 meta/conf/machine/qemumips64.conf  | 2 ++
 meta/conf/multilib.conf| 2 +-
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}  | 7 +--
 4 files changed, 10 insertions(+), 3 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (82%)

-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141560): 
https://lists.openembedded.org/g/openembedded-core/message/141560
Mute This Topic: https://lists.openembedded.org/mt/76240485/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V4 2/3] multilib.conf: add u-boot to NON_MULTILIB_RECIPES

2020-08-17 Thread Ming Liu
From: Ming Liu 

u-boot should be a non multilib recipe, add it in NON_MULTILIB_RECIPES.

Signed-off-by: Ming Liu 
---
 meta/conf/multilib.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 58f2ac5c86..d231107f8b 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -30,4 +30,4 @@ PKG_CONFIG_PATH[vardepvalueexclude] = 
":${WORKDIR}/recipe-sysroot/${datadir}/pkg
 
 # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES
 # ${MLPREFIX}${BPN}
-NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf"
+NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141562): 
https://lists.openembedded.org/g/openembedded-core/message/141562
Mute This Topic: https://lists.openembedded.org/mt/76240487/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V4 1/3] conf/machine: set UBOOT_MACHINE for qemumips and qemumips64

2020-08-17 Thread Ming Liu
From: Ming Liu 

These machines support booting U-Boot, so set the machine appropriately.

Signed-off-by: Ming Liu 
---
 meta/conf/machine/qemumips.conf   | 2 ++
 meta/conf/machine/qemumips64.conf | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/meta/conf/machine/qemumips.conf b/meta/conf/machine/qemumips.conf
index 4617c3c7b6..1373e4cba0 100644
--- a/meta/conf/machine/qemumips.conf
+++ b/meta/conf/machine/qemumips.conf
@@ -9,6 +9,8 @@ require conf/machine/include/qemuboot-mips.inc
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips"
diff --git a/meta/conf/machine/qemumips64.conf 
b/meta/conf/machine/qemumips64.conf
index 6d5174665f..1e77486491 100644
--- a/meta/conf/machine/qemumips64.conf
+++ b/meta/conf/machine/qemumips64.conf
@@ -11,6 +11,8 @@ QB_CPU = "-cpu MIPS64R2-generic"
 KERNEL_IMAGETYPE = "vmlinux"
 KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 
+UBOOT_MACHINE ?= "qemu_mips64_defconfig"
+
 SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyS1"
 
 QB_SYSTEM_NAME = "qemu-system-mips64"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141561): 
https://lists.openembedded.org/g/openembedded-core/message/141561
Mute This Topic: https://lists.openembedded.org/mt/76240486/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH V3 2/2] libubootenv: uprev to v0.3

2020-08-17 Thread Ming Liu
Will investigate the build issues. Thanks.

//Ming Liu

Richard Purdie  於 2020年8月15日 週六
上午12:06寫道:

> On Fri, 2020-08-14 at 13:12 -0700, Khem Raj wrote:
> > for qemumips I am still seeing
> >
> > 00:01:59.669 WARNING: No bb files in default matched
> > BBFILE_PATTERN_odroid-extras
> >
> '^/mnt/jenkins/workspace/yocto-world-glibc/sources/meta-odroid/meta-odroid-extras/'
> > 00:02:03.245 ERROR: Nothing RPROVIDES 'u-boot-default-env' (but
> >
> /mnt/jenkins/workspace/yocto-world-glibc/sources/openembedded-core/meta/recipes-bsp/u-boot/
> libubootenv_0.3.bb
> > RDEPENDS on or otherwise requires it)
> > 00:02:03.534 ERROR: Nothing RPROVIDES 'libubootenv-dev' (but
> >
> /mnt/jenkins/workspace/yocto-world-glibc/sources/openembedded-core/meta/recipes-bsp/u-boot/
> libubootenv_0.3.bb
> > RDEPENDS on or otherwise requires it)
> > 00:02:03.534 No eligible RPROVIDERs exist for 'libubootenv-dev'
>
> Its also breaking sstate testing:
>
> "oe-selftest -r sstatetests.SStateTests.test_sstate_sametune_samesigs"
>
> causing:
>
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/1248/steps/8/logs/step2d
>
> 2020-08-14 19:36:15,406 - oe-selftest - INFO -
> sstatetests.SStateTests.test_sstate_sametune_samesigs
> (subunit.RemotedTestCase)
> 2020-08-14 19:36:15,407 - oe-selftest - INFO -  ... FAIL
> 2020-08-14 19:36:15,407 - oe-selftest - INFO - 9: 38/38 378/414 (153.36s)
> (sstatetests.SStateTests.test_sstate_sametune_samesigs)
> 2020-08-14 19:36:15,407 - oe-selftest - INFO -
> testtools.testresult.real._StringException: Traceback (most recent call
> last):
>   File
> "/home/pokybuild/yocto-worker/oe-selftest-centos/build/meta/lib/oeqa/selftest/cases/sstatetests.py",
> line 449, in test_sstate_sametune_samesigs
> self.assertCountEqual(files1, files2)
>   File "/usr/lib64/python3.6/unittest/case.py", line 1200, in
> assertCountEqual
> self.fail(msg)
>   File "/usr/lib64/python3.6/unittest/case.py", line 687, in fail
> raise self.failureException(msg)
> AssertionError: Element counts were not equal:
> First has 1, Second has 0:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/core2-32-poky-linux/libubootenv/0.3-r0.do_package_write_rpm.sigdata.05d757878a1583dd222357a916105e1723de0b287d61d4d217953102ef4b6710'
> First has 1, Second has 0:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/core2-32-poky-linux/libubootenv/0.3-r0.do_package_qa.sigdata.d5d478843b014fcf9715070611562e969b0ebf37e49b284509293a5956d3544b'
> First has 1, Second has 0:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/x86-pokymllib32-linux/lib32-libubootenv/0.3-r0.do_package_qa.sigdata.f8638f649c6aebeda30a11f6d2e9379c7e389ded8b84f6b5b57fa36c18868bfb'
> First has 1, Second has 0:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/x86-pokymllib32-linux/lib32-libubootenv/0.3-r0.do_package_write_rpm.sigdata.f74b2e6332d343f4800eefa823f0462649a549edd90c2c671f623493f9598756'
> First has 0, Second has 1:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/core2-32-poky-linux/libubootenv/0.3-r0.do_package_qa.sigdata.a60efa593fff1e0ed60834ecd0fb7f20b94a9534bb66e1b5fd968aca5a9eb831'
> First has 0, Second has 1:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/core2-32-poky-linux/libubootenv/0.3-r0.do_package_write_rpm.sigdata.b7097c279aba4be43e13e35cfeccc331bdf11dc2d6240da12430c953926796b1'
> First has 0, Second has 1:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/x86-pokymllib32-linux/lib32-libubootenv/0.3-r0.do_package_write_rpm.sigdata.0cd26580e083cbf8ac677e1deb8cbfa1c4ef4c35e29b2ea2bb61282b48cda68a'
> First has 0, Second has 1:
> '/home/pokybuild/yocto-worker/oe-selftest-centos/build/build-st-3335289/tmp-sstatesamehash/stamps/x86-pokymllib32-linux/lib32-libubootenv/0.3-r0.do_package_qa.sigdata.89a10fd2c56db51620a1b5492a894abacb4b38e9eee8ba05fe70f4ca46278ccd'
>
> Cheers,
>
> Richard
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141557): 
https://lists.openembedded.org/g/openembedded-core/message/141557
Mute This Topic: https://lists.openembedded.org/mt/76184823/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V3 1/2] multilib.conf: add u-boot to NON_MULTILIB_RECIPES

2020-08-14 Thread Ming Liu
From: Ming Liu 

u-boot should be a non multilib recipe, add it in NON_MULTILIB_RECIPES.

Signed-off-by: Ming Liu 
---
 meta/conf/multilib.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 58f2ac5c86..d231107f8b 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -30,4 +30,4 @@ PKG_CONFIG_PATH[vardepvalueexclude] = 
":${WORKDIR}/recipe-sysroot/${datadir}/pkg
 
 # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES
 # ${MLPREFIX}${BPN}
-NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf"
+NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141450): 
https://lists.openembedded.org/g/openembedded-core/message/141450
Mute This Topic: https://lists.openembedded.org/mt/76184821/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V3 2/2] libubootenv: uprev to v0.3

2020-08-14 Thread Ming Liu
From: Ming Liu 

Update libubootenv to the latest 0.3 release, which comprises the
following commits:

```
1efed83 Increase max length for device name
6f4fc1c uboot_env: Use canonicalized pathname when reading device
23b3086 Fix bug introduced by commit 52a70114
ed1a53e Dont store to device if no value changes
4a0a466 Merge pull request #7 from TomzBench/cmake-fix
6117831 Added Coverity badge
49372a1 Fix coverity #293496
69a6819 Fix coverity #293503 and #293507
258bf52 Fix coverity #293501
aa52e61 Fix coverity #293505
52a7011 Fix coverity #293504 and #293506
e822218 Fix coverity #293495 and #293497
23b305f Fix coverity #293499
25ef1f6 Add coverity setup for Travis
41b5188 fixed install for static target, fixed BUILD_DOC acknowledgement
86bd30a Restore ability to feed script file via stdin, using `-s -`.
c91dcca ubi, write: fix invalid envsize ptr to UBI_IOCVOLUP
f4b9cde Allow negative offsets
45bf92a Detect sector size if not found in config
9f59db6 uboot_env: remove unused variables
65d243e README: libubootenv is now in oe-core
ba952d0 BUG: variable lists not released in close()
690f868 Variables are not removed when loading from file
9e3586a Make sure there's no file descriptor leakage in case of error
03647c4 Check config file defines a non-zero Sector size
3b2d4f1 Check environment size from fw_env.config
879c073 Do not hardcode path for install
d9c639b libubootenv: add pkg-config support
cc628ee libuboot: wrap libuboot in extern "C" for C++
```

Also add u-boot-default-env to RRECOMMENDS since
/etc/u-boot-initial-env is being referred in libubootenv source.

Signed-off-by: Ming Liu 
---
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}| 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (85%)

diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb 
b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
similarity index 85%
rename from meta/recipes-bsp/u-boot/libubootenv_0.2.bb
rename to meta/recipes-bsp/u-boot/libubootenv_0.3.bb
index 3820ba262e..55b2eb60f7 100644
--- a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
+++ b/meta/recipes-bsp/u-boot/libubootenv_0.3.bb
@@ -10,9 +10,8 @@ LICENSE = "LGPL-2.1"
 LIC_FILES_CHKSUM = 
"file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
 SECTION = "libs"
 
-PV = "0.2+git${SRCPV}"
 SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
-SRCREV = "86bd30a14e153a18f670b25708795253d8736f0f"
+SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
 
 S = "${WORKDIR}/git"
 
@@ -24,4 +23,6 @@ DEPENDS = "zlib"
 PROVIDES += "u-boot-fw-utils"
 RPROVIDES_${PN}-bin += "u-boot-fw-utils"
 
+RRECOMMENDS_${PN}-bin_append_class-target = " u-boot-default-env"
+
 BBCLASSEXTEND = "native"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141451): 
https://lists.openembedded.org/g/openembedded-core/message/141451
Mute This Topic: https://lists.openembedded.org/mt/76184823/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V3 0/2] libubootenv: uprev to v0.3

2020-08-14 Thread Ming Liu
From: Ming Liu 

Changes in V3:

1 Drop PV definition from recipe as suggested by Adrian Bunk.
2 Change a '+=' to "_append" as suggested by Khem Raj.

Ming Liu (2):
  multilib.conf: add u-boot to NON_MULTILIB_RECIPES
  libubootenv: uprev to v0.3

 meta/conf/multilib.conf  | 2 +-
 .../u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb}| 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_0.3.bb} (85%)

-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141449): 
https://lists.openembedded.org/g/openembedded-core/message/141449
Mute This Topic: https://lists.openembedded.org/mt/76184820/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH V2 2/2] libubootenv: uprev to v0.3

2020-08-14 Thread Ming Liu
Got that, will make a V3 dropping PV definition and _git version suffix
from recipe.

//Ming Liu

Richard Purdie  於 2020年8月14日 週五
上午11:04寫道:

> On Fri, 2020-08-14 at 10:16 +0200, Ming Liu wrote:
> > @Adrian Bunk Sorry, just double checked your comment, are you sure
> > "PV = 0.3" without git+SRCPV is a right way to go? This seems is not
> > like all other git recipes.
>
> Adrian is correct, if this is 0.3, PV should be 0.3. The addition of
> SRCPV is only appropriate if it is some number of git commits past the
> 0.3 release.
>
> Cheers,
>
> Richard
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141448): 
https://lists.openembedded.org/g/openembedded-core/message/141448
Mute This Topic: https://lists.openembedded.org/mt/76164704/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH V2 2/2] libubootenv: uprev to v0.3

2020-08-14 Thread Ming Liu
@Adrian Bunk  Sorry, just double checked your comment, are
you sure "PV = 0.3" without git+SRCPV is a right way to go? This seems is
not like all other git recipes.

//Ming Liu

Ming Liu  於 2020年8月14日 週五 上午10:09寫道:

> OK, will change back to 0.3 recipe in V3.
>
> //Ming Liu
>
> Adrian Bunk  於 2020年8月13日 週四 下午9:05寫道:
>
>> On Thu, Aug 13, 2020 at 12:21:17PM +0200, Ming Liu wrote:
>> >...
>> > -PV = "0.2+git${SRCPV}"
>> > +PV = "0.3+git${SRCPV}"
>> >  SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
>> > -SRCREV = "86bd30a14e153a18f670b25708795253d8736f0f"
>> > +SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
>> >...
>>
>> This is exactly the 0.3 release, so PV should be
>>   PV = "0.3"
>>
>> cu
>> Adrian
>>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141446): 
https://lists.openembedded.org/g/openembedded-core/message/141446
Mute This Topic: https://lists.openembedded.org/mt/76164704/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH V2 2/2] libubootenv: uprev to v0.3

2020-08-14 Thread Ming Liu
OK, will change back to 0.3 recipe in V3.

//Ming Liu

Adrian Bunk  於 2020年8月13日 週四 下午9:05寫道:

> On Thu, Aug 13, 2020 at 12:21:17PM +0200, Ming Liu wrote:
> >...
> > -PV = "0.2+git${SRCPV}"
> > +PV = "0.3+git${SRCPV}"
> >  SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
> > -SRCREV = "86bd30a14e153a18f670b25708795253d8736f0f"
> > +SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
> >...
>
> This is exactly the 0.3 release, so PV should be
>   PV = "0.3"
>
> cu
> Adrian
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141445): 
https://lists.openembedded.org/g/openembedded-core/message/141445
Mute This Topic: https://lists.openembedded.org/mt/76164704/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [PATCH V2 2/2] libubootenv: uprev to v0.3

2020-08-14 Thread Ming Liu
Yes, I am on board that RRECOMMENDS_${PN}-bin_append_class-target = "
u-boot-default-env" might be better, will change to that in V3, but this
error probably due to you dont have RPROVIDES_${PN}-env +=
"u-boot-default-env" in your uboot recipe?

//Ming Liu

Khem Raj  於 2020年8月14日 週五 上午7:05寫道:

> On Thu, Aug 13, 2020 at 3:21 AM Ming Liu  wrote:
> >
> > From: Ming Liu 
> >
> > Update libubootenv to the latest 0.3 release, which comprises the
> > following commits:
> >
> > ```
> > 1efed83 Increase max length for device name
> > 6f4fc1c uboot_env: Use canonicalized pathname when reading device
> > 23b3086 Fix bug introduced by commit 52a70114
> > ed1a53e Dont store to device if no value changes
> > 4a0a466 Merge pull request #7 from TomzBench/cmake-fix
> > 6117831 Added Coverity badge
> > 49372a1 Fix coverity #293496
> > 69a6819 Fix coverity #293503 and #293507
> > 258bf52 Fix coverity #293501
> > aa52e61 Fix coverity #293505
> > 52a7011 Fix coverity #293504 and #293506
> > e822218 Fix coverity #293495 and #293497
> > 23b305f Fix coverity #293499
> > 25ef1f6 Add coverity setup for Travis
> > 41b5188 fixed install for static target, fixed BUILD_DOC acknowledgement
> > 86bd30a Restore ability to feed script file via stdin, using `-s -`.
> > c91dcca ubi, write: fix invalid envsize ptr to UBI_IOCVOLUP
> > f4b9cde Allow negative offsets
> > 45bf92a Detect sector size if not found in config
> > 9f59db6 uboot_env: remove unused variables
> > 65d243e README: libubootenv is now in oe-core
> > ba952d0 BUG: variable lists not released in close()
> > 690f868 Variables are not removed when loading from file
> > 9e3586a Make sure there's no file descriptor leakage in case of error
> > 03647c4 Check config file defines a non-zero Sector size
> > 3b2d4f1 Check environment size from fw_env.config
> > 879c073 Do not hardcode path for install
> > d9c639b libubootenv: add pkg-config support
> > cc628ee libuboot: wrap libuboot in extern "C" for C++
> > ```
> >
> > Also change it to be a git recipe, and add u-boot-default-env to
> > RRECOMMENDS since /etc/u-boot-initial-env is being referred in
> > libubootenv source.
> >
> > Signed-off-by: Ming Liu 
> > Signed-off-by: Richard Purdie 
> > ---
> >  .../u-boot/{libubootenv_0.2.bb => libubootenv_git.bb}   | 6 --
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >  rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb =>
> libubootenv_git.bb} (84%)
> >
> > diff --git a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
> b/meta/recipes-bsp/u-boot/libubootenv_git.bb
> > similarity index 84%
> > rename from meta/recipes-bsp/u-boot/libubootenv_0.2.bb
> > rename to meta/recipes-bsp/u-boot/libubootenv_git.bb
> > index 3820ba262e..59b9703d61 100644
> > --- a/meta/recipes-bsp/u-boot/libubootenv_0.2.bb
> > +++ b/meta/recipes-bsp/u-boot/libubootenv_git.bb
> > @@ -10,9 +10,9 @@ LICENSE = "LGPL-2.1"
> >  LIC_FILES_CHKSUM =
> "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c"
> >  SECTION = "libs"
> >
> > -PV = "0.2+git${SRCPV}"
> > +PV = "0.3+git${SRCPV}"
> >  SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https"
> > -SRCREV = "86bd30a14e153a18f670b25708795253d8736f0f"
> > +SRCREV = "ad253cfdb07c8492f2ee46a52fbc607ad0b96414"
> >
> >  S = "${WORKDIR}/git"
> >
> > @@ -24,4 +24,6 @@ DEPENDS = "zlib"
> >  PROVIDES += "u-boot-fw-utils"
> >  RPROVIDES_${PN}-bin += "u-boot-fw-utils"
> >
> > +RRECOMMENDS_${PN}-bin_class-target += "u-boot-default-env"
> > +
>
> should this be
> RRECOMMENDS_${PN}-bin_append_class-target = "u-boot-default-env"
>
> I see
>
> ERROR: Nothing RPROVIDES 'u-boot-default-env' (but
>
> /mnt/jenkins/workspace/yocto-world-glibc/sources/openembedded-core/meta/recipes-bsp/u-boot/
> libubootenv_git.bb
> RDEPENDS on or otherwise requires it)
>
>
> >  BBCLASSEXTEND = "native"
> > --
> > 2.28.0
> >
> > 
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141444): 
https://lists.openembedded.org/g/openembedded-core/message/141444
Mute This Topic: https://lists.openembedded.org/mt/76164704/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V2 1/2] multilib.conf: add u-boot to NON_MULTILIB_RECIPES

2020-08-13 Thread Ming Liu
From: Ming Liu 

u-boot should be a non multilib recipe, add it in NON_MULTILIB_RECIPES.

Signed-off-by: Ming Liu 
---
 meta/conf/multilib.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 58f2ac5c86..d231107f8b 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -30,4 +30,4 @@ PKG_CONFIG_PATH[vardepvalueexclude] = 
":${WORKDIR}/recipe-sysroot/${datadir}/pkg
 
 # These recipes don't need multilib variants, the ${BPN} PROVDES/RPROVDES
 # ${MLPREFIX}${BPN}
-NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf"
+NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot"
-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141427): 
https://lists.openembedded.org/g/openembedded-core/message/141427
Mute This Topic: https://lists.openembedded.org/mt/76164703/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-core] [PATCH V2 0/2] libubootenv: uprev to v0.3

2020-08-13 Thread Ming Liu
From: Ming Liu 

Changes in V2:

1 Added u-boot to NON_MULTILIB_RECIPES.

Ming Liu (2):
  multilib.conf: add u-boot to NON_MULTILIB_RECIPES
  libubootenv: uprev to v0.3

 meta/conf/multilib.conf | 2 +-
 .../u-boot/{libubootenv_0.2.bb => libubootenv_git.bb}   | 6 --
 2 files changed, 5 insertions(+), 3 deletions(-)
 rename meta/recipes-bsp/u-boot/{libubootenv_0.2.bb => libubootenv_git.bb} (84%)

-- 
2.28.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141426): 
https://lists.openembedded.org/g/openembedded-core/message/141426
Mute This Topic: https://lists.openembedded.org/mt/76164701/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


  1   2   3   4   >