Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
ryanrs
Jul 12, 2011

It's for when a dumb youtuber mixed the sound for their video way too low.

Adbot
ADBOT LOVES YOU

ryanrs
Jul 12, 2011

hbag posted:

notification noise

there's your problem

ryanrs
Jul 12, 2011

there are four amps!

ryanrs
Jul 12, 2011

Which httpd server should I run? This is for a temp server to serve packages for installation.

Internal network only, no SSL or security, just plaintext port 80. The firmware update clients are probably super stupid.

I want the least possible amount of setup. Like, execute the server in the current directory, and it serves up those files and generates an index.html. Or I just cp the compressed images to /var/httpd/content or sth. One or two config files are ok, I guess, but not the normal level of webserver install bullshit.

Here are some options:

code:
ryan@rockpro64:~$ uname -a
Linux rockpro64 6.6.16-current-rockchip64 #1 SMP PREEMPT Fri Feb 23 08:25:28 UTC 2024 aarch64 GNU/Linux
ryan@rockpro64:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Armbian 24.2.1 bookworm
Release:	12
Codename:	bookworm
ryan@rockpro64:~$ apt list | fgrep httpd

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

elpa-simple-httpd/stable 1.5.1-5 all
gambas3-gb-httpd/stable 3.18.0-4 arm64
golang-github-facebookgo-httpdown-dev/stable 0.0~git20160323.0.a3b1354-8 all
groonga-httpd/stable 13.0.0+dfsg-3~deb12u1 arm64
httpdirfs/stable 1.2.5-1 arm64
libanyevent-httpd-perl/stable 0.93-6 all
libmicrohttpd12/stable 0.9.75-6 arm64
lighttpd/stable 1.4.69-1 arm64
micro-httpd/stable 20140814-2.1+b2 arm64
mighttpd2/stable 4.0.2-1 arm64
mini-httpd-run/stable 1.0+nmu1 all
mini-httpd/stable 1.30-3 arm64
owhttpd/stable 3.2p4+dfsg1-4.1+b1 arm64
ryan@rockpro64:~$ 
e: Assume I have packages for http servers that don't match that grep, like nginx, etc. Those are fine too, if there is minimal bullshit to serve static files.

ryanrs fucked around with this message at 05:48 on Apr 8, 2024

ryanrs
Jul 12, 2011

Joe Chip posted:

you can just go to the dir you want to host and `python -m http.server`

Perfect. Thanks!

e: This is to serve OpenWRT packages to my router. It has 16MB of flash and a big microSD card. I can't fit everything I want into the 16MB image, but post-install I can mount the memory card and install anything I want.

