jadonk / beagleconnect

Moved to https://git.beagleboard.org/beagleconnect/freedom
https://git.beagleboard.org/beagleconnect/freedom
35 stars 16 forks source link

sw: buildroot: start gbridge as service at startup #58

Closed vaishnavachath closed 3 years ago

vaishnavachath commented 3 years ago
vaishnavachath commented 3 years ago

Buildroot Test Logs (remote device has RTC-6 Click and Weather Click Attached, same sample will work without clicks also)

Linux version 5.8.14 (vaishnav@spectre) (x86_64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2020.08) 9.3.0, GNU ld (GNU Binutils) 2.33.1) #1 SMP Tue Mar 2 01:01:36 IST 2021
Command line: rootwait root=/dev/vda console=ttyS0
x86/fpu: x87 FPU will use FXSAVE
BIOS-provided physical RAM map:
BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
BIOS-e820: [mem 0x0000000000100000-0x000000001ffdafff] usable
BIOS-e820: [mem 0x000000001ffdb000-0x000000001fffffff] reserved
BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
NX (Execute Disable) protection: active
SMBIOS 2.8 present.
DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
tsc: Fast TSC calibration using PIT
tsc: Detected 2394.532 MHz processor
last_pfn = 0x1ffdb max_arch_pfn = 0x400000000
x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
found SMP MP-table at [mem 0x000f5aa0-0x000f5aaf]
ACPI: Early table checksum verification disabled
ACPI: RSDP 0x00000000000F58C0 000014 (v00 BOCHS )
ACPI: RSDT 0x000000001FFE156F 000030 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
ACPI: FACP 0x000000001FFE144B 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
ACPI: DSDT 0x000000001FFE0040 00140B (v01 BOCHS  BXPCDSDT 00000001 BXPC 00000001)
ACPI: FACS 0x000000001FFE0000 000040
ACPI: APIC 0x000000001FFE14BF 000078 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
ACPI: HPET 0x000000001FFE1537 000038 (v01 BOCHS  BXPCHPET 00000001 BXPC 00000001)
Zone ranges:
  DMA      [mem 0x0000000000001000-0x0000000000ffffff]
  DMA32    [mem 0x0000000001000000-0x000000001ffdafff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000001000-0x000000000009efff]
  node   0: [mem 0x0000000000100000-0x000000001ffdafff]
