John Klos | 10 May 2007 23:59

Cross compiling mac68k current kernel using amd64 - problem

Hi,

Cross compiling a mac68k kernel using current sources from today on a 
current (4.99.19) amd64 system results in a kernel which gives the 
following booter error:

Boot error: Failed to read header from kernel image - read 0 bytes

...

kernel_parse(COUNT_KERNEL) failed

I tried both custom kernels and GENERIC, with and without any compile 
options. I've also tested a GENERIC kernel compiled on a NetBSD 4 PowerPC 
system which works fine.

Any ideas? Does anyone want to take a look at the bad kernel?

John Klos

Luca Sironi | 14 May 2007 21:14

continuing reboot with usb devices inserted

Hi, it's some months (i know i should investigate before but the pc is
always on ;-)
i've got this strange and  very annoying behaviour.

I'm running 4.0_BETA2, kernel generic, amd64.

If i attach my usb mouse or my usb external hd after booting the pc i
could use them without any kind of problem

uhidev0 at uhub1 port 2 configuration 1 interface 0
uhidev0: Logitech USB Receiver, rev 1.10/9.10, addr 2, iclass 3/1
ums0 at uhidev0: 5 buttons and Z dir.
wsmouse0 at ums0 mux 0

umass0 at uhub4 port 3 configuration 1 interface 0
umass0: Maxtor Corporation Maxtor 3200, rev 2.00/0.01, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Maxtor, 3200, 0344> disk fixed
sd0: fabricating a geometry
sd0: 298 GB, 305245 cyl, 64 head, 32 sec, 512 bytes/sect x 625142448 sectors

if only i try to reboot the system with an usb device attached my box
just keeps on rebooting

don't know where to start..

luca
--

-- 
ascolta  http://radio.sironi.tk
(Continue reading)

Juan RP | 15 May 2007 07:39

Does bluetooth work with amd64?


Hey, I'm having problems with bluetooth on amd64 that I did not
have when I was using i386.

I have the ubt0 device configured as:

$ btconfig -vvvv ubt0
ubt0: bdaddr 00:0a:94:13:22:93 flags 0x3<UP,RUNNING>
        num_cmd = 1
        num_acl = 20, acl_mtu = 120
        num_sco = 0, sco_mtu = 0
        class: [0x02010c] Laptop Computer <Networking>
        name: "ubt0"
        voice: [0x0060]
                Input Coding: Linear PCM [16-bit, pos 0], 2's complement
                Air Coding: CVSD
        pin: variable
        options: -iscan pscan auth encrypt switch -hold -sniff -park
        ptype: [0xff1e] DM1 DH1 DM3 DH3 DM5 DH5
        page timeout: 5120 ms
        features: <3 slot> <5 slot> <encryption> <slot offset> <timing
accuracy> <role switch> <hold mode> <sniff mode> <park mode> <RSSI>
accuracy> <channel quality>
<SCO link> <HV2> <HV3> <u-Law log> <A-Law log> <CVSD data> <power control>
$

btconfig inquiry shows my other bluetooth device:

$ btconfig -v ubt0 inquiry
ubt0: bdaddr 00:0a:94:13:22:93 flags 0x3<UP,RUNNING>
(Continue reading)

Juan RP | 15 May 2007 08:04

Re: Does bluetooth work with amd64?

On Tue, 15 May 2007 07:39:24 +0200
Juan RP <juan <at> xtrarom.org> wrote:

> 
> Hey, I'm having problems with bluetooth on amd64 that I did not
> have when I was using i386.

Same happens with another bluetooth device I got:

  7093      1 obexftp  write(0x2, 0x7f7fffffdc20, 0x1f) = 31
       "Browsing 00:0f:de:a7:e7:04 ...\n"
  7093      1 obexftp  __socket30(0x1f, 0x5, 0x2)  = 4
  7093      1 obexftp  setsockopt(0x4, 0xffff, 0x80, 0x7f7fffffe5c0, 0x8) =
0 7093      1 obexftp  bind(0x4, 0x7f7fffffe5b0, 0x10) = 0
obexftp: k700i: Connection timed out
  7093      1 obexftp  connect(0x4, 0x7f7fffffe5b0, 0x10) Err#60 ETIMEDOUT