(Normal OpenWRT users don't need to do this. I am compiling my own image and packages.)

ryanrs fucked around with this message at 06:01 on Apr 8, 2024

ryanrs
Jul 12, 2011

fresh_cheese posted:

booooooooo:

FATAL: Detected Missing Required CPU Feature: Carry-less Multiplication extensions (pclmilqdq)

its an i7 Q 720 so… what 10 years old? a wee baby! still should work fine!

Wow, a 30 year old OS complaining about a 15 year old computer.

Imagine letting software push you around like that.

ryanrs
Jul 12, 2011

Captain Foo posted:

the thing you are trying to run your operating system on is a piece of poo poo

you'd think it'd be compatible

ryanrs
Jul 12, 2011

What distro should I run on my Raspberry Pi Zero 2 W?

It needs to be headless and not waste precious resources on a bullshit GUI. It also needs to come up in a sane configuration on first boot, and uh, how do you do initial login without an ethernet jack? I don't have a mini HDMI cable on hand. Maybe I can stuff wifi credentials into the microSD card when I flash it?

It has a Broadcom wifi chip, so I assume that will be non-functional or suck with anything other than the official Raspberry OS. Is that right?

I'm not exactly sure what I'm going to use these for, but logging in and compiling code would be a good start.

ryanrs
Jul 12, 2011

Ugh I am going to have to buy a mini HDMI cable before I can gently caress around with this board, aren't I? Why did the RPi Foundation make it incompatible with RPi 4B micro HDMI cables?

ryanrs
Jul 12, 2011


NetBSD's wifi drivers look to be in a poor state.

ryanrs
Jul 12, 2011

If I can get all these devices running on Vanilla OpenWRT, that would be convenient. Plus I'd have the ability and motivation to maybe fix bugs.

For example, I just noticed my GL-AR750 is not properly shutting off the wifi chips on boot when you have the radios disabled in the config. If you toggle the radios on, then off again, idle power goes down by 0.3W (20%!!). If I have full sources and a working build system, I can probably fix little poo poo like that.

And yeah, b/g/n is fine for my needs. Less fine is crap like periodically dropping the connection, long weird pauses, etc. It's for low-speed machine telemetry + some occasional SSH interactive stuff.

ryanrs
Jul 12, 2011

Yeah, I have another ARM board with more memory for my build host.

How is Gentoo for headless, light-duty server service? This board has 512MB, which seems like a lot, but maybe not in 2024.

ryanrs
Jul 12, 2011

eschaton posted:

not everything is on the newest architecture, oh no!

are you seeing something there that makes you think they don’t work at all?

note that the “tested” column means “tested after conversion to the new architecture,” not “tested at all,” because the page you dug up to scare yourself and others is about in-progress work and not a list of what works and what doesn’t in NetBSD 10

I was not sure if NetBSD was a serious suggestion for wireless on a RPi Zero 2 W. Is it?

ryanrs
Jul 12, 2011

sb hermit posted:

despite my comment, I am only half serious about yocto and buildroot

in actuality, I would probably install raspbian and disable every process that didn't need to run and also maybe put in a swap file (and set swappiness to 99) so that package updates don't get killed in the middle of any operations

Yeah, I'm trying Raspbian now. Normally I'm wary of depending on OEM builds, as a smaller board maker is prob going to lose interest in updates about 3 months after the boards are out. But RPi Foundation is probably big enough, and their product lineup small enough, that it's not an issue.

And let's not go overboard wrt "resource constraints". I just installed gcc and perl and python3 and a ton of other crap on a MIPS board with 128MB of RAM. It runs fine. SSH will not be the killing blow.

ryanrs
Jul 12, 2011

I remember upgrading my HP 48GX with a 128KB of battery-backed SRAM.

ryanrs
Jul 12, 2011

That too small for Linux, of course. But I would kinda expect any normal kernel to boot up and open a shell with 8 or 16MB.

ryanrs
Jul 12, 2011

sb hermit posted:

I hear meshtastic is the new hotness. Community based wireless networking. In case the internet goes down!

I tried this and it was not great! Turns out that to get nerd-on-a-mountaintop range, you need to be (1) a nerd, and (2) on a mountain. Otherwise it's a neat neighborhood-wide net, assuming you only need a packet a second or so.

ryanrs
Jul 12, 2011

Whereas I've setup my 2M 50W mobile while camping, found an active repeater, and hopped on their weekly check-in / traffic practice just by chance. I've actually used 2M FM to summon the sheriff out in the Sierra backcountry, and it worked.

ryanrs
Jul 12, 2011

sb hermit posted:

I think I was able to activate a usb serial device on a raspberry pi zero image so that I could use minicom to get a console login.

You can poke at some config files on the SD card to make a new user and turn on ssh. Plug this PoE USB ethernet adapter and the Pi will grab an address from DHCP on first boot and you can ssh in.

That ethernet dongle is not just a PoE splitter, it is also a USB ethernet adapter. It feeds data and power to the Pi Zero through the single micro USB connector.

ryanrs
Jul 12, 2011

The TTL designers were very forward-thinking to pick a threshold voltage that's compatible with 3.3V CMOS.

ryanrs
Jul 12, 2011

sb hermit posted:

Too bad the raspberry pi doesn’t do analog inputs… would really love to find a good way to detect really small voltages for certain kinds of components and also to help me debug some components. Good thing that the rpi pico has a couple analog input pins.

Microcontroller integrated ADCs suck, and Raspberry Pi integrated ADCs suck especially bad. Here's a very detailed post about the Pico's terrible ADC.

If you want low noise and precision, hook up a separate ADC chip via I2C or SPI.

ryanrs
Jul 12, 2011

Low-effort ADC on the Rasp Pi for $15: Qwiic adapter + ADC boards.

Once you have the adapter, Adafruit and Sparkfun sell hundreds of different sensors and little boards you can plug in.

ryanrs
Jul 12, 2011

eschaton posted:

I think if you’re making a little thing, it’s worth giving NetBSD a try because it’s a small and extremely tractable system, and it shouldn’t be difficult or require much time to see how it performs

I think the Raspberry Pi Zero 2 W isn't supported yet. I tried booting with the RPi 3 image, which never grabbed an address over DHCP. It's possible there's an install screen waiting on the HDMI output, but I'm waiting on delivery of the right cable.

Meanwhile, I hooked up a serial monitor. After editing the 2nd stage bootloader in sed (lol), I got some serial output.

code:
Raspberry Pi Bootcode

Found SD card, config.txt = 1, start.elf = 1, recovery.elf = 0, timeout = 0
Read File: config.txt, 371 (bytes)




Raspberry Pi Bootcode
Read File: config.txt, 371
Read File: start.elf, 2979264 (bytes)  
Read File: fixup.dat, 7269 (bytes)
MESS:00:00:01.267722:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:01.272016:0: brfs: File read: 371 bytes
MESS:00:00:01.308085:0: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:01.314252:0: HDMI0:EDID error reading EDID block 0 attempt 1
MESS:00:00:01.320588:0: HDMI0:EDID error reading EDID block 0 attempt 2
MESS:00:00:01.326925:0: HDMI0:EDID error reading EDID block 0 attempt 3
MESS:00:00:01.333263:0: HDMI0:EDID error reading EDID block 0 attempt 4
MESS:00:00:01.339598:0: HDMI0:EDID error reading EDID block 0 attempt 5
MESS:00:00:01.345935:0: HDMI0:EDID error reading EDID block 0 attempt 6
MESS:00:00:01.352273:0: HDMI0:EDID error reading EDID block 0 attempt 7
MESS:00:00:01.358609:0: HDMI0:EDID error reading EDID block 0 attempt 8
MESS:00:00:01.364947:0: HDMI0:EDID error reading EDID block 0 attempt 9
MESS:00:00:01.371042:0: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:01.377039:0: brfs: File read: /mfs/sd/config.txt
MESS:00:00:01.381899:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:01.579248:0: gpioman: gpioman_get_pin_num: pin LEDS_PWR_OK not defined
MESS:00:00:01.585079:0: *** Restart logging
MESS:00:00:01.588952:0: brfs: File read: 371 bytes
MESS:00:00:01.594048:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:01.601569:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 1
MESS:00:00:01.608427:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 2
MESS:00:00:01.615285:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 3
MESS:00:00:01.622142:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 4
MESS:00:00:01.629000:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 5
MESS:00:00:01.635858:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 6
MESS:00:00:01.642715:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 7
MESS:00:00:01.649573:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 8
MESS:00:00:01.656429:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 9
MESS:00:00:01.663046:0: hdmi: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:01.668951:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 0
MESS:00:00:01.676743:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 1
MESS:00:00:01.683601:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 2
MESS:00:00:01.690458:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 3
MESS:00:00:01.697315:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 4
MESS:00:00:01.704174:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 5
MESS:00:00:01.711031:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 6
MESS:00:00:01.717888:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 7
MESS:00:00:01.724747:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 8
MESS:00:00:01.731604:0: hdmi: HDMI0:EDID error reading EDID block 0 attempt 9
MESS:00:00:01.738219:0: hdmi: HDMI0:EDID giving up on reading EDID block 0
MESS:00:00:01.743835:0: hdmi: HDMI:hdmi_get_state is deprecated, use hdmi_get_display_state instead
MESS:00:00:01.752580:0: HDMI0: hdmi_pixel_encoding: 162000000
MESS:00:00:01.758291:0: vec: vec_middleware_power_on: vec_base: 0x7e806000 rev-id 0x00002708 @
 vec: 0x7e806100 @ 0x00000420 enc: 0x7e806060 @ 0x00000220 cgmsae: 0x7e80605c @ 0x00000000
MESS:00:00:01.818759:0: dtb_file 'bcm2837-rpi-zero-2-w.dtb'
MESS:00:00:01.861190:0: dtb_file 'bcm2710-rpi-zero-2-w.dtb'
MESS:00:00:01.903694:0: dtb_file 'bcm2710-rpi-zero-2.dtb'
MESS:00:00:01.946037:0: Failed to load Device Tree file 'dtb/bcm2710-rpi-zero-2.dtb'
MESS:00:00:01.953652:0: brfs: File read: /mfs/sd/dtb/../cmdline.txt
MESS:00:00:01.958224:0: Read command line from file 'dtb/../cmdline.txt':
MESS:00:00:01.964719:0: 'root=ld0a fb=disable'
MESS:00:00:01.969384:0: brfs: File read: 164 bytes
MESS:00:00:02.669825:0: brfs: File read: /mfs/sd/netbsd-GENERIC.img
MESS:00:00:02.674397:0: Loaded '/netbsd-GENERIC.img' to 0x1000040 size 0x9e2420
MESS:00:00:02.681502:0: gpioman: gpioman_get_pin_num: pin EMMC_ENABLE not defined
MESS:00:00:02.690318:0: uart: Set PL011 baud rate to 103448.300000 Hz
MESS:00:00:02.696611:0: uart: Baud rate change done...
MESS:00:00:02.700044:0: uart: Baud rate <----OUTPUT STOPS
This recent thread suggests latest isn't working yet on this board. The UART might be using the CPU clock directly without accounting for CPU frequency scaling, which could explain 103448 baud, maybe.

I don't think I know enough about NetBSD to go in and apply patches and build my own image. I'm assuming I'd need an existing NetBSD machine to build NetBSD, yeah? I think maybe I just need to compile with dtc, but I don't know exactly what that is.

ryanrs
Jul 12, 2011

I don't have a cable for this dumb mini HDMI connector.

ryanrs
Jul 12, 2011

https://www.youtube.com/watch?v=APl0edZ8gI8


Hang on, let me load up NetBSD on my backup Raspberry Pi 4 B.

code:
[   1.0000000] NetBSD/evbarm (fdt) booting ...
[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[   1.0000000]     2024
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All rights reserved.

[   1.0000000] NetBSD 10.0 (GENERIC64) #0: Thu Mar 28 08:33:33 UTC 2024
[   1.0000000]  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64
[   1.0000000] total memory = 8034 MB
[   1.0000000] avail memory = 7744 MB
[   1.0000000] armfdt0 (root)
[   1.0000000] simplebus0 at armfdt0: Raspberry Pi 4 Model B Rev 1.4
[   1.0000000] simplebus1 at simplebus0
[   1.0000000] simplebus2 at simplebus0
[   1.0000000] cpus0 at simplebus0
[   1.0000000] simplebus3 at simplebus0
[   1.0000000] simplebus4 at simplebus0
[   1.0000000] simplebus5 at simplebus0
[   1.0000000] cpu0 at cpus0: Arm Cortex-A72 r0p3 (v8-A), id 0x0
[   1.0000000] cpu0: package 0, core 0, smt 0
[   1.0000000] cpu1 at cpus0: Arm Cortex-A72 r0p3 (v8-A), id 0x1
[   1.0000000] cpu1: package 0, core 1, smt 0
[   1.0000000] cpu2 at cpus0: Arm Cortex-A72 r0p3 (v8-A), id 0x2
[   1.0000000] cpu2: package 0, core 2, smt 0
[   1.0000000] cpu3 at cpus0: Arm Cortex-A72 r0p3 (v8-A), id 0x3
[   1.0000000] cpu3: package 0, core 3, smt 0
[   1.0000000] gic0 at simplebus1: GIC
[   1.0000000] armgic0 at gic0: Generic Interrupt Controller, 256 sources (247 valid)
[   1.0000000] armgic0: 16 Priorities, 224 SPIs, 7 PPIs, 16 SGIs
[   1.0000000] syscon0 at simplebus1: System Controller Registers
[   1.0000000] fclock0 at simplebus2: 54000000 Hz fixed clock (osc)
[   1.0000000] bcmcprman0 at simplebus1: BCM283x Clock Controller

......


Starting inetd.
Starting cron.
Configuring TLS trust anchors.
Thu Mar 28 16:54:47 UTC 2024

NetBSD/evbarm (arm64) (constty)

login: root
Mar 28 16:54:54 arm64 login: ROOT LOGIN (root) on tty constty
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
    2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
    2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
    2024
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 10.0 (GENERIC64) #0: Thu Mar 28 08:33:33 UTC 2024

Welcome to NetBSD!

-- UNSAFE KEYS WARNING:

        The ssh host keys on this machine have been generated with
        not enough entropy configured, so they may be predictable.

        To fix, follow the "Adding entropy" section in the entropy(7)
        man page.  After this machine has enough entropy, re-generate
        the ssh host keys by running:

                /etc/rc.d/sshd keyregen
We recommend that you create a non-root account and use su(1) for root access.
arm64# passwd
Changing password for root.
New Password:
Retype New Password:
arm64# cat /proc/cpuinfo
processor       : 0
Features        : fp asimd crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 1
Features        : fp asimd crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 2
Features        : fp asimd crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

processor       : 3
Features        : fp asimd crc32
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd08
CPU revision    : 3

arm64# cat /proc/meminfo
        total:    used:    free:  shared: buffers: cached:
Mem:  8138379264 352161792 7786217472        0 210132992 258461696
Swap:        0        0        0
MemTotal:   7947636 kB
MemFree:    7603728 kB
MemShared:        0 kB
Buffers:    7603728 kB
Cached:      252404 kB
SwapTotal:        0 kB
SwapFree:         0 kB
arm64#             
Well that was pretty easy. Maybe I can use this 4B to bootstrap the newer Zero 2 W boards.

Should I try to build NetBSD for the Zero 2 W on this 4 B? How hard is it to build NetBSD, in general?

ryanrs
Jul 12, 2011

I prefer to solve this through sheer willpower and typing.

ryanrs
Jul 12, 2011

I'm pretty sure that I can fix this problem just by waiting 1-3 months. By that time the new DTBs should make it into the NetBSD snapshots, and I will have also forgotten about it.

ryanrs
Jul 12, 2011

installing os updates due to peer pressure

ryanrs
Jul 12, 2011

All this compositor talk reminded me to go set my raspberry pi's gpu memory to minimum.

ryanrs
Jul 12, 2011

One time I used discrete gates to alter the output of a 7447 BCD to 7 segment decoder, because I didn't like how it rendered the 6 and 9.



Pixel hinting with a karnaugh map.

ryanrs
Jul 12, 2011

Upper and lower horz bar. It's not wrong, but I prefer the modern pattern.

ryanrs
Jul 12, 2011

Help! USB isn't working on my router.

It's an Aruba AP-303H running OpenWrt. It's based on a Qualcomm IPQ4019 SoC.



The SoC two USB controllers for USB 2.0, and USB 3.0. The external USB port is on the USB 2.0 controller, I'm pretty sure. Lsusb can see the two hubs (part of the USB controllers inside the SoC).

Here's a bootlog. A keyboard is plugged into the USB port. But I think it fails when trying to talk to the USB 2.0 hub inside the SoC.

Pastebin: serial console full boot log


Very early in the boot, the kernel flips on a GPIO to power up the USB port. A USB power meter plugged into the port will turn on at exactly this point.
code:
[    0.029331] gpio-435 (USB-power): hogged as output/high
Later in the boot there are USB errors:
code:
[   16.601276] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   16.683864] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   16.691163] SCSI subsystem initialized
[   16.757409] fsl-ehci: Freescale EHCI Host controller driver
[   16.794479] ehci-platform: EHCI generic platform driver
[   16.861153] ehci-pci: EHCI PCI platform driver
[   16.923372] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   16.976636] ohci-platform: OHCI generic platform driver
[   17.051339] uhci_hcd: USB Universal Host Controller Interface driver
[   17.216192] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   17.216278] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[   17.268632] xhci-hcd xhci-hcd.0.auto: hcc params 0x0220f665 hci version 0x100 quirks 0x0000008002010010
[   17.359082] xhci-hcd xhci-hcd.0.auto: irq 104, io mem 0x06000000
[   17.471671] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[   17.546543] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[   17.610039] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[   17.701491] hub 1-0:1.0: USB hub found
[   17.779884] hub 1-0:1.0: 1 port detected
[   17.825132] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[   17.874218] hub 2-0:1.0: USB hub found
[   17.976578] hub 2-0:1.0: config failed, hub doesn't have any ports! (err -19)
[   18.019194] usbcore: registered new interface driver usb-storage
[   18.101518] usbcore: registered new interface driver uas
[   18.172639] usb 1-1: new full-speed USB device number 2 using xhci-hcd
[   18.174335] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   18.317168] init: - preinit -
[   18.398594] usb 1-1: device descriptor read/64, error -71
[   18.697219] usb 1-1: device descriptor read/64, error -71
[   18.967150] usb 1-1: new full-speed USB device number 3 using xhci-hcd
[   19.117157] usb 1-1: device descriptor read/64, error -71
[   19.387209] usb 1-1: device descriptor read/64, error -71
[   19.507528] usb usb1-port1: attempt power cycle
[   19.977180] usb 1-1: new full-speed USB device number 4 using xhci-hcd
[   19.977365] usb 1-1: Device not responding to setup address.
[   20.151882] ipqess-edma c080000.ethernet eth0: configuring for fixed/internal link mode
[   20.152645] qca8k-ipq4019 c000000.switch lan1: configuring for phy/psgmii link mode
[   20.233400] ipqess-edma c080000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   20.324919] usb 1-1: Device not responding to setup address.
[   20.637094] usb 1-1: device not accepting address 4, error -71
[   20.787095] usb 1-1: new full-speed USB device number 5 using xhci-hcd
[   20.787228] usb 1-1: Device not responding to setup address.
[   21.067227] usb 1-1: Device not responding to setup address.
[   21.174953] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Searching the internet for error -71 showed people talking about usbcore.use_both_schemes=y and usbcore.old_scheme_first=y. I tried the 1st, then both, passed on the kernel command line (and verified as taking effect in /sys/module/usbcore/parameters/). Neither made any difference in the boot log.