Zeroed struct page in unavailable ranges: 135 pages
Initmem setup node 0 [mem 0x0000000000001000-0x000000001ffdafff]
ACPI: PM-Timer IO Port: 0x608
ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0x8086a201 base: 0xfed00000
smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[mem 0x20000000-0xfffbffff] available for PCI devices
Booting paravirtualized kernel on bare hardware
clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1
percpu: Embedded 42 pages/cpu s133016 r8192 d30824 u2097152
Built 1 zonelists, mobility grouping on.  Total pages: 128868
Kernel command line: rootwait root=/dev/vda console=ttyS0
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 498052K/523748K available (10243K kernel code, 465K rwdata, 1868K rodata, 896K init, 596K bss, 25696K reserved, 0K cma-reserved)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Hierarchical RCU implementation.
rcu:    RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS: 4352, nr_irqs: 48, preallocated irqs: 16
Console: colour VGA+ 80x25
printk: console [ttyS0] enabled
ACPI: Core revision 20200528
clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
APIC: Switch to symmetric I/O mode setup
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x22840a0daf1, max_idle_ns: 440795291282 ns
Calibrating delay loop (skipped), value calculated using timer frequency.. 4789.06 BogoMIPS (lpj=9578128)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
Spectre V2 : Mitigation: Full AMD retpoline
Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
Speculative Store Bypass: Vulnerable
Freeing SMP alternatives memory: 24K
smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3)
Performance Events: PMU not available due to virtualization, using software events only.
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
smpboot: Max logical packages: 1
smpboot: Total of 1 processors activated (4789.06 BogoMIPS)
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc.isra.0+0x75/0x160 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 256 (order: 2, 16384 bytes, linear)
thermal_sys: Registered thermal governor 'step_wise'
thermal_sys: Registered thermal governor 'user_space'
NET: Registered protocol family 16
cpuidle: using governor ladder
ACPI: bus type PCI registered
PCI: Using configuration type 1 for base access
ACPI: Added _OSI(Module Device)
ACPI: Added _OSI(Processor Device)
ACPI: Added _OSI(3.0 _SCP Extensions)
ACPI: Added _OSI(Processor Aggregator Device)
ACPI: Added _OSI(Linux-Dell-Video)
ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
ACPI: 1 ACPI AML tables successfully acquired and loaded
ACPI: Interpreter enabled
ACPI: (supports S0 S3 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: Enabled 2 GPEs in block 00 to 0F
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments HPX-Type3]
acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
pci_bus 0000:00: root bus resource [mem 0x20000000-0xfebfffff window]
pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
pci 0000:00:01.1: reg 0x20: [io  0xc0c0-0xc0cf]
pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
pci 0000:00:01.2: [8086:7020] type 00 class 0x0c0300
pci 0000:00:01.2: reg 0x20: [io  0xc080-0xc09f]
pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX4 ACPI
pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX4 SMB
pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
pci 0000:00:02.0: reg 0x18: [mem 0xfebd0000-0xfebd0fff]
pci 0000:00:02.0: reg 0x30: [mem 0xfebc0000-0xfebcffff pref]
pci 0000:00:03.0: [1af4:1000] type 00 class 0x020000
pci 0000:00:03.0: reg 0x10: [io  0xc0a0-0xc0bf]
pci 0000:00:03.0: reg 0x14: [mem 0xfebd1000-0xfebd1fff]
pci 0000:00:03.0: reg 0x20: [mem 0xfe000000-0xfe003fff 64bit pref]
pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
pci 0000:00:04.0: [1af4:1001] type 00 class 0x010000
pci 0000:00:04.0: reg 0x10: [io  0xc000-0xc07f]
pci 0000:00:04.0: reg 0x14: [mem 0xfebd2000-0xfebd2fff]
pci 0000:00:04.0: reg 0x20: [mem 0xfe004000-0xfe007fff 64bit pref]
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
pci 0000:00:02.0: vgaarb: setting as boot VGA device
pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
pci 0000:00:02.0: vgaarb: bridge control possible
vgaarb: loaded
SCSI subsystem initialized
ACPI: bus type USB registered
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Initialized.
PCI: Using ACPI for IRQ routing
clocksource: Switched to clocksource tsc-early
pnp: PnP ACPI init
pnp: PnP ACPI: found 6 devices
clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
pci_bus 0000:00: resource 7 [mem 0x20000000-0xfebfffff window]
pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
pci 0000:00:01.0: PIIX3: Enabling Passive Release
pci 0000:00:00.0: Limiting direct PCI/PCI transfers
pci 0000:00:01.0: Activating ISA DMA hang workarounds
PCI Interrupt Link [LNKD] enabled at IRQ 11
pci 0000:00:01.2: quirk_usb_early_handoff+0x0/0x610 took 364857 usecs
pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
PCI: CLS 0 bytes, default 64
workingset: timestamp_bits=62 max_order=17 bucket_order=0
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler mq-deadline registered
io scheduler kyber registered
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button [PWRF]
PCI Interrupt Link [LNKC] enabled at IRQ 10
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
bochs-drm 0000:00:02.0: vgaarb: deactivate vga console
Console: switching to colour dummy device 80x25
[drm] Found bochs VGA, ID 0xb0c0.
[drm] Framebuffer size 16384 kB @ 0xfd000000, mmio @ 0xfebd0000.
[TTM] Zone  kernel: Available graphics memory: 249038 KiB
[TTM] Initializing pool allocator
[TTM] Initializing DMA pool allocator
[drm] Found EDID data blob.
[drm] Initialized bochs-drm 1.0.0 20130925 for 0000:00:02.0 on minor 0
fbcon: bochs-drmdrmfb (fb0) is primary device
Console: switching to colour frame buffer device 128x48
bochs-drm 0000:00:02.0: fb0: bochs-drmdrmfb frame buffer device
virtio_blk virtio1: [vda] 122880 512-byte logical blocks (62.9 MB/60.0 MiB)
vda: detected capacity change from 0 to 62914560
scsi host0: ata_piix
scsi host1: ata_piix
ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0c0 irq 14
ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0c8 irq 15
usbcore: registered new interface driver atusb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
uhci_hcd: USB Universal Host Controller Interface driver
uhci_hcd 0000:00:01.2: UHCI Host Controller
uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:01.2: irq 11, io base 0x0000c080
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver usb-storage
i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
rtc_cmos 00:00: RTC can wake from S4
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
rtc_cmos 00:00: registered as rtc0
rtc_cmos 00:00: setting system clock to 2021-03-06T13:33:01 UTC (1615037581)
rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram, hpet irqs
i2c /dev entries driver
Driver for 1-wire Dallas network protocol.
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 36
IPI shorthand broadcast: enabled
sched_clock: Marking stable (1995691577, 38033062)->(2037480594, -3755955)
ALSA device list:
  No soundcards found.
ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 ANSI: 5
tsc: Refined TSC clocksource calibration: 2394.504 MHz
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2283ef9605d, max_idle_ns: 440795293829 ns
clocksource: Switched to clocksource tsc
usb 1-2: new full-speed USB device number 2 using uhci_hcd
hub 1-2:1.0: USB hub found
hub 1-2:1.0: 8 ports detected
random: fast init done
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
EXT4-fs (vda): mounting ext2 file system using the ext4 subsystem
EXT4-fs (vda): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext2 filesystem) readonly on device 254:0.
devtmpfs: mounted
Freeing unused kernel image (initmem) memory: 896K
Write protecting the kernel read-only data: 14336k
Freeing unused kernel image (text/rodata gap) memory: 2044K
Freeing unused kernel image (rodata/data gap) memory: 180K
Run /sbin/init as init process
EXT4-fs (vda): warning: mounting unchecked fs, running e2fsck is recommended
EXT4-fs (vda): re-mounted. Opts: (null)
ext2 filesystem being remounted at / supports timestamps until 2038 (0x7fffffff)
usb 1-2.1: new full-speed USB device number 3 using uhci_hcd
Starting syslogd: OK
Starting klogd: OK
stty: standard input
Loading modules:gb_bootrom: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver bootrom
 gb-bootromgb_spilib: module is from the staging directory, the quality is unknown, you have been warned.
