<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12809</bug_id>
          
          <creation_ts>2018-06-22 07:41:26 +0000</creation_ts>
          <short_desc>APPEND doesn&apos;t work with wic</short_desc>
          <delta_ts>2020-03-17 01:11:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>5.99</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.1 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anuj Mittal">anuj.mittal</reporter>
          <assigned_to name="Kevin Hao">kexin.hao</assigned_to>
          <cc>anon2313</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80899</commentid>
    <comment_count>0</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2018-06-22 07:41:26 +0000</bug_when>
    <thetext>Using APPEND at image level doesn&apos;t take effect when using the wks files with wic because none of the current kickstarter files use this value when passing parameters to bootloader&apos;s --append.

As an example, this won&apos;t take effect with wic:

http://cgit.openembedded.org/openembedded-core/commit/?id=cfc09de06ecc12bb42181004689e881c75072665

There&apos;s code present that can parse bitbake vars in a wks.in template file and that works as expected.

Is this an expected behavior or should it be changed to use APPEND var with a .wks.in file? Should the use of APPEND be discouraged and changed instead?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83184</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-03-04 21:19:46 +0000</bug_when>
    <thetext>I think this is as trivial as http://git.yoctoproject.org/cgit.cgi/meta-intel-contrib/commit/?h=ross/wic&amp;id=bae7c2bfb29c6cc093166ac834b4d3d818ff2c0e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85894</commentid>
    <comment_count>2</comment_count>
    <who name="">anon2313</who>
    <bug_when>2019-12-21 17:06:39 +0000</bug_when>
    <thetext>Thanks for the hint.  It&apos;s that easy.  This is the same change but for genericx86 targets that are part of Poky.  There&apos;s just too many other platforms that need changing (or at least there is a lot more wks files and I don&apos;t know which ones need to change).

diff --git a/meta-yocto-bsp/conf/machine/include/genericx86-common.inc b/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
index f83ce5c594..5db91bee37 100644
--- a/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
+++ b/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
@@ -20,6 +20,6 @@ GLIBC_ADDONS = &quot;nptl&quot;
 EXTRA_OECONF_append_pn-matchbox-panel-2 = &quot; --with-battery=acpi&quot;
 
 IMAGE_FSTYPES += &quot;wic wic.bmap&quot;
-WKS_FILE ?= &quot;genericx86.wks&quot;
+WKS_FILE ?= &quot;genericx86.wks.in&quot;
 do_image_wic[depends] += &quot;gptfdisk-native:do_populate_sysroot&quot;
 do_image_wic[recrdeptask] += &quot;do_bootimg&quot;
diff --git a/meta-yocto-bsp/wic/genericx86.wks b/meta-yocto-bsp/wic/genericx86.wks.in
similarity index 80%
rename from meta-yocto-bsp/wic/genericx86.wks
rename to meta-yocto-bsp/wic/genericx86.wks.in
index dab719c584..7560035148 100644
--- a/meta-yocto-bsp/wic/genericx86.wks
+++ b/meta-yocto-bsp/wic/genericx86.wks.in
@@ -4,4 +4,4 @@ part /boot --source bootimg-efi --sourceparams=&quot;loader=grub-efi&quot; --ondisk sda --
 part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid
 part swap --ondisk sda --size 44 --label swap1 --fstype=swap
 
-bootloader --ptable gpt --timeout=5 --append=&quot;rootfstype=ext4 console=ttyS0,115200 console=tty0&quot;
+bootloader --ptable gpt --timeout=5 --append=&quot;rootfstype=ext4 ${APPEND}&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86731</commentid>
    <comment_count>3</comment_count>
    <who name="Kevin Hao">kexin.hao</who>
    <bug_when>2020-03-17 01:11:37 +0000</bug_when>
    <thetext>commit dd372f09fc8a
Author: Kevin Hao &lt;kexin.hao@windriver.com&gt;
Date:   Thu Feb 13 10:31:41 2020 +0800

    wic: Honor APPEND
    
    APPEND is used to add additional parameters to kernel by features, such
    as read-only-rootfs. So we should honor this variable when we compose
    the kernel parameter in wic. I know we also can resolve this kind of
    issue by using the .wks.in template introduced by commit 42e870c5ed4b
    (&quot;image_types.bbclass: support template .wks.in files for wic&quot;), but the
    APPEND is needed by all the wks, it would seems pretty ridiculous to me
    to change all the .wks to .wks.in and then foist the APPEND into them.
    So the APPEND is definitely deserved to export to the wic directly.
    
    [Yocto #12809]
    
    (From OE-Core rev: 18981b8a457104391dfd94938c247eac04e4ed50)
    
    Signed-off-by: Kevin Hao &lt;kexin.hao@windriver.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>