HackerTrans
TopNewTrendsCommentsPastAskShowJobs

xobs

no profile record

comments

xobs
·4개월 전·discuss
ModemManager. You need to set the variable ENV{ID_MM_PORT_IGNORE}=“1” I. A udev rule.

Standard usb serial ports show up as ttyACM#, whereas nonstandard ports that require a driver like ftdi show up as ttyUSB#. Modems tend to be standard usb devices, so ModemManager by default scans all serial ports as if they were modems. This involves sending some AT commands to them to try and identify them.

Software implementations of serial devices tend to follow the standard, so they show up as ttyACM#.
xobs
·6개월 전·discuss
> Rust? Only Rust?

Yes, this OS is written in Rust. However, since it has a well-defined ABI, and all services are defined to use `#[repr(C)]`, and the interface is simple primitive enums, it's designed with C-like language support in mind. The hardest part in C is getting an equivalent to `#[repr(C, align(4096))]` which, last time I checked, only let you do alignments up to 64 or so without resorting to linker tricks.

> This mechanism seems ripe for squatting attacks

There are only a few services with well-known names, and they start up before things like the scheduler are running. Most things go through the nameserver service which supports things like attestation, finite-client limits, and signature checking.

> Just use standard ELF.

Sure, there's a loader available that lets you run standard ELF files: https://github.com/betrusted-io/xous-core/tree/main/apps/app...

The bootloader uses the MiniELF format because we can make assertations about things like the order of sections and about merging multiple segments, while also stripping non-loadable sections. It would be possible to just bundle all the ELF images for all programs together, but if you're generating the loader image you might as well shrink the image a bit.

> What?? No! sbrk() is a terrible interface.

Then you can call `MapMemory(NULL, NULL, [size], RWX)`: https://docs.rs/xous/latest/xous/syscall/fn.map_memory.html
xobs
·6개월 전·discuss
The Rust runtime will, at a minimum, set up the stack pointer, zero out the .bss, and fill in the .data section. You're right in that a heap is optional, but Rust will get very cranky if you don't set up the .data or .bss sections.
xobs
·6개월 전·discuss
> One-way messages

Messages are either one-way (Send or Scalar), or are two-way (BlockingScalar, Lend, or MutableLend). For two-way messages, the calling process inherits the quantum of the sending process, so the only penalty is the cost of two context switches.

> Interprocess communication by memory remapping instead of copying

This is true for Send, Lend, and MutableLend, but for Scalar or BlockingScalar you get 5xusize values instead, which is used for things like `msleep` or `uptime`.

You would have to stop access to other threads that might have access to the page about to be unmapped, but Rust guarantees that if you have a mutable reference, you're the only one with access to the page.
xobs
·6개월 전·discuss
It’s normal if you use the Nvidia proprietary driver. Every notification leaks one fd, so if you get a lot of notifications it’ll segfault once or twice per day.

This was apparently fixed in version 590 of the driver which was released only recently: https://forums.developer.nvidia.com/t/fd-leak-with-explicit-...
xobs
·6개월 전·discuss
If you run pw-top, you might see errors accumulating. This is usually due to an underrun from the game requesting an audio quantum that’s too low.

The fix is:

    mkdir -p ~/.config/pipewire/pipewire.conf.d && echo "context.properties = {default.clock.min-quantum = 1024}" | tee ~/.config/pipewire/pipewire.conf.d/pipewire.conf
Basically, just force the quantum to be higher. Often it defaults to 64, which is around 1ms.
xobs
·6개월 전·discuss
You can load additional symbols into gdb without restarting it by using `add-symbol-file`, which you can use to iterate on the symbol mapping.
xobs
·8개월 전·discuss
I’m not even on a vpn and I’m getting an error saying the website is blocked.
xobs
·8개월 전·discuss
My current record is $19 (including shipping!) for two assembled boards of https://github.com/xobs/soundoff which is a little device that shuts off 5V power to a USB-A port when it detects the PC it's connected to goes to sleep.
xobs
·8개월 전·discuss
I really wish this 3D Gerber viewer worked: https://www.zofzpcb.com/

You can feed it the output from Kicad, and if you include the ipc netlist it’ll even generate models. Great for doing a check before manufacturing, especially if the viewer matches what you see in Kicad.

Unfortunately I’ve never gotten it to run in wine.
xobs
·7년 전·discuss
Copper tape on cardboard.

Cardboard is a fantastic material. You can draw the schematic on, and then run copper tape along the schematic. It's easy to annotate, since you just need to use a pen. It's able to handle much more current than a breadboard, since the copper tape has a lot more metal than thin wires. You can solder directly to it, and with tape (or some other insulating material) you can cross wires without having them short.

You can also work with SMT ICs. Using a pair of scissors, you can make your own pads and solder to them. I connected an SO8 to read off the SPI data using copper tape. I built an amplifier using a spare Novena amplifier IC on cardboard with copper tape. And I have a level shifter done on cardboard with copper tape.

Bunnie has a good article on it here, including an example power regulator that's handling 2A on cardboard: https://www.bunniestudios.com/blog/?p=5259