Discussion:
'device atapicam' breaks the build
(too old to reply)
Yuri
2012-10-29 04:43:11 UTC
Permalink
Following atapicam(4), I added 'device atapicam' into
sys/amd64/conf/GENERIC. This causes 'make buildkernel' to fail:

ld -d -warn-common -r -d -o zlib.ko.debug zlib.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk zlib.ko.debug export_syms |
xargs -J% objcopy % zlib.ko.debug
objcopy --only-keep-debug zlib.ko.debug zlib.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.symbols zlib.ko.debug
zlib.ko
1 error
*** [buildkernel] Error code 2
1 error
*** [buildkernel] Error code 2
1 error

Also loading it manually with 'kldload atapicam' fails:
kldload: can't load atapicam: Exec format error
with system log having an error: link_elf_obj: symbol ata_controlcmd
undefined

What is wrong with atapicam?

I need atapicam because section 23.3.3 of handbook suggests that it is a
prerequisite for being able to use DVD drive from the vbox guests.

Yuri

9.1-RC3
Erich Dollansky
2012-10-29 04:53:14 UTC
Permalink
Hi,

On Sun, 28 Oct 2012 21:42:44 -0700
Post by Yuri
Following atapicam(4), I added 'device atapicam' into
ld -d -warn-common -r -d -o zlib.ko.debug zlib.o
:> export_syms
awk -f /usr/src/sys/conf/kmod_syms.awk zlib.ko.debug export_syms |
xargs -J% objcopy % zlib.ko.debug
objcopy --only-keep-debug zlib.ko.debug zlib.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.symbols
zlib.ko.debug zlib.ko
1 error
*** [buildkernel] Error code 2
1 error
*** [buildkernel] Error code 2
1 error
kldload: can't load atapicam: Exec format error
with system log having an error: link_elf_obj: symbol ata_controlcmd
undefined
What is wrong with atapicam?
I need atapicam because section 23.3.3 of handbook suggests that it
is a prerequisite for being able to use DVD drive from the vbox
guests.
Yuri
9.1-RC3
I found this in my kernel configuration.
#
# 21.06.12 ed:
#
# atapicam or ATA_CAM can be defined. We have a try first with this one
# removed. Switch both if writing to a DVD fails.
#
# options ATA_CAM # Handle
legacy controllers with CAM
# options ATA_STATIC_ID # Static device numbering

It looks like you have to disable above's options.

Erich
Yuri
2012-10-29 07:28:13 UTC
Permalink
Post by Erich Dollansky
# options ATA_CAM # Handle
legacy controllers with CAM
# options ATA_STATIC_ID # Static device numbering
It looks like you have to disable above's options.
Unfortunately the root disk on this machine is attached to ata3 and
isn't visible when 'device ATA_CAM' is commented out. (mountroot> prompt
shows up on boot only listing ahci-compatible disks).
Does this mean that in order to see such (older) disks I have to have
'device ATA_CAM'? Or there is some workaround?
Does it also mean that atapicam won't load in case such older disks are
in use? If yes, why there is such dependency?

Yuri
Yuri
2012-10-29 08:27:02 UTC
Permalink
Post by Yuri
Unfortunately the root disk on this machine is attached to ata3 and
isn't visible when 'device ATA_CAM' is commented out. (mountroot>
prompt shows up on boot only listing ahci-compatible disks).
Actually BIOS has the option to present SATA as AHCI, so this solves the
problem.

Yuri
Alexander Motin
2012-10-29 18:20:32 UTC
Permalink
Hi.

I haven't used vbox much, but I guess that mentioned handbook section is
outdated. You should not need atapicam at all since FreeBSD 9.0. If you
still wish to revert to old ATA stack and so atapicam, look at UPDATING
record from 20110424.
--
Alexander Motin
Loading...