Skip to contentSkip to conversation

#yocto #dunfell

DISCUSSION Monsees, Steven C (US) 2 participants 3 messages Sep 20, 2022 2 messages not in the archive Library code

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Any hints or ideas on what I might be doing wrong would be appreciated…

From: [email protected] <[email protected]> On Behalf Of Monsees, Steven C (US) via lists.yoctoproject.org
Sent: Monday, September 19, 2022 2:22 PM
To: [email protected]
Subject: [yocto] #yocto #dunfell

External Email Alert

This email has been sent from an account outside of the BAE Systems network.
Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar.

I am seeing an error when I attempt to apply a patch, and could use some clarification or way to resolve…

Am doing something wrong in patch creation ?
What is meant by : ”Patch console.patch does not apply (enforce with -f)” ? How can I best resolve this issue ?

I edited a file in the recipe’s git repo in order to create the patch for the change:

git diff -u console.c

which I used as my patch:

lib/console.c +1 -1
index 9c10560..b932a44 100644
@@ -357,7 +357,7 @@ static struct {
        {  EFI_SECURITY_VIOLATION,     L"Security Violation"},
 
        // warnings
-       {  EFI_WARN_UNKOWN_GLYPH,      L"Warning Unknown Glyph"},
+       {  EFI_WARN_UNKNOWN_GLYPH,     L"Warning Unknown Glyph"},
        {  EFI_WARN_DELETE_FAILURE,    L"Warning Delete Failure"},
        {  EFI_WARN_WRITE_FAILURE,     L"Warning Write Failure"},
        {  EFI_WARN_BUFFER_TOO_SMALL,  L"Warning Buffer Too Small"},

I am getting the following error when the patch is applied:

ERROR: efitools-native-1.7.0+gitAUTOINC+0649468475-r0 do_patch: Applying patch 'console.patch' on target directory '/disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/git' Command Error: 'quilt --quiltrc /disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output:
Applying patch console.patch
patching file lib/console.c
Hunk #1 FAILED at 357.
1 out of 1 hunk FAILED -- rejects in file lib/console.c
Patch console.patch does not apply (enforce with -f)
ERROR: Logfile of failure stored in: /disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/temp/log.do_patch.7615
ERROR: Task (/disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/meta-bae/meta-limws/meta-intel/meta-sbca/recipes-bsp/efitools/efitools-native_git.bb:do_patch) failed with exit code '1'

Thanks,
Steve

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Hi,

SBSA is EDK2 based, which is basically incredibly painful to patch. The source files are windows-style CR/LF so your patch needs to have CR/LF, but if the whole patch has CR/LF then git “helpfully” transforms the patch to just unix-style LF, which doesn’t apply.

The “solution” (workaround) is to convert the patch to LF encoding, and manually add the CR characters to the end of each line in the patch body.

The good news is that EDK2 is moving to LF encoding, so this will be solved at some point.

Ross

From: [email protected] <[email protected]> on behalf of Monsees, Steven C (US) via lists.yoctoproject.org <[email protected]>
Date: Tuesday, 20 September 2022 at 16:05
To: Monsees, Steven C (US) <[email protected]>, [email protected] <[email protected]>
Subject: Re: [yocto] #yocto #dunfell

Any hints or ideas on what I might be doing wrong would be appreciated…

From: [email protected] <[email protected]> On Behalf Of Monsees, Steven C (US) via lists.yoctoproject.org
Sent: Monday, September 19, 2022 2:22 PM
To: [email protected]
Subject: [yocto] #yocto #dunfell

External Email Alert
This email has been sent from an account outside of the BAE Systems network.
Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar.

I am seeing an error when I attempt to apply a patch, and could use some clarification or way to resolve…

Am doing something wrong in patch creation ?
What is meant by : ”Patch console.patch does not apply (enforce with -f)” ? How can I best resolve this issue ?

I edited a file in the recipe’s git repo in order to create the patch for the change:

git diff -u console.c

which I used as my patch:

lib/console.c +1 -1
index 9c10560..b932a44 100644
@@ -357,7 +357,7 @@ static struct {
        {  EFI_SECURITY_VIOLATION,     L"Security Violation"},
 
        // warnings
-       {  EFI_WARN_UNKOWN_GLYPH,      L"Warning Unknown Glyph"},
+       {  EFI_WARN_UNKNOWN_GLYPH,     L"Warning Unknown Glyph"},
        {  EFI_WARN_DELETE_FAILURE,    L"Warning Delete Failure"},
        {  EFI_WARN_WRITE_FAILURE,     L"Warning Write Failure"},
        {  EFI_WARN_BUFFER_TOO_SMALL,  L"Warning Buffer Too Small"},

I am getting the following error when the patch is applied:

ERROR: efitools-native-1.7.0+gitAUTOINC+0649468475-r0 do_patch: Applying patch 'console.patch' on target directory '/disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/git' Command Error: 'quilt --quiltrc /disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output:
Applying patch console.patch
patching file lib/console.c
Hunk #1 FAILED at 357.
1 out of 1 hunk FAILED -- rejects in file lib/console.c
Patch console.patch does not apply (enforce with -f)
ERROR: Logfile of failure stored in: /disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/temp/log.do_patch.7615
ERROR: Task (/disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/meta-bae/meta-limws/meta-intel/meta-sbca/recipes-bsp/efitools/efitools-native_git.bb:do_patch) failed with exit code '1'

Thanks,
Steve

#4 lore raw

Thanks... will give it a try.

From: Ross Burton <[email protected]>
Sent: Tuesday, September 20, 2022 11:38 AM
To: Monsees, Steven C (US) <[email protected]>; [email protected]
Subject: Re: [yocto] #yocto #dunfell

External Email Alert

This email has been sent from an account outside of the BAE Systems network.
Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access "Cybersecurity OneSpace Page" and report phishing by clicking the button "Report Phishing" on the Outlook toolbar.

Hi,

SBSA is EDK2 based, which is basically incredibly painful to patch. The source files are windows-style CR/LF so your patch needs to have CR/LF, but if the whole patch has CR/LF then git "helpfully" transforms the patch to just unix-style LF, which doesn't apply.

The "solution" (workaround) is to convert the patch to LF encoding, and manually add the CR characters to the end of each line in the patch body.

The good news is that EDK2 is moving to LF encoding, so this will be solved at some point.

Ross

From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> on behalf of Monsees, Steven C (US) via lists.yoctoproject.org <[email protected]<mailto:[email protected]>>
Date: Tuesday, 20 September 2022 at 16:05
To: Monsees, Steven C (US) <[email protected]<mailto:[email protected]>>, [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>
Subject: Re: [yocto] #yocto #dunfell

Any hints or ideas on what I might be doing wrong would be appreciated...

From: [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> On Behalf Of Monsees, Steven C (US) via lists.yoctoproject.org
Sent: Monday, September 19, 2022 2:22 PM
To: [email protected]<mailto:[email protected]>
Subject: [yocto] #yocto #dunfell

External Email Alert

This email has been sent from an account outside of the BAE Systems network.
Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros. For further information on how to spot phishing, access "Cybersecurity OneSpace Page" and report phishing by clicking the button "Report Phishing" on the Outlook toolbar.

I am seeing an error when I attempt to apply a patch, and could use some clarification or way to resolve...

Am doing something wrong in patch creation ?
What is meant by : "Patch console.patch does not apply (enforce with -f)" ? How can I best resolve this issue ?

I edited a file in the recipe's git repo in order to create the patch for the change:

git diff -u console.c

which I used as my patch:

lib/console.c +1 -1
index 9c10560..b932a44 100644
@@ -357,7 +357,7 @@ static struct {
        {  EFI_SECURITY_VIOLATION,     L"Security Violation"},
 
        // warnings
-       {  EFI_WARN_UNKOWN_GLYPH,      L"Warning Unknown Glyph"},
+       {  EFI_WARN_UNKNOWN_GLYPH,     L"Warning Unknown Glyph"},
        {  EFI_WARN_DELETE_FAILURE,    L"Warning Delete Failure"},
        {  EFI_WARN_WRITE_FAILURE,     L"Warning Write Failure"},
        {  EFI_WARN_BUFFER_TOO_SMALL,  L"Warning Buffer Too Small"},

I am getting the following error when the patch is applied:

ERROR: efitools-native-1.7.0+gitAUTOINC+0649468475-r0 do_patch: Applying patch 'console.patch' on target directory '/disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/git' Command Error: 'quilt --quiltrc /disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output:
Applying patch console.patch
patching file lib/console.c
Hunk #1 FAILED at 357.
1 out of 1 hunk FAILED -- rejects in file lib/console.c
Patch console.patch does not apply (enforce with -f)
ERROR: Logfile of failure stored in: /disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/builds/sbca-default/tmp/work/x86_64-linux/efitools-native/1.7.0+gitAUTOINC+0649468475-r0/temp/log.do_patch.7615
ERROR: Task (/disk0/scratch/yocto/workspace/poky-dunfell-23.0.19/meta-bae/meta-limws/meta-intel/meta-sbca/recipes-bsp/efitools/efitools-native_git.bb:do_patch) failed with exit code '1'

Thanks,
Steve