Bug 59146 - drivers/atm does not compile, bug in pca200e.bin.gz
drivers/atm does not compile, bug in pca200e.bin.gz
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
7.2
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-31 13:59 EST by Michael Schwendt
Modified: 2007-04-18 12:39 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-28 05:23:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
proposed work-around (381 bytes, patch)
2002-02-01 10:37 EST, Michael Schwendt
no flags Details | Diff

  None (edit)
Description Michael Schwendt 2002-01-31 13:59:04 EST
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 10:37:42 EST
Created attachment 44261 [details]
proposed work-around
Comment 2 Michael Schwendt 2002-02-01 10:46:30 EST
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 05:23:03 EST
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 11:07:09 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.