Bug 1272790

Summary: fcode-utils is broken on big endian architecture
Product: [Fedora] Fedora Reporter: Laurent Vivier <lvivier>
Component: fcode-utilsAssignee: Peter Lemenkov <lemenkov>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: lemenkov
Target Milestone: ---   
Target Release: ---   
Hardware: ppc64   
OS: Unspecified   
Whiteboard:
Fixed In Version: fcode-utils-1.0.2-13.svn1354.fc23 fcode-utils-1.0.2-13.svn1354.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-17 17:52:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch, tested with openbios. none

Description Laurent Vivier 2015-10-18 22:52:44 UTC
Created attachment 1084194 [details]
patch, tested with openbios.

Description of problem:

Trying to compile openbios on Fedora 22 ppc64, I had the following error:

toke -o QEMU,VGA.bin ~/openbios/drivers/vga.fs
...
Tokenizing  ~/openbios/drivers/vga.fs   Binary output to QEMU,VGA.bin 
Warning:  File ~/openbios/drivers/vga.fs, Line 1.  Unterminated comment
Nothing Tokenized.  1 Warning.

This can be reproduced with the fcode-utils examples.

Version-Release number of selected component (if applicable):

fcode-utils-1.0.2-11.fc22

How reproducible:

100%

Steps to Reproduce:
1. Download the fcode-utils source package
2. cd fcode-utils/toke
3. toke examples/case.fs

Actual results:

Tokenizing  examples/case.fs   Binary output to examples/case.fc 
Warning:  File examples/case.fs, Line 1.  Unterminated comment
Nothing Tokenized.  1 Warning.

Expected results:

Tokenizing  examples/case.fs   Binary output to examples/case.fc 
Tokenization Completed. .
toke: wrote 67 bytes to bytecode file 'examples/case.fc'

Additional info:

"toke" is parsing the comment line until it finds a '\n'.
The '\n' is stored in char which is a field in an union, but it is read as a long. It works well on little endian but not on big endian.

Comment 1 Laurent Vivier 2015-11-06 16:59:58 UTC
Fixed upstream by:

http://tracker.coreboot.org/trac/openbios/changeset/1354

Comment 2 Fedora Update System 2016-01-08 14:09:01 UTC
fcode-utils-1.0.2-13.svn1354.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9f055e78f8

Comment 3 Fedora Update System 2016-01-09 04:24:40 UTC
fcode-utils-1.0.2-13.svn1354.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9f055e78f8

Comment 4 Fedora Update System 2016-01-09 04:26:33 UTC
fcode-utils-1.0.2-13.svn1354.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0bf8cc878f

Comment 5 Fedora Update System 2016-01-17 17:52:09 UTC
fcode-utils-1.0.2-13.svn1354.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2016-01-17 18:51:12 UTC
fcode-utils-1.0.2-13.svn1354.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.