I can pair the devices just fine, and if I enable the iscan mode in ubt0
it's discoverable in the other devices... but there's not much I can do
except that.

--

-- 
http://plog.xtrarom.org/
Juan RP's blog - NetBSD/pkgsrc news in Spanish

Juan RP | 15 May 2007 09:21

Re: Does bluetooth work with amd64?

On Tue, 15 May 2007 08:12:04 +0100 (BST)
Iain Hibbert <plunky <at> rya-online.net> wrote:

> I guess its time out as in paused for some seconds, then timed out..?

Yes, it is.

> Could be related to auth being enabled, is bthcid running?

I tried with auth disabled and same happens, bthcid is running.

> what does 'hcidump -V' (as root) show?

hcidump from pkgsrc does not know about "-V" but I tried with -a
(to print info in ASCII) output of "sdpquery -a xtraeme Browse":

$ sdpquery -a xtraeme Browse 
sdpquery: sdp_open: Connection timed out
$

$ sudo hcidump -a 
HCIDump - HCI packet analyzer ver 1.5
device: any snap_len: 65540 filter: 0xffffffffffffffff
< ACL data: handle 0x0001 flags 0x02 dlen 20
> HCI Event: Number of Completed Packets(0x13) plen 5
  . . . . . 
< HCI Command: Disconnect(0x01|0x0006) plen 3
  . . . 
> HCI Event: Command Status(0x0f) plen 4
  . . . . 
(Continue reading)

Iain Hibbert | 15 May 2007 09:12

Re: Does bluetooth work with amd64?

On Tue, 15 May 2007, Juan RP wrote:

> Hey, I'm having problems with bluetooth on amd64 that I did not
> have when I was using i386.
>
> I have the ubt0 device configured as:
>
> $ btconfig -vvvv ubt0
> ubt0: bdaddr 00:0a:94:13:22:93 flags 0x3<UP,RUNNING>
>         num_cmd = 1
>         num_acl = 20, acl_mtu = 120
>         num_sco = 0, sco_mtu = 0
>         class: [0x02010c] Laptop Computer <Networking>
>         name: "ubt0"
>         voice: [0x0060]
>                 Input Coding: Linear PCM [16-bit, pos 0], 2's complement
>                 Air Coding: CVSD
>         pin: variable
>         options: -iscan pscan auth encrypt switch -hold -sniff -park
>         ptype: [0xff1e] DM1 DH1 DM3 DH3 DM5 DH5
>         page timeout: 5120 ms
>         features: <3 slot> <5 slot> <encryption> <slot offset> <timing
> accuracy> <role switch> <hold mode> <sniff mode> <park mode> <RSSI>
> accuracy> <channel quality>
> <SCO link> <HV2> <HV3> <u-Law log> <A-Law log> <CVSD data> <power control>
> $
>
> btconfig inquiry shows my other bluetooth device:
>
> $ btconfig -v ubt0 inquiry
(Continue reading)

Iain Hibbert | 15 May 2007 20:23

Re: Does bluetooth work with amd64?

On Tue, 15 May 2007, Juan RP wrote:

> On Tue, 15 May 2007 08:12:04 +0100 (BST)
> Iain Hibbert <plunky <at> rya-online.net> wrote:
>
> > Could be related to auth being enabled, is bthcid running?
>
> I tried with auth disabled and same happens, bthcid is running.
>
> > what does 'hcidump -V' (as root) show?
>
> hcidump from pkgsrc does not know about "-V" but I tried with -a
> (to print info in ASCII) output of "sdpquery -a xtraeme Browse":

Ah, my apologies - I use the latest bluez hcidump which I should package
up and commit to pkgsrc one day.

> $ sdpquery -a xtraeme Browse
> sdpquery: sdp_open: Connection timed out
> $
>
> $ sudo hcidump -a
> HCIDump - HCI packet analyzer ver 1.5
> device: any snap_len: 65540 filter: 0xffffffffffffffff
> < ACL data: handle 0x0001 flags 0x02 dlen 20
> > HCI Event: Number of Completed Packets(0x13) plen 5
>   . . . . .
> < HCI Command: Disconnect(0x01|0x0006) plen 3
>   . . .
> > HCI Event: Command Status(0x0f) plen 4
(Continue reading)

Juan RP | 15 May 2007 22:51

Re: Does bluetooth work with amd64?