gb_firmware: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver gb-firmware
 gb-firmwaregb_gbphy: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver gbphy
 gb-gbphygb_gpio: module is from the staging directory, the quality is unknown, you have been warned.
gb_gbphy: registered new driver gpio
 gb-gpiogb_hid: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver hid
 gb-hidgb_i2c: module is from the staging directory, the quality is unknown, you have been warned.
gb_gbphy: registered new driver i2c
 gb-i2cgb_log: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver log
 gb-loggb_loopback: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver loopback
 gb-loopbackgb_netlink: loading out-of-tree module taints kernel.
 gb-netlinkgb_raw: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver raw
 gb-rawgb_spi: module is from the staging directory, the quality is unknown, you have been warned.
gb_gbphy: registered new driver spi
 gb-spi gb-spilibgb_uart: module is from the staging directory, the quality is unknown, you have been warned.
gb_gbphy: registered new driver uart
 gb-uart hm3301usb 1-2.1: no permanent extended address found, random address set
usbcore: registered new interface driver wpanusb
[  OK  ] bmp280_i2c st_accel_i2c rtc_ds1307 opt3001 ams-iaq-core
Running sysctl: OK
/etc/init.d/rcS: line 23: /etc/init.d/S03gbridge: Permission denied
Initializing random number generator: OK
Saving random seed: random: dd: uninitialized urandom read (512 bytes read)
OK
Starting system message bus: random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
done
Starting network: udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 10.0.2.15
udhcpc: lease of 10.0.2.15 obtained, lease time 86400
deleting routers
adding dns 10.0.2.3
OK
urandom_read: 6 callbacks suppressed
random: avahi-daemon: uninitialized urandom read (8 bytes read)
Starting dropbear sshd: OK
stty: standard input
Starting IIO Server Daemon

Welcome to Buildroot
buildroot login: $setting up wpanusb gateway for IEEE 802154 CHANNEL 1(906 Mhz)\n
killall: gbridge: no process killed
PING 2001:db8::1(2001:db8::1) from 2001:db8::2 lowpan0: 56 data bytes
64 bytes from 2001:db8::1: icmp_seq=2 ttl=64 time=42.1 ms
64 bytes from 2001:db8::1: icmp_seq=3 ttl=64 time=42.1 ms
64 bytes from 2001:db8::1: icmp_seq=4 ttl=64 time=41.5 ms
64 bytes from 2001:db8::1: icmp_seq=5 ttl=64 time=41.8 ms

