problems with hdparm in svn 15237

Ken McGuire kenm at desertweyr.com
Tue May 30 07:54:14 PDT 2006


Hi Rob,

 I've been following the recent threads where people were having problems 
with hdparm not building. I too have had similar problems.  Not being a 
programmer, I just waited a while till it seemed like things had settled out 
and I tried again. I am having 2 basic problems building the latest svn 
(15237), my native x86 build produces compilation errors, and my native ppc 
build has execution errors.

1) on x86 I am building busybox with gcc 3.3.2 and I get the following error 
from "make clean defconfig busybox" :

.....
  CC miscutils/hdparm.o
/mnt/hda3/usr/local3/busybox-20060530/miscutils/hdparm.c: In function `do_blkgetsize':
/mnt/hda3/usr/local3/busybox-20060530/miscutils/hdparm.c:1376: error: `BLKGETSIZE64' undeclared (first use in this function)
/mnt/hda3/usr/local3/busybox-20060530/miscutils/hdparm.c:1376: error: (Each undeclared identifier is reported only once
/mnt/hda3/usr/local3/busybox-20060530/miscutils/hdparm.c:1376: error: for each function it appears in.)
make[1]: *** [/mnt/hda3/usr/local3/busybox-20060530/miscutils/hdparm.o] Error 1
make: *** [busybox] Error 2

Grepping for BLKGETSIZE64 in the busybox source, it seems to be defined in 
several places, but not in hdparm.c. Grepping more generally it is defined in 
linux kernel headers in linux/fs.h in both 2.4 & 2.6. 

2) on ppc (ubuntu 5.10) with gcc 4.0.2

"make clean defconfig busybox"

builds without errors and the applets run, but hdparm produces incorrect 
results.

./busybox hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media
powers-up in standby; SET FEATURES subcmd spins-up.

        WARNING: ID response incomplete.
        Following data may be incorrect.

        Model Number:       CI520N01TAAD400-
        Serial Number:      1 H7791M2116
        Firmware Revision:  ADOC7AA6
Standards:
        Supported: 13 12 11 10
        Likely used: 13
Configuration:
        Logical         max     current
        cylinders       65343   0
        heads           4096    0
        sectors/track   16128   0

...... (more incorrect stuff here)


Whereas the "real" hdparm (v6.1) in ubuntu produces:

hdparm -I /dev/hda

/dev/hda:

ATA device, with non-removable media
        Model Number:       IC25N010ATDA04-0
        Serial Number:      17H97M11261
        Firmware Revision:  DACOA76A
Standards:
        Used: ATA/ATAPI-5 T13 1321D revision 3
        Supported: 5 4 3 2 & some of 6
Configuration:
        Logical         max     current
        cylinders       16383   16383
        heads           16      16
        sectors/track   63      63

...... (more correct stuff here)

 Looking at the Model & Serial # fields, I'd bet this is an endian issue.
As to the x86 errors, I'm sure adding a #define in hdparm.c would fix it, but 
that may not be where it really needs to go.

Hope this helps bring busybox along towards 1.2.

  ...ken...



More information about the busybox mailing list