Here's my package list. I just shoveled in anything USB-ish, to see if it was just a missing driver. Didn't help.
code:
ath10k-board-qca4019 ath10k-firmware-qca4019-ct base-files busybox ca-bundle dnsmasq dropbear firewall4 fstools kmod-ath10k-ct
kmod-gpio-button-hotplug kmod-leds-gpio kmod-nft-offload kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-usb3 libc libgcc libustream-mbedtls
logd luci mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd procd-seccomp procd-ujail uboot-envtools uci
uclient-fetch urandom-seed urngd wpad-basic-mbedtls

i2c-tools libi2c kmod-i2c-core kmod-i2c-gpio kmod-i2c-algo-bit kmod-i2c-smbus kmod-regmap-i2c kmod-hwmon-core kmod-tpm-i2c-atmel
kmod-eeprom-at24

block-mount e2fsprogs kmod-usb-storage-uas kmod-usb2 kmod-usb3 kmod-usb-audio usbutils luci-app-hd-idle kmod-fs-ext4 kmod-fs-cifs
kmod-fs-exfat kmod-fs-f2fs kmod-fs-ksmbd parted lsblk kmod-usb-core kmod-usb-hid kmod-usb-ledtrig-usbport kmod-usb-net
kmod-usb-net-cdc-ether kmod-usb-net-lan78xx kmod-usb-ohci kmod-usb-printer kmod-usb-serial kmod-usb-serial-ark3116 kmod-usb-serial-belkin
kmod-usb-serial-ch341 kmod-usb-serial-cp210x kmod-usb-serial-cypress-m8 kmod-usb-serial-ftdi kmod-usb-serial-pl2303 kmod-usb-serial-qualcomm
kmod-usb-serial-simple kmod-usb-serial-ti-usb kmod-usb-storage kmod-usb-uhci kmod-usb-xhci-hcd kmod-usb2-pci kmod-usbmon uhubctl
usbutils
If no fix is obvious, I'd like to at least better understand what is failing. I'm trying to get a USB flash drive working.

