Skip to content

Instantly share code, notes, and snippets.

@jadonk
Created October 25, 2020 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jadonk/54dc2c04695ace7cb2489ee334043419 to your computer and use it in GitHub Desktop.
Save jadonk/54dc2c04695ace7cb2489ee334043419 to your computer and use it in GitHub Desktop.
Welcome to Buildroot
buildroot login: root
Password:
# /opt/gbridge.sh
#!/bin/sh -xv
#ATMOD=`lsmod | grep atusb`
#if [ "$ATMOD" == "" ]; then
# modprobe atusb
#fi
#sleep 1
IFLP=`ifconfig | grep lowpan`
+ grep lowpan
+ ifconfig
+ IFLP=
ip link set wpan0 down
+ ip link set wpan0 down
iwpan phy phy0 set channel 0 26
+ iwpan phy phy0 set channel 0 26
iwpan dev wpan0 set pan_id 0xabcd
+ iwpan dev wpan0 set pan_id 0xabcd
if [ "$IFLP" == "" ]; then
ip link add link wpan0 name lowpan0 type lowpan
ip link set lowpan0 up
fi
+ '[' '==' ]
+ ip link add link wpan0 name lowpan0 type lowpan
+ ip link set lowpan0 up
ip link set wpan0 up
+ ip link set wpan0 up
ip -6 addr add 2001:db8::2/64 dev lowpan0
+ ip -6 addr add 2001:db8::2/64 dev lowpan0
sleep 1
+ sleep 1
killall -9 gbridge
+ killall -9 gbridge
killall: gbridge: no process killed
sleep 1
+ sleep 1
NLMOD=`lsmod | grep gb_netlink`
+ lsmod
+ grep gb_netlink
+ NLMOD=
if [ "$NLMOD" == "" ]; then
# modprobe greybus
modprobe gb-netlink
# modprobe gb-bootrom
# modprobe gb-gbphy
# modprobe gb-loopback
# modprobe gb-spilib
# modprobe gb-firmware
# modprobe gb-log
# modprobe gb-raw
fi
+ '[' '==' ]
+ modprobe gb-netlink
gb_netlink: loading out-of-tree module taints kernel.
sleep 1
+ sleep 1
#gbridge > /var/log/gbridge
gbridge
+ gbridge
netlink: Initializing the controller
TCP/IP: Initializing the controller
TCP/IP: Creating the event loop thread
greybus_send_request:
0a 00 01 00 01 00 02 00 00 01
controller_write:
0a 00 01 00 01 00 02 00 00 01
greybus_handler:
0a 00 01 00 81 00 00 00 00 01
greybus_send_request:
0b 00 01 00 02 00 00 00 55 47 00
controller_write:
0b 00 01 00 02 00 00 00 55 47 00
greybus_handler:
08 00 01 00 82 00 00 00
greybus_handler:
47 00 02 00 10 00 00 00 00 01 05 02 01 01 00 05
02 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00
greybus_send_response:
09 00 02 00 90 00 00 00 01
controller_write:
09 00 02 00 90 00 00 00 01
greybus_send_request:
0c 00 01 00 1f 7f 00 00 02 01 00 00
controller_write:
0c 00 01 00 1f 7f 00 00 02 01 00 00
greybus_handler:
08 00 01 00 9f 00 00 00
greybus_handler:
09 00 03 00 21 00 00 00 02
greybus_send_response:
09 00 03 00 a1 00 00 00 00
controller_write:
09 00 03 00 a1 00 00 00 00
greybus_handler:
09 00 04 00 23 00 00 00 02
greybus_send_response:
09 00 04 00 a3 00 00 00 00
controller_write:
09 00 04 00 a3 00 00 00 00
greybus_handler:
09 00 05 00 25 00 00 00 02
greybus_send_response:
09 00 05 00 a5 00 00 00 00
controller_write:
09 00 05 00 a5 00 00 00 00
greybus_handler:
09 00 06 00 27 00 00 00 02
greybus_send_response:
0a 00 06 00 a7 00 00 00 00 03
controller_write:
0a 00 06 00 a7 00 00 00 00 03
greybus_handler:
0d 00 07 00 09 00 00 00 02 03 50 00 00
greybus_send_response:
0e 00 07 00 89 00 00 00 00 00 26 01 00 00
controller_write:
0e 00 07 00 89 00 00 00 00 00 26 01 00 00
greybus_handler:
0d 00 08 00 09 00 00 00 02 04 50 00 00
greybus_send_response:
0e 00 08 00 89 00 00 00 00 00 26 01 00 00
controller_write:
0e 00 08 00 89 00 00 00 00 00 26 01 00 00
greybus_handler:
0d 00 09 00 09 00 00 00 02 00 60 00 00
greybus_send_response:
0e 00 09 00 89 00 00 00 00 00 26 01 00 00
controller_write:
0e 00 09 00 89 00 00 00 00 00 26 01 00 00
greybus_handler:
0d 00 0a 00 09 00 00 00 02 01 60 00 00
greybus_send_response:
0e 00 0a 00 89 00 00 00 00 00 26 01 00 00
controller_write:
0e 00 0a 00 89 00 00 00 00 00 26 01 00 00
greybus_handler:
0d 00 0b 00 09 00 00 00 02 02 60 00 00
greybus_send_response:
0e 00 0b 00 89 00 00 00 00 00 26 01 00 00
controller_write:
0e 00 0b 00 89 00 00 00 00 00 26 01 00 00
greybus_handler:
0d 00 0c 00 09 00 00 00 02 03 60 00 00
greybus_send_response:
0e 00 0c 00 89 00 00 00 00 00 26 01 00 00
controller_write:
0e 00 0c 00 89 00 00 00 00 00 26 01 00 00
greybus_handler:
0a 00 0d 00 03 00 00 00 02 02
greybus_send_response:
08 00 0d 00 83 00 00 00
controller_write:
08 00 0d 00 83 00 00 00
greybus_handler:
0c 00 0e 00 0b 00 00 00 00 01 02 02
greybus_send_response:
08 00 0e 00 8b 00 00 00
controller_write:
08 00 0e 00 8b 00 00 00
greybus 1-2.2: Interface added (greybus)
greybus 1-2.2: GMP VID=0x00000126, PID=0x00000126
greybus 1-2.2: DDBL1 Manufacturer=0x00000126, Product=0x00000126
greybus_handler:
0d 00 0f 00 09 00 00 00 02 01 61 00 00
greybus_send_response:
0e 00 0f 00 89 00 00 00 00 00 26 01 00 00
controller_write:
0e 00 0f 00 89 00 00 00 00 00 26 01 00 00
greybus_handler:
11 00 10 00 0a 00 00 00 02 01 61 00 00 00 00 00
00
greybus_send_response:
0a 00 10 00 8a 00 00 00 00 00
controller_write:
0a 00 10 00 8a 00 00 00 00 00
greybus_handler:
10 00 11 00 07 00 00 00 00 01 00 02 00 00 00 07
Trying to connect to module at 2001:db8::1:4242
Connected to module
greybus_send_response:
08 00 11 00 87 00 00 00
controller_write:
08 00 11 00 87 00 00 00
controller_write:
0a 00 02 00 01 00 00 00 00 01
connection_recv:
0a 00 02 00 81 00 00 00 00 01
controller_write:
0a 00 02 00 81 00 00 00 00 01
controller_write:
08 00 03 00 03 00 00 00
connection_recv:
0a 00 03 00 83 00 00 00 80 00
controller_write:
0a 00 03 00 83 00 00 00 80 00
controller_write:
08 00 04 00 04 00 00 00
connection_recv:
88 00 04 00 84 00 00 00 80 00 00 01 08 00 03 00
02 0a 00 00 08 00 03 00 01 0a 00 00 08 00 03 00
00 00 00 00 08 00 04 00 00 00 00 00 08 00 01 00
01 02 00 00 28 00 02 00 22 02 47 72 65 79 62 75
73 20 53 65 72 76 69 63 65 20 53 61 6d 70 6c 65
20 41 70 70 6c 69 63 61 74 69 6f 6e 1c 00 02 00
13 01 5a 65 70 68 79 72 20 50 72 6f 6a 65 63 74
20 52 54 4f 53 00 00 00 08 00 04 00 01 00 01 02
08 00 04 00 02 00 02 03
controller_write:
88 00 04 00 84 00 00 00 80 00 00 01 08 00 03 00
02 0a 00 00 08 00 03 00 01 0a 00 00 08 00 03 00
00 00 00 00 08 00 04 00 00 00 00 00 08 00 01 00
01 02 00 00 28 00 02 00 22 02 47 72 65 79 62 75
73 20 53 65 72 76 69 63 65 20 53 61 6d 70 6c 65
20 41 70 70 6c 69 63 61 74 69 6f 6e 1c 00 02 00
13 01 5a 65 70 68 79 72 20 50 72 6f 6a 65 63 74
20 52 54 4f 53 00 00 00 08 00 04 00 01 00 01 02
08 00 04 00 02 00 02 03
greybus_handler:
08 00 12 00 13 00 00 00
greybus_send_response:
08 00 12 00 93 00 00 00
controller_write:
08 00 12 00 93 00 00 00
controller_write:
08 00 05 00 13 00 00 00
connection_recv:
09 00 05 00 93 00 00 00 00
controller_write:
09 00 05 00 93 00 00 00 00
controller_write:
0a 00 06 00 0c 00 00 00 00 00
greybus_handler:
08 00 13 00 13 00 00 00
greybus_send_response:
08 00 13 00 93 00 00 00
controller_write:
08 00 13 00 93 00 00 00
connection_recv:
08 00 06 00 8c 00 00 00
controller_write:
08 00 06 00 8c 00 00 00
controller_write:
09 00 07 00 00 00 00 00 01
connection_recv:
08 00 07 00 80 00 00 00
controller_write:
08 00 07 00 80 00 00 00
controller_write:
09 00 08 00 00 00 00 00 02
connection_recv:
08 00 08 00 80 00 00 00
controller_write:
08 00 08 00 80 00 00 00
greybus_handler:
0e 00 14 00 08 00 00 00 00 01 00 02 00 00
greybus_send_response:
gbridge[165]: segfault at 0 ip 00000000004040a7 sp 00007f6c71a5a7c0 error 4 in gbridge[402000+3000]
Code: d2 48 29 d3 49 01 d5 eb a6 45 31 e4 5a 44 89 e0 5b 5d 41 5c 41 5d c3 41 55 ba 08 00 00 00 41 54 55 53 48 89 f3 51 4c 8b 6f 18 <419
08 00 14 00 88 00 00 00
controller_write:
08 00 14 00 88 00 00 00
Segmentation fault
# greybus greybus1: 0/0:0: synchronous operation id 0x0014 of type 0x08 failed: -110
greybus 1-svc: failed to destroy connection (0:1 2:0): -110
------------[ cut here ]------------
WARNING: CPU: 0 PID: 27 at include/linux/skbuff.h:2666 skb_trim+0x26/0x30
Modules linked in: gb_netlink(O)
CPU: 0 PID: 27 Comm: kworker/0:1 Tainted: G O 5.8.14 #4
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014
Workqueue: pm pm_runtime_work
RIP: 0010:skb_trim+0x26/0x30
Code: 00 00 00 00 39 77 68 76 20 8b 47 6c 85 c0 75 1a 48 8b 87 b8 00 00 00 48 2b 87 b0 00 00 00 89 77 68 01 c6 89 b7 a8 00 00 00 c3 <0f4
RSP: 0018:ffff9d6fc00b3c28 EFLAGS: 00000282
RAX: 00000000ffff9120 RBX: 0000000000000000 RCX: 00000000000006db
RDX: 00000000000006da RSI: 0000000000000000 RDI: ffff91209f183500
RBP: ffff9d6fc00b3c68 R08: ffff91209e322000 R09: 0000000000000000
R10: 0000000000000000 R11: ffff91209e28e239 R12: ffff91209f183500
R13: ffff91209f2b6cc0 R14: ffff91209e322014 R15: 00000000ffffff91
FS: 0000000000000000(0000) GS:ffff91209f400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff229c5ae20 CR3: 000000001e238000 CR4: 00000000000006f0
Call Trace:
? message_send+0xb9/0x15b [gb_netlink]
gb_operation_request_send+0xdf/0x180
gb_operation_request_send_sync_timeout+0x1c/0x50
gb_operation_sync_timeout+0x86/0xf0
gb_svc_intf_set_power_mode_hibernate+0x70/0x90
gb_interface_suspend+0x55/0xa0
? gb_interface_resume+0x50/0x50
__rpm_callback+0x79/0x140
? gb_interface_resume+0x50/0x50
rpm_callback+0x1f/0x80
? gb_interface_resume+0x50/0x50
rpm_suspend+0xfd/0x490
? __switch_to_asm+0x32/0x60
? __switch_to_asm+0x26/0x60
pm_runtime_work+0x80/0x90
process_one_work+0x1bf/0x310
worker_thread+0x45/0x3b0
kthread+0x10a/0x140
? current_work+0x40/0x40
? kthread_park+0x90/0x90
ret_from_fork+0x22/0x30
---[ end trace e0499fbd6005c9af ]---
greybus greybus1: 0/0:0: synchronous operation id 0x0015 of type 0x10 failed: -111
greybus 1-svc: failed to send set power mode operation to interface 2: -111
------------[ cut here ]------------
WARNING: CPU: 0 PID: 27 at include/linux/skbuff.h:2666 skb_trim+0x26/0x30
Modules linked in: gb_netlink(O)
CPU: 0 PID: 27 Comm: kworker/0:1 Tainted: G W O 5.8.14 #4
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014
Workqueue: events do_work
RIP: 0010:skb_trim+0x26/0x30
Code: 00 00 00 00 39 77 68 76 20 8b 47 6c 85 c0 75 1a 48 8b 87 b8 00 00 00 48 2b 87 b0 00 00 00 89 77 68 01 c6 89 b7 a8 00 00 00 c3 <0f4
RSP: 0018:ffff9d6fc00b3d50 EFLAGS: 00000282
RAX: 00000000ffff9120 RBX: 0000000000000000 RCX: 0000000000000736
RDX: 0000000000000735 RSI: 0000000000000000 RDI: ffff91209f183500
RBP: ffff9d6fc00b3d90 R08: ffff91209e322000 R09: 0000000000000000
R10: ffff91209e322028 R11: ffff91209e28e239 R12: ffff91209f183500
R13: ffff91209f2b6cc0 R14: ffff91209e322014 R15: 00000000ffffff91
FS: 0000000000000000(0000) GS:ffff91209f400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff229c5ae20 CR3: 000000001e1e8000 CR4: 00000000000006f0
Call Trace:
? message_send+0xb9/0x15b [gb_netlink]
gb_operation_request_send+0xdf/0x180
gb_operation_request_send_sync_timeout+0x1c/0x50
gb_operation_sync_timeout+0x86/0xf0
gb_svc_ping+0x24/0x30
do_work+0x17/0x50
process_one_work+0x1bf/0x310
worker_thread+0x45/0x3b0
kthread+0x10a/0x140
? current_work+0x40/0x40
? kthread_park+0x90/0x90
ret_from_fork+0x22/0x30
---[ end trace e0499fbd6005c9b0 ]---
greybus greybus1: 0/0:0: synchronous operation id 0x0016 of type 0x13 failed: -111
greybus 1-svc: SVC ping has returned -111, something is wrong!!!
greybus 1-svc: Resetting the greybus network, watch out!!!
svc_watchdog: calling "/system/bin/start unipro_reset" to reset greybus network!
# BUG: kernel NULL pointer dereference, address: 00000000000000a0
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 1e23f067 P4D 1e23f067 PUD 1e214067 PMD 0
Oops: 0000 [#1] SMP NOPTI
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 5.8.14 #4
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014
RIP: 0010:kmem_cache_alloc+0x4f/0x130
Code: 85 e4 74 6b 49 8b 0c 24 65 48 8b 51 08 65 48 03 0d de 6a ae 61 4c 8b 09 4d 85 c9 74 61 41 8b 44 24 20 4d 8b 04 24 48 8d 4a 01 <494
RSP: 0018:ffff9d6fc0003990 EFLAGS: 00000202
RAX: 0000000000000068 RBX: 000000000000003c RCX: 000000000000078c
RDX: 000000000000078b RSI: 0000000000000a20 RDI: ffff91209f029800
RBP: ffff9d6fc00039b0 R08: 0000000000023da0 R09: 0000000000000038
R10: ffff91209f11a0d0 R11: ffff91209f41f7b0 R12: ffff91209f029800
R13: ffffffff9e8bc678 R14: 0000000000000a20 R15: 0000000000000a20
FS: 0000000000000000(0000) GS:ffff91209f400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000000a0 CR3: 000000001e260000 CR4: 00000000000006f0
Call Trace:
<IRQ>
__alloc_skb+0x48/0x1a0
addrconf_prefix_rcv+0x1eb/0x710
ndisc_router_discovery+0x433/0xad0
? ndisc_router_discovery+0x433/0xad0
ndisc_rcv+0xc2/0x110
icmpv6_rcv+0x214/0x3a0
ip6_protocol_deliver_rcu+0x351/0x3a0
ip6_mc_input+0xa4/0xc0
ip6_sublist_rcv_finish+0x38/0x50
ip6_list_rcv_finish.isra.0+0x188/0x1a0
ipv6_list_rcv+0xf3/0x110
__netif_receive_skb_list_core+0x190/0x220
netif_receive_skb_list_internal+0x1a1/0x290
? ttwu_do_wakeup.isra.0+0x12/0xa0
? ttwu_do_activate.isra.0+0x60/0x70
gro_normal_list.part.0+0x19/0x40
napi_complete_done+0x6c/0x160
virtqueue_napi_complete+0x2b/0x70
virtnet_poll+0x2af/0x300
net_rx_action+0xce/0x250
__do_softirq+0xd2/0x212
asm_call_irq_on_stack+0x12/0x20
</IRQ>
do_softirq_own_stack+0x38/0x50
irq_exit_rcu+0x65/0x70
common_interrupt+0x74/0x150
asm_common_interrupt+0x1e/0x40
RIP: 0010:default_idle+0x13/0x20
Code: 6e ff ff ff 48 89 df e8 bb 6b d0 ff eb bc cc cc cc cc cc cc cc cc cc 8b 05 d2 be 77 00 85 c0 7e 07 0f 00 2d 01 de 40 00 fb f4 <c30
RSP: 0018:ffffffff9f003e50 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff9f0124c0 RCX: ffff91209f420240
RDX: 00000000000aa562 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffffff9f003e58 R08: 0000000000000000 R09: 0000000000000270
R10: ffff91209f41f780 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff9f0124c0 R15: 0000000000000000
? arch_cpu_idle+0x10/0x20
default_idle_call+0x1e/0x30
do_idle+0x18f/0x1e0
cpu_startup_entry+0x1b/0x20
rest_init+0x99/0x9b
arch_call_rest_init+0x9/0xc
start_kernel+0x360/0x36f
x86_64_start_reservations+0x24/0x26
x86_64_start_kernel+0x86/0x8a
secondary_startup_64+0xb6/0xc0
Modules linked in: gb_netlink(O)
CR2: 00000000000000a0
---[ end trace e0499fbd6005c9b1 ]---
RIP: 0010:kmem_cache_alloc+0x4f/0x130
Code: 85 e4 74 6b 49 8b 0c 24 65 48 8b 51 08 65 48 03 0d de 6a ae 61 4c 8b 09 4d 85 c9 74 61 41 8b 44 24 20 4d 8b 04 24 48 8d 4a 01 <494
RSP: 0018:ffff9d6fc0003990 EFLAGS: 00000202
RAX: 0000000000000068 RBX: 000000000000003c RCX: 000000000000078c
RDX: 000000000000078b RSI: 0000000000000a20 RDI: ffff91209f029800
RBP: ffff9d6fc00039b0 R08: 0000000000023da0 R09: 0000000000000038
R10: ffff91209f11a0d0 R11: ffff91209f41f7b0 R12: ffff91209f029800
R13: ffffffff9e8bc678 R14: 0000000000000a20 R15: 0000000000000a20
FS: 0000000000000000(0000) GS:ffff91209f400000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000000a0 CR3: 000000001e260000 CR4: 00000000000006f0
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: 0x1d400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
---[ end Kernel panic - not syncing: Fatal exception in interrupt ]---
QEMU: Terminated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment