**** BEGIN LOGGING AT Sat Jan 23 02:59:57 2021 Jan 23 17:55:25 I've finally decided to try out a 10.3 OS image for my project instead of the 9.9 image I had been using. In the new version, it looks like overlayroot is gone --- that's what I'd been using to make my device have a read-only filesystem and so be less likely to be harmed by power cuts. Is there a better way to do this in 10.3, or can I lobby for Jan 23 17:55:26 overlayroot to come back in the next OS release? :-) Jan 23 17:56:18 hmm, I've heard of overlayroot but never looked at it myself Jan 23 17:56:53 it's great! I can just yank out the USB cable and it doesn't matter. All you had to do on 9.9 was edit a config file to turn it on. Jan 23 17:56:55 we mostly just try to eliminate unnecessary filesystem writes (e.g. step 1: get rid of rsyslog) Jan 23 17:57:13 yes, I've been Muntzing systemd entities all morning Jan 23 17:57:16 our products never get cleanly shut down, every power off is an unclean one Jan 23 17:58:02 we do reconfigure the eMMC into SLC mode with reliable writes enabled in the hope of making it more robust to both power failure and wearout Jan 23 17:58:31 "Muntzing systemd entities" ? Jan 23 17:58:43 https://en.wikipedia.org/wiki/Muntzing Jan 23 17:59:07 I'm not aware of any "systemd entity" that causes unnecessary eMMC writes, quite the opposite in fact Jan 23 17:59:48 e.g. systemd-journald will keep a ram-only system log if /var/log/journal does not already exist Jan 23 18:00:13 I trim services and the like to cut boot times and get rid of things that might want to write to the device. https://github.com/stepleton/cameo/blob/master/aphid/setup_trim_services.sh Jan 23 18:00:57 It may be possible that every service is written judiciously and with great care to avoid such writes, but I still don't need them. This thing is supposed to pretend to be a hard drive, so I want it to turn on and go ASAP. Jan 23 18:01:18 yeah same here, and I also want a fast startup, which is why we mostly rely on systemd services and ditch the rest... e.g. last time I did boot time optimization I got this: https://liktaanjeneus.nl/boot.svg Jan 23 18:01:25 of course it would be much faster if I could figure out how to set up the pinmuxes or whatever on boot, but that's a job for another weekend. Jan 23 18:01:45 yes, replacing cape-universal by a custom DT will also speed up your boot Jan 23 18:02:04 (custom DT overlay I mean...) Jan 23 18:03:19 replacing all the networking crap by systemd-networkd + systemd-resolved was also a nice cleanup. here's my draft notes on that: https://pastebin.com/3tjj3v3R Jan 23 18:04:30 oh by "systemd entities" you meant "services" Jan 23 18:04:44 or more generally units Jan 23 18:04:49 I thought you meant components of systemd itself Jan 23 18:05:40 looking at the stuff you disable I'm curious why you even start with the IoT image instead of the console image Jan 23 18:05:54 no need to disable things if they're not installed in the first place Jan 23 18:06:12 I really do hope to get a custom DT overlay at some point. For now, though, overlayroot is the overlay I'm most interested in. I really like the simple certainty of the protection that overlayfs gives: / is read-only, period. Jan 23 18:06:37 In re the console image --- is there a recent version of that? The newest I see on the latest images page is 8.x? Jan 23 18:06:45 https://elinux.org/Beagleboard:Latest-images-testing Jan 23 18:07:15 I don't know why there aren't official releases of it Jan 23 18:07:25 ah, this is very new to me. Jan 23 18:07:31 but you can still find console versions of all official images Jan 23 18:07:32 did not know this existed Jan 23 18:08:30 e.g. the console versions of the official 2020-04-06 image would be these: https://rcn-ee.com/rootfs/bb.org/testing/2020-04-06/buster-console/ Jan 23 18:08:58 this is indeed a revelation. I am happy to know about it. Thank you for this. Now, about overlayroot... Jan 23 18:09:26 btw I disagree with disabling avahi-daemon... I don't think avahi slows down boot, and it's very convenient to be able to find devices by name without any reliance on network infrastructure Jan 23 18:10:35 it's also possible to make / readonly for individual services, and I think a fair number of services already do so Jan 23 18:12:03 in this regard you are blessed with wisdom I do not possess. that said, consider again the simple philosophy of Earl "Madman" Muntz cited earlier. if it is not required, it goes. As for service-specific readonly, wouldn't a dirty shutdown also require a fsck on boot, and thereby extend boot times? I am a simple person and enjoy the epistemological Jan 23 18:12:03 cleanliness of: fs is readonly? then no writes. period full stop. Jan 23 18:13:19 ext4 is journal so no there's not really an fsck on boot Jan 23 18:13:21 *journaled Jan 23 18:13:38 even so Jan 23 18:13:57 but yeah if you want to prevent the need for journal recovery then it should be mounted read-only Jan 23 18:14:04 we can't do that since we need to persist settings Jan 23 18:14:45 though if I did want it I'd just want to have a read-only root, not pretend it's read-write using an overlay Jan 23 18:15:04 when you say that --- since I don't really know who you are --- do you mean you need to persist settings in your own application, or this is something that you think the system requires more generally? Jan 23 18:15:07 since if software relies on that, you'll be consuming more and more ram Jan 23 18:15:15 hence the muntzing Jan 23 18:15:27 it's been fine leaving the thing on for days so far. Jan 23 18:16:01 as for a read-only root, I had the impression that some of the system software wouldn't tolerate that. Jan 23 18:16:13 but I'm not certain of it. Jan 23 18:16:33 neither am I, but I know systemd and debian keep it in mind as a use case Jan 23 18:17:08 e.g. it's why debian dumped its "persistent net naming" scheme, since it required /etc to be writable Jan 23 18:18:15 my own device has the read-only system partition and a secondary read/write FAT partition for holding disk images. since my software is the only thing that writes to it, I can be scrupulous about flushing. the end result is something that looks and feels as much as possible like an appliance. Unplug, take out the microsd card, put it into a modern Jan 23 18:18:15 PC, manage your disk images. It's a simple design by a simple guy for simple uses. Jan 23 18:19:15 oh you're booting from SD instead of eMMC ? Jan 23 18:19:36 yes. This is on PocketBeagle. Jan 23 18:19:53 I see Jan 23 18:19:53 https://github.com/stepleton/cameo/blob/master/aphid/pics/cameo-aphid.jpg Jan 23 18:21:20 yeah no, our product is an actual appliance, the beaglebone is not accessible Jan 23 18:22:40 so, I see overlayroot still exists as a debian package? do you mean it no longer works? Jan 23 18:23:45 it appears, and I say this as someone not familiar with how these os images are made, that it's not being included in the 10.x images. Jan 23 18:24:29 9.9 and earlier ones used to have /etc/overlayroot.conf present, and I presume other support files (though I never went looking for them). There seems to be no trace of it now. Jan 23 18:24:58 I mean, it's not installed by default but you can just install it... though I guess you using a pocketbeagle instead of a beaglebone makes things more interesting due to lack of ethernet Jan 23 18:25:32 you could get it internet access via usb networking, but that can be annoying to set up Jan 23 18:26:45 as I plan to distribute my own SD card images, it's not such a big deal for me to say (for people who want to replicate my steps) "download this .deb, scp it, and install it". Where does one find the .debs? Jan 23 18:26:45 or mount the sd card on a linux system and use systemd-nspawn (+ qemu-user-static assuming you're on a non-ARM system) to spawn a shell inside a container that uses the beaglebone filesystem as root Jan 23 18:27:20 uhh, on debian's many ftp mirrors? Jan 23 18:27:36 Was not certain whether this had to be built special for Beagles. Jan 23 18:27:52 hmm, never mind I assumed it was a plain debian package Jan 23 18:28:01 it's not Jan 23 18:28:30 https://pastebin.com/raw/Bv7EprWD Jan 23 18:29:35 but instead of manually getting the debs I'd just go the nspawn route, or if you have a beaglebone lying around boot the sd card in there to install your packages Jan 23 18:29:54 if you're going to start with a console image you'll no doubt have more stuff you'll want to install anyway Jan 23 18:30:39 I'm not sure how to interpret that. What should I notice in that paste? Jan 23 18:31:47 sorry about that. My needs aren't great --- just a compiler for the PRUs and python3. Jan 23 18:33:10 I don't think either of those is installed in the console image -- it's a minimal image meant for people who are fine with installing whatever they need Jan 23 18:33:52 Ah, I see. Interesting. I don't have a beaglebone lying around, unfortunately. That leaves this nspawn idea, or perhaps others. Or maybe sticking with 9.9 and asking if the image maintainers wouldn't mind restoring overlayroot :-) Jan 23 18:34:26 for the nspawn route: if you have a debian system (or maybe ubuntu will work too) that has internet to mount the sd card on, use apt to install qemu-user-static (and systemd-container if not already installed) Jan 23 18:34:41 then, as root, assuming the sd card is mounted at /mnt/tmp: Jan 23 18:34:51 systemd-nspawn --directory=/mnt/tmp --tmpfs=/tmp --bind-ro=/usr/bin/qemu-arm-static --link-journal=no --hostname=beaglebone Jan 23 18:35:28 should spawn a root shell inside the sd card image Jan 23 18:35:41 allowing you to install packages with apt Jan 23 18:38:07 Thanks for spelling that out. I think I would like to have people be able to replicate my steps if at all possible, even if they are using a windows PC to set up their device. Apologies for asking a noob question then, but as we're puzzling this over, can you spell out what was different about this package that means it wasn't an ordinary .deb? Jan 23 18:38:08 (You may have explained this when I was timed out and I didn't see it.) Jan 23 18:38:10 that pastebin was showing the overlayroot package comes from http://repos.rcn-ee.com/debian Jan 23 18:38:59 (which is rcn's debian repo, rcn (robert c nelson) being the maintainer of the linux kernels and debian images for beagleboard.org) Jan 23 18:40:39 and since you're very heavily tweaking the image, maybe just make ready-to-use images available for windows users? Jan 23 18:41:21 or they can just spawn a linux vm, which I think Windows 10 makes pretty easy? Jan 23 18:41:38 (I'm not a windows user, but that's the impression I got) Jan 23 18:42:04 also, that Caemo/Aphid thing is pretty cool Jan 23 18:42:09 *Cameo/Aphid Jan 23 18:42:32 that is indeed the plan. But I like to show my work, and for the community that would like to use this gizmo (and for me), simplicity is a real benefit :-) Jan 23 18:42:33 and thanks! it's been fun to work on. Jan 23 18:43:52 I'm poking around repos.rcn-ee.com and I see no .debs anywhere, so I clearly need to learn what it means to obtain packages from this server. I have plenty to learn about debian, I think. Jan 23 18:44:40 debian package repositories have a specific layout for consumption by package management tools... people normally don't manually fish .debs out of them so it's not optimized for that :P Jan 23 18:45:55 though you're right, it's not in the place where I'd expect it either.. hmm.. Jan 23 18:47:10 I haven't found a single .deb yet :-) Jan 23 18:47:12 yeah, no idea why it's here: http://repos.rcn-ee.com/debian/pool/main/c/cloud-initramfs-tools/ Jan 23 18:47:32 wow. hats off for finding that! Jan 23 18:47:40 apt-get download --print-uris overlayroot Jan 23 18:47:55 I didn't find it, apt found it for me ;) Jan 23 18:49:59 well, I'll give it a go! I think this could work. In the meantime, I'll ask if they wouldn't mind restoring overlayfs in future images. Thanks for all your help! Jan 23 18:50:17 you can try submitting a request here: https://github.com/beagleboard/Latest-Images/issues Jan 23 18:51:07 honestly I'm not a huge fan of shipping images with everything and the kitchen sink... but then again the IoT images kinda already are anyway :P Jan 23 18:52:35 it would be better to simplify the process of getting internet access to a beaglebone/pocketbeagle via usb, so you can just install whatever you want Jan 23 18:52:42 Thanks for the link! I sympathise, but hope that it's just a wafer-thin couple dozen kilobytes. Perhaps as one last question: do you know of any simple reference for making the custom DT overlays we were talking about earlier? Most of my searches just left me with resources that confused me. Jan 23 18:53:15 (but I need those pins for the peripheral! Maybe over USB? seems like you could do some kind of vtun thing, maybe?) Jan 23 18:53:52 you don't need a tunnel, just internet sharing from the host to the beagle and changing its network settings to be dhcp client instead of dhcp server Jan 23 18:54:06 but doing that without breaking your only access to the pocketbeagle somewhere along the way is the tricky part Jan 23 18:55:10 and I have a repo that makes it easier to make overlays, and includes a bunch of examples: https://github.com/mvduin/overlay-utils Jan 23 18:55:20 that are more readable than most overlays you'll find out there :P Jan 23 18:56:12 oh sweet. that sounds fantastic. I can't wait to check that out, it could really shave a lot of time off of the startup process. Jan 23 18:56:54 updating your bb-customizations package would help too with boot time Jan 23 18:57:09 as does getting rid of initramfs Jan 23 18:57:27 * tss57 takes notes Jan 23 18:57:48 also, some general notes about how DT syntax works: https://pastebin.com/XC8vB33d Jan 23 18:58:48 boy am I glad I asked. I will study these. If I can't work it out, I'll come back and inquire about your consulting rates :-) Jan 23 18:59:32 to get rid of initramfs you can just manually move/rename/delete the /boot/initrd.img-* file for your kernel Jan 23 19:00:20 but to make sure it doesn't get regenerated e.g. on installing a new kernel, you'd need to remove initramfs-tools .. the issue is that there's a bogus dependency from rcn's kernel packages on initramfs-tools Jan 23 19:00:31 my solution is to replace initramfs-tools by a dummy one: https://liktaanjeneus.nl/initramfs-tools_1.0_all.deb Jan 23 19:01:40 silly question: what does it do? is this the filesystem that you see when you plug in the beagle to your computer? Jan 23 19:01:47 no Jan 23 19:02:45 initramfs is a cpio archive that's loaded by the bootloader (u-boot on beaglebones, typically grub on PCs) and passed to the kernel, which unpacks it into a tmpfs that's used as the initial root filesystem Jan 23 19:03:24 I see. But it's not required if you have a working system, so it can go. Jan 23 19:03:47 the main reasons to use initramfs are: 1. if one or more drivers needed to mount the root filesystem are not built into the kernel but compiled as module Jan 23 19:04:36 2. if the kernel is not able to mount the root filesystem on its own at all but requires userspace for it (e.g. LVM, most network filesystems, encrypted filesystems) Jan 23 19:05:18 on the beaglebone/pocketbeagle all required drivers are compiled into the kernel, so having initramfs just slows down boot Jan 23 19:05:41 I think it was only needed for kernels older than 4.9 Jan 23 19:06:03 Got it. Thanks for the explanation! Jan 23 19:06:44 (I'm looking inside the one on the 10.3 IOT image now.) Jan 23 19:07:00 also, if you go digging for overlays you'll find that most of them look different (mainly uglier) from those in my overlay-utils... there's two reasons for that Jan 23 19:08:01 1. overlays (used to) require a hideous input structure. overlay-utils uses a perl script to convert normal dts/dtsi structure (on the right) to the structure required for overlays (on the left): https://pastebin.com/wcMwbwfb Jan 23 19:09:00 these days, recent versions of dtc are able to perform some (but not all) of this conversion for you, though most overlays you'll find won't take advantage of that yet Jan 23 19:10:51 and 2. overlay-utils uses different macros, especially for pinmux, than mainline and bb.org-overlays. this is partially because back when I started it most overlays didn't use macros at all (just raw magic hex values), and my macros are cleaner, more concise, and avoid deceptive naming :P Jan 23 19:11:15 this is interesting. I learn best from examples, so if there's an ugly "old fashioned" style that predominates, that probably helped to frighten me off. Jan 23 19:13:24 interesting that your project seems to use shared memory yet uses remoteproc-pru instead of uio-pruss .. I wasn't aware remoteproc-pru supported shared memory yet Jan 23 19:14:07 ohh never mind Jan 23 19:14:11 shared between the two prus Jan 23 19:14:27 not between pru and userspace Jan 23 19:14:55 I would be at some pains to explain the steps that got me to the design as it exists now --- it was a few years ago! The reason for the renewed interest in the project is because I made some utilities for the client computer. Jan 23 19:15:07 hehe Jan 23 19:15:51 Well, it looks like I'll have to go now... I really do want to thank you for all this help. I'll take away what you've told me and start to put it to use. Thanks very much again! Jan 23 19:16:01 so, this is a project I've been working on (occasionally, when I have time/motivation) for a while: https://github.com/mvduin/py-uio Jan 23 19:16:35 yeah I kinda gotto go too, need to do shopping before curfew Jan 23 19:17:00 cool! Will check it out soon. Have a good evening! Jan 23 22:00:30 does anyone know what an NC header is Jan 23 22:03:41 a what? context? Jan 23 22:03:52 not connected? Jan 23 22:04:07 norton commander? Jan 23 22:04:10 I have a grove PIR motion sensor and one of the male connectors is labeled as NC Jan 23 22:04:24 the entire connector or a pin? Jan 23 22:04:24 and I can't seem to find anything on what it means for the device Jan 23 22:04:27 a pin Jan 23 22:04:32 not connected Jan 23 22:04:39 so connect nothing to it? Jan 23 22:04:58 yeah either "is not connected to anything" or "do not connect to anything" Jan 23 22:05:25 perfect, thank you Jan 23 23:44:23 Has anyone ever had issue with the wifi on the beaglebone turning off for no reason? Jan 23 23:44:46 Status LEDs are still on, but my connection through ssh gets reset and the wifi doesn't appear on my computer anymore Jan 23 23:46:39 which model? Jan 23 23:46:45 regular beaglebone doesn't have wifi Jan 23 23:53:32 beaglebone green wireless Jan 23 23:55:33 I've definitely seen firmware crashes of the wl18xx ... in client mode it recovers completely transparently, it even remains connected to the access point, but I have no idea if the same is true when it's used in access point mode Jan 24 00:21:12 I connected beaglebone blue via micro usb to ubuntu machine and the ip nothing happens when I plug it in, no indication that a new storage device is connected and pinging  192.168.6.2 and 192.168.7.2 does not respond.  Loaded different OS and still nothing Jan 24 00:25:44 is it powered via usb only or also via 12V or battery? does it have led activity suggesting it's booting up normally? Jan 24 00:33:52 do arduino libraries work on the beaglebone Jan 24 00:38:20 the environments are so different that that wouldn't really make sense. it does seem there have been projects to create arduino-compatible libraries for linux userspace in general and beaglebone in particular, but it all seems old to me Jan 24 00:39:32 I know almost nothing about arduino, but I do recall having seen that arduino code tends to be written in a way that polls everything and uses 100% cpu load, which would be rather undesirable on a linux system Jan 24 00:41:41 no power to 12V barrel Jan 24 00:42:46 The LEDs flash with the heartbeat thing, no cylon Jan 24 00:43:35 I mean, it would be really weird if there were a cylon pattern since that indicates reflashing Jan 24 00:44:20 Yes I reflashed and cylon do their thing and then it shuts down, power up again and nothing :( Jan 24 00:44:31 what image did you flash to it? Jan 24 00:45:26 several now, 9.5 iota, ubuntu, 10.5 console Jan 24 00:45:55 tried the image of sd card without flasher, same thing Jan 24 00:46:33 current recommended image is 10.3 2020-04-06 IoT... but this sounds odd, like the usb isn't working properly Jan 24 00:46:50 have you tried it on a different usb port? have you tried using a different usb cable? Jan 24 00:47:17 did the cable you're using come with the beaglebone or is it your own? Jan 24 00:47:36 Yes, I will try another cable.  good thought Jan 24 00:47:59 beaglebone blues don't come with cable Jan 24 00:48:01 (there exist cursed "power only" usb cables, which if you identify one should be cut in half and tossed in the trash, since you don't even want to use those for charging) Jan 24 00:48:05 ah, didn't know that Jan 24 00:48:31 I wish the beaglebone black didn't come with one... at work we now have so many usb cables we could weave baskets from them Jan 24 00:48:44 do it Jan 24 00:48:49 lol Jan 24 00:53:08 lol, "weave baskets" the creativity of the DIY community Jan 24 00:53:34 no we use them commercially, hence the large amounts Jan 24 00:55:38 and you get them retail packaged? Jan 24 00:55:53 cool, I brought a beaglebone into a professional engineering workplace and some guy sneered at it "for hobbyist" probably said the same thing about PCs Jan 24 00:56:40 we use the bbe in a commercial product Jan 24 00:56:40 the nice thing about the beaglebone is that it's open hardware and the SoC and other components are available on the open market, so you can start with using a beaglebone and move to a custom design later if you wish Jan 24 00:57:43 there's also the osd335x which integrates the SoC with ddr3 memory, the PMIC, and the passives needed for the supplies... which are probably the trickiest parts of a design around the SoC Jan 24 00:58:26 this in contrast with the SoC on the raspberry pi, which doesn't even have a product page acknowledging its existence, let alone being available for purchase Jan 24 00:58:36 OMG, you have to use orange micro usb Jan 24 00:58:45 use what? Jan 24 00:59:06 just a joke, the orange one I had laying around worked Jan 24 00:59:45 thanks for the help, idk why it did not occur to me Jan 24 01:00:03 so you might want to toss the other cable before it causes more misery :P Jan 24 01:00:30 right, I'll send it to you for baskets Jan 24 01:00:48 a new usb cable is cheap enough, it's not worth wasting your time on weird issues Jan 24 01:01:07 hey, I'm not going to use an inferior usb cable in my baskets, I have standards Jan 24 01:01:21 :) Jan 24 01:28:26 How might I figure out which pin is connected to the I2C grove connector on the bbgw? Jan 24 01:28:38 rtfm? Jan 24 01:28:49 or https://pastebin.com/Fi8Vh0n5 Jan 24 01:29:18 the i2c grove is the same as the cape i2c interface Jan 24 01:29:41 that'll do as fm Jan 24 01:29:49 oh okay that makes sense, I used the show-pins cmd and it said p9.19 and p9.20 were used for cape i2c Jan 24 01:29:56 but what is rtfm? Jan 24 01:30:11 i2c 2 yeah Jan 24 01:30:37 read the f*** manual Jan 24 01:31:10 of course that assumes Seeed provides useful documentation, I don't recall that being the case for the BBGW :P Jan 24 01:39:49 wish I could find a good manual from seeed.. the one they have for the bbgw isn't that great, and I don't think it states which pins are occupied by the grove connectors Jan 24 01:44:38 just got a grove gesture sensor only to find out there's no software support on the beaglebone.. it's made to run on arduino and rpi.. luckily I found the datasheet for the sensor they used, but now I have to study it myself and write my own interpretation software Jan 24 01:44:53 at first I thought the rpi script for it might work, but it used the rpi gpio library Jan 24 01:47:25 I'm confused... if it's an i2c sensor, why does it use a gpio library? Jan 24 01:47:55 communicating with i2c devices should work the same on any linux device Jan 24 01:49:39 because it's rpi? Jan 24 01:49:44 maybe they're bitbanging it Jan 24 01:49:55 but why would you do that? Jan 24 01:50:23 because rpi? Jan 24 01:51:08 https://pastebin.com/H46xicjN Jan 24 01:51:40 this is the code. it's using the gpio version to do something with the bus, though I don't know what it's doing Jan 24 01:51:40 okay so it's not using GPIO Jan 24 01:51:52 it's just using the rpi revision to pick which bus to use Jan 24 01:52:09 in that case, Ima try and get that code working Jan 24 01:52:37 I also don't know what "grove.i2c" is, just use a normal python i2c library Jan 24 01:53:24 grove.i2c is just a pointless wrapper of the smbus2 python library: https://github.com/Seeed-Studio/grove.py/blob/master/grove/i2c.py Jan 24 01:54:15 does that come preinstalled with python3? Jan 24 01:54:34 referring to smbus2 Jan 24 01:56:25 no, but smbus is Jan 24 01:56:31 which is API-compatible with smbus2 Jan 24 01:57:10 or sorry, smbus isn't preinstalled with python3, but it is preinstalled on beagleboard.org IoT images Jan 24 01:58:05 also that code you linked to looks horrible :P Jan 24 02:00:14 my thoughts exactly.. so many formatting inconsistencies throughout the code as well Jan 24 02:09:23 so p9.19 and p9.20 utilize the i2c-2 device? Jan 24 02:09:28 yes Jan 24 02:09:42 and those pins are configured as i2c by default Jan 24 02:31:13 I'm kinda impressed by how well buried someone managed to get this excavator... https://www.youtube.com/watch?v=3Eo_GvDGP-g Jan 24 02:37:44 that's the opposite of an excavator **** ENDING LOGGING AT Sun Jan 24 02:59:57 2021