tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: msdosfs oddity?



> On Nov 30, 2024, at 12:30 AM, Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
> 
> My next attempt was to dike out the 0x55 0xaa test.  When I did that,
> msdosfs mounted it just fine.  But then, when I copied the file to the
> device, it reset itself, making the umass disappear from USB.  When I
> then tried to unmount the filesystem, the system crashed ungracefully.

Well, at least you can rest easy with the knowledge that there is no actual file system to corrupt on these device.  When the UF2 programming procedure is complete, the device reboots to run the program that you just flashed.  If you want to fully understand what it's doing, the source code for the mask ROM is here:

     https://github.com/raspberrypi/pico-bootrom-rp2040

> I then guessed what you said above, that it wasn't actually caring
> about the filesystem overhead writes, just the data content (since UF2
> blocks are very self-descriptive) and tried lseeking to 1M into the
> device (to avoid attempting to write over what NetBSD thinks is the
> disklabel) and dropping the UF2 file there.  That worked fine; the last
> write errored, but it worked without panicking the host.
> 
> So now I just need to try to dig up enough hardware documentation to
> write my own code for it, probably including writing an ARM assembler.

The RP2040 is extensively documented.  Start here:

     https://www.raspberrypi.com/documentation/microcontrollers/

Almost all development on the RP2040 is bare-metal development (that’s what the Pico SDK facilitates), although there are some applications that use small RTOSs on it.

The Pico SDK makes building RP2040 binaries super easy, and it’s BSD-licensed.  You don’t have to use any fancy UI stuff at all, but you do have to be willing to stomach cmake.

> (I think I have a DNARD somewhere, but I suspect I will find writing my
> own assembler easier than bludgeoning the NetBSD/arm toolchain into
> generating what the Pico wants.)

Or just install this package?

Jasons-MacBook-Air:thorpej$ pkg_info | grep gcc
cross-arm-none-eabi-gcc-8.3.0nb5 GCC for bare metal ARM EABI
Jasons-MacBook-Air:thorpej$ 

-- thorpej



Home | Main Index | Thread Index | Old Index