**** BEGIN LOGGING AT Sun Nov 25 03:00:00 2018 Nov 25 04:42:33 hey whats the trick for flashing the bbb Nov 25 04:43:17 its just turn it on holding down the boot button right? Nov 25 04:47:18 and then what it is, if you have a sd card and you boot normally, will it boot from that or emmc? (haven't done this in a while) Nov 25 04:55:40 poop Nov 25 05:52:28 there we go Nov 25 05:52:35 joined #beaglebone like a fool Nov 25 05:52:54 anyone here I can bounce a few questions off of? Nov 25 05:55:15 Well, in case anyone becomes active, I'm running into some weird problems with flashing a new emmc image on the beaglebone black Nov 25 05:56:15 specifically, it doesnt seem to launch my sdcard image. The LED Row lights up solid blue and just stays like that Nov 25 05:59:20 if anyone could point me in the right direction for troubleshooting, I'd really appreciate it. Nov 25 06:09:24 ^^ someone who brings up new devices more often than me will help you out when they wakeup/come online Nov 25 06:09:33 * ayjay_t is from twitter Nov 25 06:10:04 (hedgeberg) Nov 25 06:10:23 fair enough. I'm going to go break out my bus pirate and monitor the debug serial port, see if I can get uboot output Nov 25 06:29:38 hmmm Nov 25 06:29:48 looks like its not managing to init vmlinuz? Nov 25 06:29:53 wonder if uboot is out of date Nov 25 06:29:58 that would make sense Nov 25 06:47:09 there we go Nov 25 06:47:19 sorry, knocked over my router, didnt miss anything did i? Nov 25 06:54:38 hm Nov 25 06:54:41 updated uboot Nov 25 06:54:44 still not working Nov 25 07:10:42 so, as far as i can tell, its hanging when loading the kernel Nov 25 07:10:48 i have no idea why Nov 25 07:23:25 there we go, think I got it Nov 25 07:23:48 yup, its playing the cylon sequence, im going to assume its live Nov 25 07:24:14 issue was that on new uboot, holding the user button seemingly broke desired behaviors? idk Nov 25 07:24:36 what I do know is that cylon sequence is playing and that im looking at debug output over serial rn so like Nov 25 07:38:46 ok, now im back to square 1 Nov 25 07:39:23 failing to boot, even though it now has the right kernels Nov 25 07:39:32 it booted from sd once and did the update successfully Nov 25 07:39:45 but now it seems to be screwed. have to wonder if the emmc is damaged Nov 25 07:43:56 ok now im getting a lot of bizarre issues Nov 25 07:44:09 anyone know any reason why uboot would be hitting an undefined instruction? Nov 25 07:44:31 starting to think either this does not like being driven using usb, or the SoC is damaged Nov 25 07:54:08 no, that doesnt make sense, it was working with the previous fw Nov 25 07:54:18 if anyone has any thoughts? Nov 25 07:54:35 this is a beaglebone black that I just tried loading the latest debian image onto Nov 25 08:05:24 is the pre-uboot bootloader ever updated? if so, that may be the issue, Im unsure if it was updated here Nov 25 10:01:47 this all sounds really bizarre Nov 25 10:03:48 can you still boot from an sd card containing a standalone image if you power on while holding down the S2 button? (you can let go of the S2 button once the power led turns on) Nov 25 10:04:04 this completely bypasses the bootloader on eMMC Nov 25 10:11:12 also, be sure to verify the contents of the sd card after flashing to exclude the possibility that the sd card is unreliable (this happens) Nov 25 17:17:53 https://twitter.com/hedgeberg/status/1066650347270213632 Nov 25 17:21:23 yep, I do the same Nov 25 17:22:56 my ~/docs/ti dir is 8.1G Nov 25 18:12:27 do you use git to organize? Nov 25 18:12:33 err or version/store/backup? Nov 25 18:13:38 no, I keep the pdf date and document id (which contains the document revision) in the filename of each pdf Nov 25 18:14:17 using git would just be annoying since there's no useful way to diff pdfs Nov 25 18:21:08 thats true, but git may have the best mechanisms if we're going to make a collaborative cache Nov 25 18:30:54 a collaborative cache of documents would have serious copyright issues Nov 25 18:31:06 (as well as organizational) Nov 25 18:31:32 and I'm not sure git sounds particularly great for the purpose anyway Nov 25 18:31:40 in fact it sounds pretty ill-suited Nov 25 19:35:45 yeah i think you're right Nov 25 19:35:51 but i can't get over how accessible it is to people Nov 25 19:36:01 the cache would have copyright issues eh Nov 25 19:36:19 i'm somehow thinking "how does the wayback machine get around that" Nov 25 19:37:21 https://www.techdirt.com/articles/20081017/0150532568.shtml Nov 25 22:28:11 huh i mean, is mmap the superior way to open any large file Nov 25 22:29:52 yeah i guess Nov 25 22:50:08 there we go Nov 25 22:50:10 back Nov 25 22:50:47 zmatt I'll try taking an image of the sd card to verify consistency Nov 25 22:50:58 but I'm thinking it might actually be uh Nov 25 22:51:11 that the SD card is drawing too much power? Nov 25 22:51:29 sepcifically judging by the inconsistent behaviors? Nov 25 22:55:37 I do have a logic analyzer and a microsd card mitm breakout that I could use to debug if necessaray Nov 25 22:56:43 hedgeberg: that sounds very implausible Nov 25 22:56:50 how so? Nov 25 22:57:18 I mean, it shouldn't be the case, but if its having this kind of issue then idk Nov 25 22:57:36 Its that or bootloader issues in my mind Nov 25 22:57:39 why would you even suspect something along those lines? Nov 25 22:57:51 zmatt on the case Nov 25 22:58:00 "bootloader issues" is very vague Nov 25 22:58:03 the boot button uses ti's state machine right Nov 25 22:58:12 like it doesn't use uboot Nov 25 22:58:40 inconsistent boot behavior, i.e. its booted from this sdcard twice now Nov 25 22:58:41 ayjay_t: the boot button is sampled by hardware and determines the flow of the rom bootloader that's part of the SoC Nov 25 22:58:51 yeah thats what i meant Nov 25 22:59:15 Is the rom bootloader eeprom? or is it never updated after factory? Nov 25 22:59:21 hedgeberg: sounds like it may be a flaky sd card Nov 25 22:59:37 I mean thats what I thought too, but it seems to be consistent Nov 25 22:59:42 hedgeberg: the rom bootloader is part of the SoC mask, it is not programmable in any way Nov 25 22:59:49 oh yeah ok, maskrom Nov 25 22:59:58 yeah i mean, if you think its a power issue, i'd try a 5v power supply Nov 25 23:00:01 like a dc jack Nov 25 23:00:21 i mean if you're using usb on a bus that's stressed out maybe its not enough to power the device consistently Nov 25 23:00:34 hedgeberg: "inconsistent boot behavior", "it seems to be consistent" ... ehh? Nov 25 23:00:44 no, the sd card is consistent Nov 25 23:00:46 haha Nov 25 23:00:47 yeah Nov 25 23:00:49 ayjay_t: doesn't sound likely, the SoC would just power off Nov 25 23:00:52 sorry, im not on myadderall Nov 25 23:00:55 no, not necessarily Nov 25 23:01:03 brownout points arent consistnt Nov 25 23:01:19 does the pmic have a under voltage manager tho Nov 25 23:01:26 it does Nov 25 23:01:34 still its worth a shot to rule it out and move on Nov 25 23:01:40 i mean, im also getting dabrt and prefetch abrts even when the sd card isnt plugged in now Nov 25 23:01:52 so that probably isnt the issue Nov 25 23:01:56 lemme grab a boot log rq Nov 25 23:02:27 hedgeberg: if you can boot consistently from sd card but have problems when flashed to eMMC, then there's probably no issue with sd card in the first place Nov 25 23:02:34 power or otherwise Nov 25 23:02:45 no i have no consistent boot behavior with either Nov 25 23:02:53 Ok stop lets wind this back Nov 25 23:03:04 I bought this bbone black used Nov 25 23:03:24 hmm, why did the owner sell it? :P Nov 25 23:03:27 it came with debian with kernel 3.19 iirc Nov 25 23:03:44 with kernel 3.19 it had no issue booting Nov 25 23:04:11 yeah, its entirely possible the SoC is damaged, I figured thats possible, but if thats the case id like to confirm as such Nov 25 23:04:14 3.19? are you sure? that's a really weird kernel revision Nov 25 23:04:21 no im not sure Nov 25 23:04:24 heh Nov 25 23:04:30 it was 3.something Nov 25 23:04:34 ok Nov 25 23:04:42 I have awful adhd, thats not a detail im going to memorize Nov 25 23:04:50 I think the standard images jumped from 3.8 to 4.x Nov 25 23:05:07 (not 100% sure about that either though) Nov 25 23:05:48 hey zmatt don't you have some baremetal Nov 25 23:05:58 i mean i realize this may not be the fastest route but now i'm super curious Nov 25 23:06:11 could you just dd the baremetal you made to the sd card and try to boot off the sd card Nov 25 23:06:15 does it have serial or led? Nov 25 23:06:27 ayjay_t: to accomplish what? Nov 25 23:06:47 to determine if booting off the sd card is is working 100% Nov 25 23:06:54 maybe there is an issue with the eMMC Nov 25 23:06:58 anyway, i wanted to go ahead and update, so I flashed an SD card, went ahead and tried to flash the eMMC, and the first round the indicator LEDs were solid blue, no movement Nov 25 23:07:13 booting off the eMMC was working fine Nov 25 23:07:23 booting off the sdcard was not Nov 25 23:07:54 so it wasn't just failing to flash, it was failing to boot the sd card? Nov 25 23:07:57 eventually last night I got it to boot after updating uboot using the builtin uboot update script Nov 25 23:08:02 hey zmatt question t2o if the boot button routes your boot rom to the sd card, how do you switch between just booting and booting + flashing Nov 25 23:08:03 this was without using the S2 button I suppose? Nov 25 23:08:09 and then sdcard was booting consistently Nov 25 23:08:19 no I was holding the S2 button Nov 25 23:08:41 and I flashed and now neither is working Nov 25 23:09:08 are you very sure? it's a fiddle little button and holding it down while connecting power to the beaglebone can be tricky? Nov 25 23:09:26 when powering on with S2 held down, the contents of eMMC is completely irrelevant Nov 25 23:09:33 yeah, pretty sure Nov 25 23:09:48 so if upgrading the bootloader on eMMC made any difference, then you weren't powering on with S2 held down Nov 25 23:10:00 TRUE Nov 25 23:10:01 (either that or it was simply random and not related to updating the bootloader) Nov 25 23:10:02 i mean maybe the s2 button on mine is broken Nov 25 23:10:08 probeskis! Nov 25 23:10:27 it wouldnt be the first time ive had a pushbutton switch wear out Nov 25 23:10:39 zmatt is switching between booting from sd vs bootring from sd and flashing a matter of a file in the /boot directory? Nov 25 23:10:48 that's easy to verify: power on with S2 held down and no sd card inserted, it will not even attempt to boot (only the power led turns on) Nov 25 23:11:01 sure lemme hook up my uart adapter Nov 25 23:11:13 ayjay_t: yes, a normal card turns into a flasher by uncommenting a line in /boot/uEnv.txt Nov 25 23:12:05 brb pizza just got here, ill be back in 30-ish minutes Nov 25 23:12:11 hedgeberg: also, in that state, if connected via usb it'll enumerate as an usb device (rndis) Nov 25 23:13:32 wwwwwwwwwwwwwwwwwwwwwww Nov 25 23:13:33 what Nov 25 23:13:39 and please do the sd card verification step too (i.e. after flashing, verify its contents) since flaky sd cards that read inconsistently are definitely a thing that happens, and it's good to exclude before going crazy Nov 25 23:13:45 ayjay_t: ? Nov 25 23:13:57 if you sd boot without an sd card, it enumerates as a usb device? Nov 25 23:14:14 rndis is... ethernet over usb? Nov 25 23:14:35 is that any different than what it normally does O_- Nov 25 23:14:45 not ethernet in a non booted state obviously Nov 25 23:14:48 i'm gonna have to try that Nov 25 23:14:49 see how it goes Nov 25 23:16:31 ayjay_t: rom boot order is normally { eMMC, sd, uart, usb }, or if powered on with S2 held down { spi, sd, usb, uart } Nov 25 23:16:48 where usb means it'll enumerate as rndis device and netboot over it Nov 25 23:17:08 oh my god i didn't realize it was that easy Nov 25 23:17:13 i've always wanted to try netbooting a beaglebone black Nov 25 23:17:21 2 questions Nov 25 23:17:35 actually no one Nov 25 23:17:48 are there any breakout pads for the eMMC? Nov 25 23:18:39 i think _some_ of the emmc is routed to the pins Nov 25 23:18:45 thats fine Nov 25 23:18:47 hedgeberg: you could reach the eMMC via the expansion headers Nov 25 23:18:52 great Nov 25 23:19:06 be sure to hold the processor in reset to avoid drive conflict Nov 25 23:19:09 just need clk, gnd, emmc_vdd, cmd, and d0 Nov 25 23:19:25 cant isolate the emmc supply? Nov 25 23:19:31 no ferrite beads or anything? Nov 25 23:19:49 no, but why would you need to? Nov 25 23:19:58 to avoid drive conflict Nov 25 23:20:05 power on the emmc completely on its own Nov 25 23:20:37 anyway ill figure this all out later Nov 25 23:20:39 just ground the reset pin (P9.10), it'll ensure all processor I/O is high-Z Nov 25 23:20:56 not the way id do it, but good enough Nov 25 23:21:04 oh, are they using 1.8 or 3.3V i/o? Nov 25 23:21:27 for an overview of the P9 and P8 headers see the "P9" and "P8" tabs of my pins spreadsheet: https://goo.gl/Jkcg0w Nov 25 23:21:37 all digital I/O of the beaglebone is 3.3v Nov 25 23:21:45 nice, that makes life so much easier Nov 25 23:22:02 zmatt this reference is demon-tier Nov 25 23:22:03 too used to phone/tablet eMMCs where they switch voltage Nov 25 23:22:05 all eMMC pins are located on the P8 header Nov 25 23:22:21 eMMC never switches voltage, that's SD Nov 25 23:22:52 eMMC takes both 1.8V and 3.3V rails Nov 25 23:22:56 yes Nov 25 23:23:01 and i could swear ive seen it switch Nov 25 23:23:12 youre probably right though Nov 25 23:23:17 im probably losing my mind Nov 25 23:23:33 I don't completely exclude the possibility that it might allow switching voltage, but I don't see why anyone would do that Nov 25 23:24:13 it would probably require powering off the eMMC and then powering it back up at a different voltage and reinitializing it Nov 25 23:24:14 start at high voltage for low speed, and then switch to low voltage for high speed, or at least thats usually the way ive seen that kind of scheme used Nov 25 23:24:20 yes Nov 25 23:24:33 no, speed-dependent voltage is purely for SD Nov 25 23:24:34 oh, yeah, its not switching voltage levels mid-operation Nov 25 23:25:01 speed dependent voltage is a universal thing, its the inverter threshold point Nov 25 23:25:18 well that's how it works for SD. there you unconditionally begin at 3V/3.3V, and then negotiate the switch to 1.8V Nov 25 23:25:41 after power cycling SD, you have to begin at 3.3V again Nov 25 23:25:47 this voltage negotiation thing doesn't exist in eMMC Nov 25 23:25:59 if you use a low I/O voltage, you do so from the start Nov 25 23:26:19 yeah its not negotiated, iirc what I saw in this system was 3.3V to query the device for properties Nov 25 23:26:43 see if it was 1.8V enabled, get number of data lanes, etc, and then it powered all the way down and restarted at 1.8V Nov 25 23:27:02 weird Nov 25 23:27:32 bit, yeah, but its a good way to achieve really high speed emmc Nov 25 23:27:37 normally you'd simply ensure in your hardware design that the eMMC gets an I/O supply that both it and the processor support Nov 25 23:27:53 the emmc was hot-swappable in this system Nov 25 23:28:01 no, not hot-swappable Nov 25 23:28:04 thats the wrong term Nov 25 23:28:10 it was on a daughterboard Nov 25 23:28:13 so it was upgradable Nov 25 23:28:55 I guess someone really wanted to hedge compatibility I guess... it's definitely very unusual to do this for eMMC Nov 25 23:29:04 >hedge Nov 25 23:29:10 :3 Nov 25 23:29:28 yeah, it was a bit weird, but i think the idea was that they wanted to allow for a broad range of emmc suppliers Nov 25 23:30:40 anyway now im going to actually go eat, ill try sd stuff a couple more times and if that doesnt work ill switch to single-lane emmc flash Nov 25 23:30:41 * zmatt shrugs Nov 25 23:31:20 we dont need to flash the BCT's as well, do we? like, an sd/mmc hack is fine? Nov 25 23:31:32 BCTs ? Nov 25 23:31:48 Boot Configuration Table, not everything uses it even Nov 25 23:31:55 "an sd/mmc hack" ? Nov 25 23:32:43 you can just download the latest image from beagleboard.org and flash it directly onto the eMMC, nothing special is needed Nov 25 23:32:45 using an SD card reader to interface with eMMC Nov 25 23:32:56 i dont have an emmc flasher on me atm :/ Nov 25 23:33:25 i do however have an SD reader and a breakout, so i figured i would just fly wires and do it that way if i dont need to update the bct's Nov 25 23:33:26 this all sounds like a bit weird to do though in comparison to finding a working sd card if there's a problem with this one Nov 25 23:33:44 what, you dont like gilding the lily needlessly? Nov 25 23:34:02 eMMC boot partitions are not used, if that's what you mean Nov 25 23:34:09 yup Nov 25 23:34:37 cool, then I have a backup plan if i cant make sd card stuff work Nov 25 23:35:01 kk, thx much, ill be back to work on this in a bit Nov 25 23:35:32 it is also possible to reflash eMMC via usb, see https://github.com/ravikp7/node-beagle-boot Nov 25 23:35:48 omg is this the repo i've been looking for Nov 25 23:35:51 is this the usb boot Nov 25 23:36:05 oh my effing gosh Nov 25 23:40:36 oh neat, I figured that could just be done via putting uboot into dfu, but that honestly looks easier Nov 25 23:47:56 i want to port this to go Nov 26 01:26:34 Can I make my GPIO/P9.42 turn on w/out software? I need to make a quick test w/out the direction set at 0. Nov 26 01:27:06 I need to the GPIO/P9.42 to be 1-on-high. Nov 26 01:27:31 e.g. w/out gpiod and w/out software/just userspace. Nov 26 01:28:19 brb = testing Nov 26 01:31:30 w/out GPIOd. Nov 26 01:51:35 Aw! Nov 26 01:51:38 brb Nov 26 01:53:27 eh, just use the sysfs interface like usual? Nov 26 01:53:31 nobody uses gpiod Nov 26 01:53:53 (that's a lie of course, but it's definitely not common) Nov 26 01:55:33 Okay. Nov 26 02:11:13 Hey! Nov 26 02:11:27 I used libgpiod to make my LoadCape work w/ a single line. Nov 26 02:11:33 e.g. only LED so far. Nov 26 02:11:53 I do not know anything about sysfs. Sorry. Nov 26 02:13:00 it's what nearly every gpio library uses, including the python library you used for the motor cape Nov 26 02:13:25 I tried to test the P9.42 gpio on my BBB, which is relative to making my LED work on T1, w/ libgpiod. Nov 26 02:13:38 This is making my LoadCape active. Nov 26 02:13:56 I must read up more on sysfs then. Nov 26 02:14:21 I remember it when I used Angstrom. Nov 26 02:14:40 Then, I started to use Debian. The rules changed and I fell behind. Nov 26 02:15:00 ehm Nov 26 02:15:05 zmatt! Nov 26 02:15:17 You do not need to explain anything, sir. Nov 26 02:15:22 like I said, sysfs is used by most beaglebone software/libraries Nov 26 02:15:25 also for pwm and such Nov 26 02:15:58 it's the pseudo-filesystem mounted at /sys, which represents kernel objects and their attributes Nov 26 02:16:40 Oh...alright. I guess I will stick w/ the same ole, same ole. Except! Except, when I need to perform testing w/ specific pins. Nov 26 02:16:49 "same old same old" is sysfs Nov 26 02:16:54 Right! Nov 26 02:16:54 libgpiod is something very new and rarely used Nov 26 02:17:01 Oh...I got you so far. Nov 26 02:17:28 New is fun, extravagant and noteworthy. Am I right? Nov 26 02:17:30 and something of which I'm surprised it even works at all on the beaglebone in its default configuration Nov 26 02:17:43 I have gpiod installed now. Nov 26 02:17:49 no, gpiod is an awful piece of misdesign Nov 26 02:17:56 Oh. Nov 26 02:17:57 worse than the sysfs interface in pretty much every way Nov 26 02:18:14 Aw! I guess I can use what I know when it is convenient. Nov 26 02:18:34 It is a shame more of what I cannot understand lies w/in these dog-gone books. Nov 26 02:18:36 More reading! Nov 26 02:18:50 sysfs lets you toggle a gpio by simply writing 0 or 1 into a file Nov 26 02:18:56 doesn't really get any simpler than that Nov 26 02:19:29 I remember. I just fell out of the BBB for a while. I misplaced my book somewhere and know absolutely nothing about it now. Nov 26 02:19:57 Odd days! Nov 26 02:21:03 Linux is cool to me. I enjoy finger bangin' this ole keyboard and making sensors-Capes-motors/whatever work and move around. Nov 26 02:21:06 ... Nov 26 02:21:18 Something "new" or uncharted may be nice for a starter. Nov 26 02:26:36 anywho...off to debate things mentally. BBB! Nov 26 02:51:11 mmmk so im going to prep a fresh sd card Nov 26 02:51:40 and we're going to try and figure out what exactly is going on Nov 26 02:54:06 zmatt, just to make sure im doing this right, its literally just grab the debian IoT image from here: https://beagleboard.org/latest-images Nov 26 02:54:22 then unpack with xz, dd the image to the sd card, and im done? **** ENDING LOGGING AT Mon Nov 26 02:59:59 2018