e: People of the Future! This has been fixed: post, PR.

ryanrs fucked around with this message at 06:45 on Apr 25, 2024

ryanrs
Jul 12, 2011

Tankakern posted:

it's pretty domain specific this, shouldn't you be asking on the openwrt forums?

Yes, but maybe there is a Linux USB expert around here that understands the logs better than I do.

ryanrs
Jul 12, 2011

eschaton posted:

(remember on UNIX to always check whether every syscall encountered EINTR or EAGAIN and retry!)

code:
501 ~$ cat
^Z
[1]+  Stopped                 cat
502 ~$ fg
cat
cat: stdin: Interrupted system call
503 ~$ 
:hmmno:

ryanrs
Jul 12, 2011

sb hermit posted:

One thing you can do is blacklist xhci (and maybe even ehci) and see if it's the activation of the drivers that are causing issues and perhaps find a workaround in that respect.

It could be a driver incompatibility or, worse, an issue with your hardware.

Blacklisting is a good tip.

I have 2 of these Aruba APs and both have this USB problem, so it is not something like a damaged USB port.

ryanrs
Jul 12, 2011

but now with a ton of baggage, linux is still faster, yeah?

ryanrs
Jul 12, 2011

code:
 make[3] -C feeds/luci/protocols/luci-proto-ipv6 clean-build
 make[3] -C feeds/luci/protocols/luci-proto-ipv6 compile
 make[3] -C feeds/packages/libs/libpfring clean-build
 make[3] -C feeds/packages/libs/libpfring compile
    ERROR: package/feeds/packages/libpfring failed to build.
 make[3] -C package/network/utils/iw clean-build
 make[3] -C package/network/utils/iw compile
 make[3] -C package/boot/uboot-fritz4040 clean-build
 make[3] -C package/boot/uboot-fritz4040 compile
 make[3] -C package/boot/uboot-fritz4040 clean-build
 make[3] -C package/boot/uboot-fritz4040 compile
 make[3] -C package/boot/uboot-fritz4040 clean-build
 make[3] -C package/boot/uboot-fritz4040 compile
 make[3] -C package/boot/uboot-fritz4040 clean-build
 make[3] -C package/boot/uboot-fritz4040 compile