--- 2001:db8::1 ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 4045ms
rtt min/avg/max/mdev = 41.481/41.900/42.139/0.270 ms
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 1-2.2: excess descriptors in interface manifest
mikrobus:mikrobus_port_gb_register: mikrobus gb_probe , num cports= 3, manifest_size 428 
mikrobus:mikrobus_port_gb_register: protocol added 11
mikrobus:mikrobus_port_gb_register: protocol added 3
mikrobus:mikrobus_port_gb_register: protocol added 2
mikrobus:mikrobus_port_register: registering port mikrobus-0 
mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 1, driver=opt3001, protocol=3, reg=44
mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 2, driver=hdc2010, protocol=3, reg=40
mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 3, driver=lis2dh12_accel, protocol=3, reg=18
mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 4, driver=mcp7941x, protocol=3, reg=6f
mikrobus_manifest:mikrobus_manifest_attach_device: parsed device 8, driver=bme280, protocol=3, reg=76
mikrobus_manifest:mikrobus_manifest_parse:  Greybus Service Sample Application manifest parsed with 5 devices
mikrobus mikrobus-0: registering device : opt3001
opt3001 0-0044: Found TI OPT3001
mikrobus mikrobus-0: registering device : hdc2010
mikrobus mikrobus-0: registering device : lis2dh12_accel
iio iio:device1: registered accelerometer lis2dh12_accel
mikrobus mikrobus-0: registering device : mcp7941x
rtc-ds1307 0-006f: registered as rtc1
mikrobus mikrobus-0: registering device : bme280

Welcome to Buildroot
buildroot login: root
Password: 
# gpioinfo gpiochip0
gpiochip0 - 32 lines:
    line   0:      unnamed       unused   input  active-high 
    line   1:      unnamed       unused   input  active-high 
    line   2:      unnamed       unused   input  active-high 
    line   3:      unnamed       unused   input  active-high 
    line   4:      unnamed       unused   input  active-high 
    line   5:      unnamed       unused   input  active-high 
    line   6:      unnamed       unused   input  active-high 
    line   7:      unnamed       unused   input  active-high 
    line   8:      unnamed       unused   input  active-high 
    line   9:      unnamed       unused   input  active-high 
    line  10:      unnamed       unused   input  active-high 
    line  11:      unnamed       unused   input  active-high 
    line  12:      unnamed       unused   input  active-high 
    line  13:      unnamed       unused   input  active-high 
    line  14:      unnamed       unused   input  active-high 
    line  15:      unnamed       unused   input  active-high 
    line  16:      unnamed       unused   input  active-high 
    line  17:      unnamed       unused   input  active-high 
    line  18:      unnamed       unused  output  active-high 
    line  19:      unnamed       unused   input  active-high 
    line  20:      unnamed       unused   input  active-high 
    line  21:      unnamed       unused   input  active-high 
    line  22:      unnamed       unused   input  active-high 
    line  23:      unnamed       unused   input  active-high 
    line  24:      unnamed       unused   input  active-high 
    line  25:      unnamed       unused   input  active-high 
    line  26:      unnamed       unused   input  active-high 
    line  27:      unnamed       unused   input  active-high 
    line  28:      unnamed       unused   input  active-high 
    line  29:      unnamed       unused   input  active-high 
    line  30:      unnamed       unused   input  active-high 
    line  31:      unnamed       unused   input  active-high 
# iio_info 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.19 (git tag: v0.19)
Backend description string: Linux buildroot 5.8.14 #1 SMP Tue Mar 2 01:01:36 IST 2021 x86_64
IIO context has 1 attributes:
    local,kernel: 5.8.14
IIO context has 3 devices:
    iio:device0: opt3001
        1 channels found:
            illuminance:  (input)
            2 channel-specific attributes found:
                attr  0: input value: 3.990000
                attr  1: integration_time value: 0.800000
        2 device-specific attributes found:
                attr  0: current_timestamp_clock value: realtime

                attr  1: integration_time_available value: 0.1 0.8
    iio:device1: lis2dh12_accel (buffer capable)
        4 channels found:
            accel_x:  (input, index: 0, format: le:s12/16>>4)
            3 channel-specific attributes found:
                attr  0: raw value: -8
                attr  1: scale value: 0.009806
                attr  2: scale_available value: 0.009806 0.019613 0.039226 0.117679
            accel_y:  (input, index: 1, format: le:s12/16>>4)
            3 channel-specific attributes found:
                attr  0: raw value: -60
                attr  1: scale value: 0.009806
                attr  2: scale_available value: 0.009806 0.019613 0.039226 0.117679
            accel_z:  (input, index: 2, format: le:s12/16>>4)
            3 channel-specific attributes found:
                attr  0: raw value: 1040
                attr  1: scale value: 0.009806
                attr  2: scale_available value: 0.009806 0.019613 0.039226 0.117679
            timestamp:  (input, index: 3, format: le:S64/64>>0)
        3 device-specific attributes found:
                attr  0: current_timestamp_clock value: realtime

                attr  1: sampling_frequency value: 1
                attr  2: sampling_frequency_available value: 1 10 25 50 100 200 400 1600
        2 buffer-specific attributes found:
                attr  0: data_available value: 0
                attr  1: watermark value: 1
    iio:device2: bme280
        3 channels found:
            temp:  (input)
            2 channel-specific attributes found:
                attr  0: input value: 24140
                attr  1: oversampling_ratio value: 2
            pressure:  (input)
            2 channel-specific attributes found:
                attr  0: input value: 100.806535156
                attr  1: oversampling_ratio value: 16
            humidityrelative:  (input)
            2 channel-specific attributes found:
                attr  0: input value: 49131
                attr  1: oversampling_ratio value: 16