On Tue, 15 May 2007 19:23:42 +0100 (BST)
Iain Hibbert <plunky <at> rya-online.net> wrote:

> Hm, this does not show the initial connection .. can you do this then;
> 'sudo hcidump -w query.out' and send the query.out file..? (I can print it
> out better in that case..)

Sure, that's the output of
"sdpquery -d ubt0 -a xtraeme Browse" and
"obexftp -b xtraeme -l":

$ sudo hcidump -r output.raw 
HCIDump - HCI packet analyzer ver 1.5
> HCI Event: Connect Request(0x04) plen 10
< HCI Command: Accept Connection Request(0x01|0x0009) plen 7
> HCI Event: Command Status(0x0f) plen 4
> HCI Event: Role Change(0x12) plen 8
> HCI Event: Link Key Request(0x17) plen 6
< HCI Command: Link Key Request Reply(0x01|0x000b) plen 22
> HCI Event: Command Complete(0x0e) plen 10
> HCI Event: Connect Complete(0x03) plen 11
< HCI Command: Write Link Policy Settings(0x02|0x000d) plen 4
> HCI Event: Command Complete(0x0e) plen 6
> HCI Event: Max Slots Change(0x1b) plen 3
> ACL data: handle 0x0003 flags 0x02 dlen 12
    L2CAP(s): Connect req: psm 1 scid 0x0040
< ACL data: handle 0x0003 flags 0x02 dlen 24
< ACL data: handle 0x0003 flags 0x02 dlen 20
> HCI Event: Number of Completed Packets(0x13) plen 5
> HCI Event: Number of Completed Packets(0x13) plen 5
(Continue reading)

Iain Hibbert | 16 May 2007 11:42

Re: Does bluetooth work with amd64?

On Tue, 15 May 2007, Juan RP wrote:

> > ACL data: handle 0x0003 flags 0x02 dlen 12
>     L2CAP(s): Connect req: psm 1 scid 0x0040
> < ACL data: handle 0x0003 flags 0x02 dlen 24
> < ACL data: handle 0x0003 flags 0x02 dlen 20

Ah, hcidump won't disassemble any of the outgoing L2CAP packets, and I see
spurious data - I think I see the problem, can you try the patch below?

(it accidentally worked on 32-bit because both lengths are 4 octets)

iain

--- /usr/src/sys/netbt/l2cap_signal.c	2007-04-21 07:17:29.000000000 +0100
+++ l2cap_signal.c	2007-05-16 10:24:17.000000000 +0100
 <at>  <at>  -918,18 +918,18  <at>  <at> 

 	/* Command Data */
 	if (length > 0)
-		m_copyback(m, sizeof(hdr) + sizeof(cmd), length, data);
+		m_copyback(m, sizeof(*hdr) + sizeof(*cmd), length, data);

 	/* Command Header */
 	cmd->code = code;
 	cmd->ident = ident;
 	cmd->length = htole16(length);
-	length += sizeof(cmd);
+	length += sizeof(*cmd);

(Continue reading)

Juan RP | 16 May 2007 11:58

Re: Does bluetooth work with amd64?

On Wed, 16 May 2007 10:42:37 +0100 (BST)
Iain Hibbert <plunky <at> rya-online.net> wrote:

> On Tue, 15 May 2007, Juan RP wrote:
> 
> > > ACL data: handle 0x0003 flags 0x02 dlen 12
> >     L2CAP(s): Connect req: psm 1 scid 0x0040
> > < ACL data: handle 0x0003 flags 0x02 dlen 24
> > < ACL data: handle 0x0003 flags 0x02 dlen 20
> 
> Ah, hcidump won't disassemble any of the outgoing L2CAP packets, and I see
> spurious data - I think I see the problem, can you try the patch below?
> 
> (it accidentally worked on 32-bit because both lengths are 4 octets)

It works! thank you very much (and don't forget to pullup the changes to
netbsd-4).

$ sdpquery -a xtraeme Browse

Record Handle: 0x00010000
Service Class ID List:
        PNP Information (0x1200)

Record Handle: 0x00010001
Service Class ID List:
        0x00000002-0000-1000-8000-0002ee000002
Protocol Descriptor List:
        L2CAP (0x0100)
        RFCOMM (0x0003)
(Continue reading)


Gmane