Bug 59146

Summary: drivers/atm does not compile, bug in pca200e.bin.gz
Product: [Retired] Red Hat Linux Reporter: Michael Schwendt <bugs.michael>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WORKSFORME QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: athlon   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-02-28 10:23:08 UTC Type: ---
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
proposed work-around none

Description Michael Schwendt 2002-01-31 18:59:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226

Description of problem:
In the kernel source "drivers/atm" directory an uncompressed binary data file is
created with a wrong file name:

  pca200e.bin}

The closing curly brace at the end is stored as original uncompressed file name
inside the gzip header.

make[2]: Entering directory /home/ms/linux-2.4.9-21/drivers/atm'
objcopy -Iihex pca200e.data -Obinary pca200e.bin.gz
objcopy: Warning: Output file cannot represent architecture UNKNOWN!
gzip -df pca200e.bin.gz
./fore200e_mkfirm -k -b _fore200e_pca_fw \
  -i pca200e.bin -o fore200e_pca_fw.c
  ./fore200e_mkfirm: can't open pca200e.bin for reading
  make[2]: *** [fore200e_pca_fw.c] Error 254
  make[2]: Leaving directory
/home/ms/linux-2.4.9-21/drivers/atm'
make[1]: *** [_modsubdir_atm] Error 2
make[1]: Leaving directory /home/ms/linux-2.4.9-21/drivers'
make: *** [_mod_drivers] Error 2


Version-Release number of selected component (if applicable):
2.4.9-21
kernel-source package


How reproducible:
Always

Steps to Reproduce:
This is what the drives/atm/Makefile does:

1. cd /usr/src/linux-2.4/drivers/atm
2. objcopy -Iihex pca200e.data -Obinary pca200e.bin.gz
3. gzip -df pca200e.bin.gz


Actual Results:  # objcopy -Iihex pca200e.data -Obinary pca200e.bin.gz
objcopy: Warning: Output file cannot represent architecture UNKNOWN!
# gzip -df pca200e.bin.gz

Uncompressed file created: pca200e.bin}


Expected Results: 

Uncompressed file created: pca200e.bin


Additional info:

# file pca200e.bin.gz 
pca200e.bin.gz: gzip compressed data, deflated, original filename,
`pca200e.bin}', last modified: Fri Oct 22 14:38:03 1999, max compression, os: Unix

shows that file name "pca200e.bin}" is in there. One fix would be to add gzip
option -n in the Makefile to not use the original file name which is stored in
the file.

# rpm --verify kernel-source binutils gzip
$ rpm -q gzip binutils
gzip-1.3-15
binutils-2.11.90.0.8-9

Comment 1 Michael Schwendt 2002-02-01 15:37:42 UTC
Created attachment 44261 [details]
proposed work-around

Comment 2 Michael Schwendt 2002-02-01 15:46:30 UTC
The other data files pca200e_ecd.bin.gz and sba200e_ecd.bin.gz break this:

$ objcopy -Iihex pca200e_ecd.data -Obinary pca200e_ecd.bin.gz
objcopy: Warning: Output file cannot represent architecture UNKNOWN!
$ file pca200e_ecd.bin.gz 
pca200e_ecd.bin.gz: gzip compressed data, deflated, original filename,
`pca200e_ecd.bin2}', last modified: Fri Oct 22 14:38:04 1999, max compression,
os: Unix

Ought to be: pca200e_ecd.bin2

$ objcopy -Iihex sba200e_ecd.data -Obinary sba200e_ecd.bin.gz
objcopy: Warning: Output file cannot represent architecture UNKNOWN!
$ file sba200e_ecd.bin.gz 
sba200e_ecd.bin.gz: gzip compressed data, deflated, original filename,
`sba200e_ecd.bin2}', last modified: Fri Oct 22 14:38:04 1999, max compression,
os: Unix

Ought to be: sba200e_ecd.bin2

So, gzip option -n won't be enough here. Wonder where that } comes from...


Comment 3 Michael Schwendt 2002-02-28 10:23:03 UTC
Wonder whether or why I'm the only one still seeing this bug?
This might be one way to correct the original filenames inside the gzip files.

cd /usr/src/linux-2.4/drivers/atm
objcopy -Iihex pca200e.data -Obinary pca200e.bin.gz
objcopy -Iihex pca200e_ecd.data -Obinary pca200e_ecd.bin2.gz
objcopy -Iihex sba200e_ecd.data -Obinary sba200e_ecd.bin2.gz
gunzip -n pca200e.bin.gz
gunzip -n pca200e_ecd.bin2.gz
gunzip -n sba200e_ecd.bin2.gz
gzip pca200e.bin
gzip pca200e_ecd.bin2
gzip sba200e_ecd.bin2
objcopy -Ibinary pca200e.bin.gz -Oihex pca200e.data
objcopy -Ibinary pca200e_ecd.bin2.gz -Oihex pca200e_ecd.data
objcopy -Ibinary sba200e_ecd.bin2.gz -Oihex sba200e_ecd.data
rm pca200e.bin.gz  pca200e_ecd.bin2.gz  sba200e_ecd.bin2.gz


Comment 4 Michael Schwendt 2002-05-23 15:07:09 UTC
It's "export GZIP=-9N" that causes the bad file names inside the gzipped
archives to show up (option -N is gzip default according to the man page).

The second comment from 2002-02-01 is wrong.

I would still suggest uncompressing the files with "gzip -dfn", but since hardly
any user has set the GZIP environment variable, I close this report for now. 

Nevertheless, the file names inside the archives are bad and should be corrected
some day.