make -r world: build failed. Please re-run make with -j1 V=s or V=sc for a higher verbosity level to see what's going on
make: *** [/home/ryan/openwrt/include/toplevel.mk:232: world] Error 1

real	521m24.503s
user	2696m59.014s
sys	214m48.602s
ryan@rockpro64:~/openwrt$ 
Oof, I think I need a faster build machine. But it would have to be something free I can salvage from storage.

ryanrs
Jul 12, 2011

Yeah I can't unfuck this SoC's USB phy in python.

ryanrs
Jul 12, 2011

code:
--- a/kernel/pf_ring.c
+++ b/kernel/pf_ring.c
@@ -5605,7 +5605,7 @@ static int packet_ring_bind(struct sock
 static int ring_bind(struct socket *sock, struct sockaddr *sa, int addr_len)
 {
   struct sock *sk = sock->sk;
-  char name[sizeof(sa->sa_data)+1];
+  char name[sizeof(sa->sa_data_min)+1];
 
   debug_printk(2, "ring_bind() called\n");
 
@@ -5617,7 +5617,7 @@ static int ring_bind(struct socket *sock
   if(sa->sa_family != PF_RING)
     return(-EINVAL);
 
-  memcpy(name, sa->sa_data, sizeof(sa->sa_data));
+  memcpy(name, sa->sa_data, sizeof(sa->sa_data_min));
 
   /* Add trailing zero if missing */
   name[sizeof(name)-1] = '\0';
lol I don't need compiler messages to fix this code

running make -j7 again

Adbot
ADBOT LOVES YOU

ryanrs
Jul 12, 2011

FlapYoJacks posted:

huh, I’m pretty sure I submitted a patch for that and it was merged upstream on the master branch.

I'm building OpenWrt 23.05.3, not current? I think I just need to turn on IGNORE_ERRORS=1.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply