/srv/irclogs.ubuntu.com/2024/09/10/#ubuntu-arm.txt

ikoniaI'm considering moving a few mini-home projects out of Rasbian and into ubuntu-arm a few of them still have the need to use raspi-config to set some config settings for SPI, I could do some of it in boot.txt but not all of it, as ubuntu got any guidance on how to approach some of the functionality driven out of raspi-config ?10:08
waveformikonia, I did add a raspi-config package which is semi-functional back in ... ermm ... jammy apparently. It should work for basic operations like enable/disable SPI/I2C but I'd caution it'll never be fully functional (it's deliberately a raspios specific package, and maintaining an enormous delta for ubuntu is not practical)10:09
waveform(the bits that aren't functional *should* raise an error rather than doing anything dreadful, though)10:10
ikoniawaveform: I remember this dicussion well, 10:10
waveformother than that the answer is unfortunately "hack on config.txt manually"10:10
waveformhmm, I haven't done a merge on that since Dec 2022 either ... I should stick that on my list for next cycle10:11
ikoniamaintaining raspi-config on ubuntu does not look fun or worth while, and I could move it into just text file manipulation as one of the reasons I'm trying to pick the right OS is I'll automate the software setup with Ansible or puppet but I want to invest that time ont he right platform 10:11
waveformwhat are the specific changes you need to make to config.txt?10:11
ikoniamost of them are setting up serial / SPI interfaces for air sensors, and variations of that10:12
ikonianothing too bad, just need to know where to invest my time before investing it10:12
ikoniathe main project I want to port is my enviro+ setup for my local area running on about 20 pi's 10:12
waveformokay -- the UART should be enabled by default on the server images (which I'm assuming is the one you're using) but it'll be for the serial console so you'll need to disable the console in cmdline.txt. I *think* raspi-config in Ubuntu should be capable of doing that10:12
ikoniawaveform: it would probably be easier to just template the boot.txt or or config.txt with puppet or ansible 10:13
waveformvery likely10:13
waveformthat's probably the best way to go to be honest10:13
ikoniaI did think so, and I half expected the ubuntu guidance to be 'hack it in the text file'10:14
ikoniawhich is fine advice in itself10:14
waveformyup, sorry!10:14
ikoniafar from sorry10:14
ikoniahas ubuntu set/altered the cloud-init userdata path for first boot from the default 15:47
ikoniaI'm asking as I'm struggling to align how the rasperry pi imager correctly dumps the userdata file for an ubuntu image in the right place, but doesn't seem to create a userdata file on the boot volume for raspbian15:48
ikoniadid ubuntu change the path ?15:48
waveformno, rpi-imager "knows" what initialization system each OS image uses -- just a sec I'll dig out the YAML15:50
waveformhere's the "root" os-list: https://downloads.raspberrypi.org/os_list_imagingutility_v3.json -- if you look under os_list.0.init_format you'll see "systemd"15:51
waveformconversley, here's the YAML for the Ubuntu images (which the former file points to): https://changelogs.ubuntu.com/raspi/os_list_imagingutility_ubuntu.json15:51
waveformunder os_list.1.init_format you'll see "cloudinit"15:51
ikoniathank you, I'm trying to walk this through, some of it is really clear/obvious, a good chunk is burried15:51
waveformthe bits in rpi-imager that actually generate the initialization customization files are here: https://github.com/raspberrypi/rpi-imager/blob/qml/src/OptionsPopup.qml#L59115:52
waveform(or roundabout there)15:52
ikoniathank you15:53
waveformit basically generates files for both, but then the C++ bits only write one set depending on that YAML setting15:53
ikoniainteresting, it looked at a glance as if the imager was actually modifying the debian/raspbian image directly on some parts 15:54
ikoniaI couldn't believe that's what would be happening, especially when the ubuntu image uses cloud-init so cleanly15:54
waveformnope, the image is always written verbatim (partly so the post-write verification step can work), then it mounts the FAT-based boot partition to write stuff there15:56
ikoniaand that was my expectation15:56
waveformrather amusingly, it now uses its own FAT driver ... the reason I noticed this is that the s390x builds on Ubuntu started failing because the in-built FAT driver is little-endian specific :)15:56
ikoniabut the difference between how the raspbian and ubuntu images applied config was sending me the wrong way15:56
ikoniawaveform: why would it use it's own fat driver ??15:57
waveformit's compiled for MacOS, Win, and Linux and it used to have the OS mount it but I'm guessing that caused all sorts of fun issues (e.g. unmounting cannot be done with open files, which might happen for all sorts of reasons, mounting can require special capabilities, etc.)15:58
ikoniahmm that feels like the install/validation should be tightened up rather than change the FS driver 15:59
ikoniaapprecaite that's a 10,0000000 ft / low understanding opinion16:00
ikoniaok - found it now, wow, the raspbian way is a shell script with value embedded into the script16:15
ikoniakudos for using cloud-init in the ubuntu images16:15
=== sugoi1 is now known as sugoi
=== five61848033910 is now known as five6184803391
=== sugoi1 is now known as sugoi
=== sugoi1 is now known as sugoi
=== sugoi1 is now known as sugoi

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!