# ls /sys/class/rtc/rtc
rtc0/  rtc1/
# ls /sys/class/rtc/rtc1/
date           hctosys        power/         time
dev            max_user_freq  since_epoch    uevent
device/        name           subsystem/
# cat /sys/class/rtc/rtc1/name 
rtc-ds1307 0-006f
jadonk commented 3 years ago

How do I change what devices are connected and/or manifests that are loaded?

jadonk commented 3 years ago

How do we change this to handle hot-insertion?

jadonk commented 3 years ago
Linux version 5.8.14 (jkridner@tupper) (x86_64-buildroot-linux-uclibc-gcc.br_real (Buildroot 2020.08-1
Command line: rootwait root=/dev/vda console=ttyS0
x86/fpu: x87 FPU will use FXSAVE
BIOS-provided physical RAM map:
BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
BIOS-e820: [mem 0x0000000000100000-0x000000001ffdafff] usable
BIOS-e820: [mem 0x000000001ffdb000-0x000000001fffffff] reserved
BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
NX (Execute Disable) protection: active
SMBIOS 2.8 present.
DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/014
last_pfn = 0x1ffdb max_arch_pfn = 0x400000000
x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
found SMP MP-table at [mem 0x000f5aa0-0x000f5aaf]
ACPI: Early table checksum verification disabled
ACPI: RSDP 0x00000000000F58C0 000014 (v00 BOCHS )
ACPI: RSDT 0x000000001FFE14D2 000034 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
ACPI: FACP 0x000000001FFE1386 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
ACPI: DSDT 0x000000001FFE0040 001346 (v01 BOCHS  BXPCDSDT 00000001 BXPC 00000001)
ACPI: FACS 0x000000001FFE0000 000040
ACPI: APIC 0x000000001FFE13FA 000078 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
ACPI: HPET 0x000000001FFE1472 000038 (v01 BOCHS  BXPCHPET 00000001 BXPC 00000001)
ACPI: WAET 0x000000001FFE14AA 000028 (v01 BOCHS  BXPCWAET 00000001 BXPC 00000001)
Zone ranges:
  DMA      [mem 0x0000000000001000-0x0000000000ffffff]
  DMA32    [mem 0x0000000001000000-0x000000001ffdafff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000001000-0x000000000009efff]
  node   0: [mem 0x0000000000100000-0x000000001ffdafff]
Zeroed struct page in unavailable ranges: 135 pages
Initmem setup node 0 [mem 0x0000000000001000-0x000000001ffdafff]
ACPI: PM-Timer IO Port: 0x608
ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0x8086a201 base: 0xfed00000
smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[mem 0x20000000-0xfffbffff] available for PCI devices
Booting paravirtualized kernel on bare hardware
clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 s
setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:1 nr_node_ids:1
percpu: Embedded 42 pages/cpu s133016 r8192 d30824 u2097152
Built 1 zonelists, mobility grouping on.  Total pages: 128868
Kernel command line: rootwait root=/dev/vda console=ttyS0
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 498052K/523748K available (10243K kernel code, 465K rwdata, 1864K rodata, 896K init, 596K bss)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
rcu: Hierarchical RCU implementation.
rcu:    RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=1.
rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS: 4352, nr_irqs: 48, preallocated irqs: 16
Console: colour VGA+ 80x25
printk: console [ttyS0] enabled
ACPI: Core revision 20200528
clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
APIC: Switch to symmetric I/O mode setup
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
tsc: Unable to calibrate against PIT
tsc: using HPET reference calibration
tsc: Detected 1797.559 MHz processor
clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x19e9279eb3e, max_idle_ns: 440795262362s
Calibrating delay loop (skipped), value calculated using timer frequency.. 3595.11 BogoMIPS (lpj=7190)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
Spectre V2 : Mitigation: Full AMD retpoline
Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
Speculative Store Bypass: Vulnerable
Freeing SMP alternatives memory: 24K
smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (family: 0x6, model: 0x6, stepping: 0x3)
Performance Events: PMU not available due to virtualization, using software events only.
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
smp: Brought up 1 node, 1 CPU
smpboot: Max logical packages: 1
smpboot: Total of 1 processors activated (3595.11 BogoMIPS)
devtmpfs: initialized
random: get_random_u32 called from bucket_table_alloc.isra.0+0x75/0x160 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 256 (order: 2, 16384 bytes, linear)
thermal_sys: Registered thermal governor 'step_wise'
thermal_sys: Registered thermal governor 'user_space'
NET: Registered protocol family 16
cpuidle: using governor ladder
ACPI: bus type PCI registered
PCI: Using configuration type 1 for base access
ACPI: Added _OSI(Module Device)
ACPI: Added _OSI(Processor Device)
ACPI: Added _OSI(3.0 _SCP Extensions)
ACPI: Added _OSI(Processor Aggregator Device)
ACPI: Added _OSI(Linux-Dell-Video)
ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
ACPI: 1 ACPI AML tables successfully acquired and loaded
ACPI: Interpreter enabled
ACPI: (supports S0 S3 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
ACPI: Enabled 2 GPEs in block 00 to 0F
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments HPX-Type3]
acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space unde.
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
pci_bus 0000:00: root bus resource [mem 0x20000000-0xfebfffff window]
pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
pci 0000:00:01.1: reg 0x20: [io  0xc0c0-0xc0cf]
pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
pci 0000:00:01.2: [8086:7020] type 00 class 0x0c0300
pci 0000:00:01.2: reg 0x20: [io  0xc080-0xc09f]
pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
pci 0000:00:01.3: quirk: [io  0x0600-0x063f] claimed by PIIX4 ACPI
pci 0000:00:01.3: quirk: [io  0x0700-0x070f] claimed by PIIX4 SMB
pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
pci 0000:00:02.0: reg 0x18: [mem 0xfebd0000-0xfebd0fff]
pci 0000:00:02.0: reg 0x30: [mem 0xfebc0000-0xfebcffff pref]
pci 0000:00:03.0: [1af4:1000] type 00 class 0x020000
pci 0000:00:03.0: reg 0x10: [io  0xc0a0-0xc0bf]
pci 0000:00:03.0: reg 0x14: [mem 0xfebd1000-0xfebd1fff]
pci 0000:00:03.0: reg 0x20: [mem 0xfe000000-0xfe003fff 64bit pref]
pci 0000:00:03.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
pci 0000:00:04.0: [1af4:1001] type 00 class 0x010000
pci 0000:00:04.0: reg 0x10: [io  0xc000-0xc07f]
pci 0000:00:04.0: reg 0x14: [mem 0xfebd2000-0xfebd2fff]
pci 0000:00:04.0: reg 0x20: [mem 0xfe004000-0xfe007fff 64bit pref]
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
pci 0000:00:02.0: vgaarb: setting as boot VGA device
pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
pci 0000:00:02.0: vgaarb: bridge control possible
vgaarb: loaded
SCSI subsystem initialized
ACPI: bus type USB registered
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Advanced Linux Sound Architecture Driver Initialized.
PCI: Using ACPI for IRQ routing
clocksource: Switched to clocksource tsc-early
pnp: PnP ACPI init
pnp: PnP ACPI: found 6 devices
clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
NET: Registered protocol family 1
pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
pci_bus 0000:00: resource 7 [mem 0x20000000-0xfebfffff window]
pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
pci 0000:00:01.0: PIIX3: Enabling Passive Release
pci 0000:00:00.0: Limiting direct PCI/PCI transfers
pci 0000:00:01.0: Activating ISA DMA hang workarounds
PCI Interrupt Link [LNKD] enabled at IRQ 11
pci 0000:00:01.2: quirk_usb_early_handoff+0x0/0x610 took 327420 usecs
pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
PCI: CLS 0 bytes, default 64
workingset: timestamp_bits=62 max_order=17 bucket_order=0
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
io scheduler mq-deadline registered
io scheduler kyber registered
input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
ACPI: Power Button [PWRF]
PCI Interrupt Link [LNKC] enabled at IRQ 10
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
bochs-drm 0000:00:02.0: vgaarb: deactivate vga console
Console: switching to colour dummy device 80x25
[drm] Found bochs VGA, ID 0xb0c0.
[drm] Framebuffer size 16384 kB @ 0xfd000000, mmio @ 0xfebd0000.
[TTM] Zone  kernel: Available graphics memory: 249038 KiB
[TTM] Initializing pool allocator
[TTM] Initializing DMA pool allocator
[drm] Found EDID data blob.
[drm] Initialized bochs-drm 1.0.0 20130925 for 0000:00:02.0 on minor 0
fbcon: bochs-drmdrmfb (fb0) is primary device
Console: switching to colour frame buffer device 128x48
bochs-drm 0000:00:02.0: fb0: bochs-drmdrmfb frame buffer device
virtio_blk virtio1: [vda] 122880 512-byte logical blocks (62.9 MB/60.0 MiB)
vda: detected capacity change from 0 to 62914560
scsi host0: ata_piix
scsi host1: ata_piix
ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0c0 irq 14
ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0c8 irq 15
usbcore: registered new interface driver atusb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
uhci_hcd: USB Universal Host Controller Interface driver
uhci_hcd 0000:00:01.2: UHCI Host Controller
uhci_hcd 0000:00:01.2: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:01.2: irq 11, io base 0x0000c080
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver usb-storage
i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
rtc_cmos 00:05: RTC can wake from S4
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
rtc_cmos 00:05: registered as rtc0
rtc_cmos 00:05: setting system clock to 2021-03-06T15:20:10 UTC (1615044010)
rtc_cmos 00:05: alarms up to one day, y3k, 242 bytes nvram, hpet irqs
i2c /dev entries driver
Driver for 1-wire Dallas network protocol.
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 36
IPI shorthand broadcast: enabled
sched_clock: Marking stable (1769868622, -31214267)->(1739101189, -446834)
ALSA device list:
  No soundcards found.
ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
scsi 1:0:0:0: CD-ROM            QEMU     QEMU DVD-ROM     2.5+ PQ: 0 ANSI: 5
tsc: Refined TSC clocksource calibration: 1800.140 MHz
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x19f2adce765, max_idle_ns: 440795260533 ns
clocksource: Switched to clocksource tsc
usb 1-2: new full-speed USB device number 2 using uhci_hcd
hub 1-2:1.0: USB hub found
hub 1-2:1.0: 8 ports detected
random: fast init done
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
EXT4-fs (vda): mounting ext2 file system using the ext4 subsystem
EXT4-fs (vda): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext2 filesystem) readonly on device 254:0.
devtmpfs: mounted
Freeing unused kernel image (initmem) memory: 896K
Write protecting the kernel read-only data: 14336k
Freeing unused kernel image (text/rodata gap) memory: 2044K
Freeing unused kernel image (rodata/data gap) memory: 184K
Run /sbin/init as init process
usb 1-2.1: new full-speed USB device number 3 using uhci_hcd
EXT4-fs (vda): re-mounted. Opts: (null)
ext2 filesystem being remounted at / supports timestamps until 2038 (0x7fffffff)
Starting syslogd: OK
Starting klogd: OK
stty: standard input
Loading modules:gb_bootrom: module is from the staging directory, the quality is unknown, you have be.
greybus: registered new driver bootrom
 gb-bootromgb_spilib: module is from the staging directory, the quality is unknown, you have been war.
gb_firmware: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver gb-firmware
 gb-firmwaregb_gbphy: module is from the staging directory, the quality is unknown, you have been war.
greybus: registered new driver gbphy
 gb-gbphygb_gpio: module is from the staging directory, the quality is unknown, you have been warned.
gb_gbphy: registered new driver gpio
 gb-gpiogb_hid: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver hid
 gb-hidgb_i2c: module is from the staging directory, the quality is unknown, you have been warned.
gb_gbphy: registered new driver i2c
 gb-i2cgb_log: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver log
 gb-loggb_loopback: module is from the staging directory, the quality is unknown, you have been warne.
greybus: registered new driver loopback
 gb-loopbackgb_netlink: loading out-of-tree module taints kernel.
 gb-netlinkgb_raw: module is from the staging directory, the quality is unknown, you have been warned.
greybus: registered new driver raw
 gb-rawgb_spi: module is from the staging directory, the quality is unknown, you have been warned.
gb_gbphy: registered new driver spi
 gb-spi gb-spilibgb_uart: module is from the staging directory, the quality is unknown, you have been.
gb_gbphy: registered new driver uart
 gb-uart hm3301usb 1-2.1: no permanent extended address found, random address set
usbcore: registered new interface driver wpanusb
[-8G[  OK  ]80_i2c st_accel_i2c rtc_ds1307 opt3001 ams-iaq-core
Running sysctl: OK
Saving random seed: random: dd: uninitialized urandom read (512 bytes read)
OK
Starting system message bus: random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
done
Starting network: udhcpc: started, v1.32.0
udhcpc: sending discover
udhcpc: sending select for 10.0.2.15
udhcpc: lease of 10.0.2.15 obtained, lease time 86400
deleting routers
adding dns 10.0.2.3
OK
urandom_read: 6 callbacks suppressed
random: avahi-daemon: uninitialized urandom read (8 bytes read)
Starting dropbear sshd: OK
stty: standard input
Starting IIO Server Daemon

Welcome to Buildroot
buildroot login: setting up wpanusb gateway for IEEE 802154 CHANNEL 1(906 Mhz)
usb 1-2.1: wpanusb_set_promiscuous_mode: Not handled, on 0
killall: gbridge: no process killed

Welcome to Buildroot
buildroot login: root
Password: 
# iio_info 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.19 (git tag: v0.19)
Backend description string: Linux buildroot 5.8.14 #5 SMP Fri Mar 5 16:22:42 EST 2021 x86_64
IIO context has 1 attributes:
    local,kernel: 5.8.14
IIO context has 0 devices:
# iio_info 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.19 (git tag: v0.19)
Backend description string: Linux buildroot 5.8.14 #5 SMP Fri Mar 5 16:22:42 EST 2021 x86_64
IIO context has 1 attributes:
    local,kernel: 5.8.14
IIO context has 0 devices:
# iio_info 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.19 (git tag: v0.19)
Backend description string: Linux buildroot 5.8.14 #5 SMP Fri Mar 5 16:22:42 EST 2021 x86_64
IIO context has 1 attributes:
    local,kernel: 5.8.14
IIO context has 0 devices:
# iio_info 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.19 (git tag: v0.19)
Backend description string: Linux buildroot 5.8.14 #5 SMP Fri Mar 5 16:22:42 EST 2021 x86_64
IIO context has 1 attributes:
    local,kernel: 5.8.14
IIO context has 0 devices:
# gpioinfo 
# gpioinfo gpiochip0
gpioinfo: looking up chip gpiochip0: No such file or directory
# iio_info 
Library version: 0.19 (git tag: v0.19)
Compiled with backends: local xml ip usb serial
IIO context created with local backend.
Backend version: 0.19 (git tag: v0.19)
Backend description string: Linux buildroot 5.8.14 #5 SMP Fri Mar 5 16:22:42 EST 2021 x86_64
IIO context has 1 attributes:
    local,kernel: 5.8.14
IIO context has 0 devices:
vaishnavachath commented 3 years ago

How do we change this to handle hot-insertion?

it should be already handled, the startup service exits if the BeagleConnect Freedom USB device is not found and then later plugging in the device user can run /opt/gbridge.sh to start manually https://github.com/jadonk/beagleconnect/blob/4d4d09ed359d3f6d2763cbf968136eb155ab247a/sw/buildroot/board/beagleboard/beagleconnect_gateway_qemu_x86_64/rootfs_overlay/etc/init.d/S99gbridge#L5

vaishnavachath commented 3 years ago

How do I change what devices are connected and/or manifests that are loaded?

Currently this needs to be done manually, manifest is prepared(combined) during compile time, so for each endpoint with different clicks/on-board devices the greybus sample needs to be recompiled with the click names in config: https://github.com/jadonk/greybus-for-zephyr/tree/mikrobus#trying-out-different-add-on-boardsdevices-over-mikrobus for devices on-board(not actual mikroBUS but same abstraction is used) we can describe over Zephyr DT https://github.com/jadonk/greybus-for-zephyr/tree/mikrobus#describing-on-board-devices-through-zephyr-dt

jadonk commented 3 years ago

How do we change this to handle hot-insertion?

it should be already handled, the startup service exits if the BeagleConnect Freedom USB device is not found and then later plugging in the device user can run /opt/gbridge.sh to start manually

https://github.com/jadonk/beagleconnect/blob/4d4d09ed359d3f6d2763cbf968136eb155ab247a/sw/buildroot/board/beagleboard/beagleconnect_gateway_qemu_x86_64/rootfs_overlay/etc/init.d/S99gbridge#L5

Looks like we need to put this in a udev rule.