**** BEGIN LOGGING AT Fri Jul 14 03:00:04 2017 Jul 14 07:02:48 Hi. I experience some strange behaviour between running an app manually or when the same started as service Jul 14 07:03:37 First of all, as service I get billions of chars on uart and second, the uart times out or I the app doesn't receive all chars Jul 14 07:04:26 the app communicates by uart-modem and running normally its very stable, but as service, the modem doesn't get logged in to the provider or times out on commands Jul 14 07:05:42 I think somehow as service the app gets delayed (by logs?) or gets so much chars on the uart on all UARTS, which malfuncion received data Jul 14 07:27:17 oh I wouldn't be surprised if there are bugs there... I've actually found an uart hw erratum once myself (although related to tx, not rx) Jul 14 07:27:59 there are two different kernel drivers available for the uarts... 8250-omap and omap-serial Jul 14 07:28:19 @zmatt, do you know the difference between manually and service? Maybe I can point out where the bug is or find an handson Jul 14 07:28:49 oh wait I misread Jul 14 07:28:51 Okay. Can I install it on remote? Or do I have to update the whole kernel? Jul 14 07:29:12 the latter Jul 14 07:29:33 so it runs stable when run manually but not as service... that sounds odd Jul 14 07:30:05 is it logging much output? Jul 14 07:30:11 Yes it is. Jul 14 07:30:39 The complete status (every process step) is printed to terminal Jul 14 07:30:42 so running manually may actually also slow it down if that output is going to via ssh Jul 14 07:31:03 Yes but it is the opposite.. Jul 14 07:31:16 service is slow and manually its much faster Jul 14 07:31:31 Cold startup manually takes 20 seconds to get 3G gprs connection Jul 14 07:31:39 as serivce it takes more than 1 minute! ;) Jul 14 07:31:42 where are you logging to ? Jul 14 07:32:43 I mean, by default the service output will not only go to journal (which gets written to file by default) but there's also an rsyslog daemon installed by default which ends up sending it even more places Jul 14 07:32:56 And always takes 2-3 timeouts (and retries) but stopping the service and start it manually the same time (so if there is some connectivity problems, it should be still there) but then it's gprs is up in couple of seconds Jul 14 07:33:14 uhhhh Jul 14 07:33:22 Yes... you helped me out with lot of logging couple of days ago Jul 14 07:33:47 If i unistall rsyslog service, none of the uart is logged is it? Jul 14 07:34:08 Now I can read back uart data to validate processteps Jul 14 07:34:15 But is it still available then? Jul 14 07:34:27 I disabled "logging to syslog" in journald.conf by the way Jul 14 07:35:29 to be fair it sounds like you're kinda abusing service log output Jul 14 07:36:43 Okay then. What should be the best way? Jul 14 07:36:55 The projects are still in test (prototyping) Jul 14 07:37:16 it is designed to allow an administrator to see what's going on with the system, kernel and services combined. if you're spamming so much output that everything is filled up with your app's output then you should maybe rethink things Jul 14 07:37:18 When it goes to a final version, debugging is only available with an enable command Jul 14 07:37:50 Its only the cout from the app. No special logging or so Jul 14 07:38:14 Only when the modems connects or checks connectivity settings, some couts are printed to uart Jul 14 07:38:34 09:30 < zmatt> is it logging much output? Jul 14 07:38:34 09:30 < JohnPIA> Yes it is. Jul 14 07:38:37 Normally only when a process step finished or started, so maybe 10 rows an hour Jul 14 07:38:47 that is not "much output" Jul 14 07:38:50 Yes.. when connecting Jul 14 07:39:02 then its 1000 chars in couple of seconds Jul 14 07:39:27 But again... why does it work great when ./App and not when as .service? Jul 14 07:39:54 Does linux logging more things for services then for manual? Jul 14 07:39:54 1000 chars in couple of seconds still doesn't sound like much output Jul 14 07:41:05 Okay... The only I saw was syslog and deamon.log grows to 500mb in 1-2 days Jul 14 07:41:06 is journal still logging to eMMC ? (does /var/log/journal exist?) Jul 14 07:41:28 I going to check that right now Jul 14 07:41:31 okay that is rather substantial Jul 14 07:41:44 also sounds like an excellent way to wear out the eMMC Jul 14 07:42:32 Yes I think hehe. But it was by default like that. I came out after it at the moment cloud ide couldn't enable sockets because no available memory :/ Jul 14 07:42:48 But official... journald keeps 10-15% freespace... however it was 1kB ;) Jul 14 07:43:03 because journald wasn't the one filling up the space Jul 14 07:43:25 no.. deamon.log (.1 .2 .3 - .7) and same to syslog Jul 14 07:43:54 Somehow I think thats related to the hwtimer Jul 14 07:44:00 exactly. but note that even though journald limits the size of the log, that obviously doesn't limit the amount of data written to eMMC, it just discards older data Jul 14 07:44:06 hwtimer? what? Jul 14 07:44:17 I't hasnt ntp .. so every startup the interal date/time is 3 may Jul 14 07:44:24 so? Jul 14 07:44:42 Maybe the loggingservice doesn't clean up correctly because it see same timestemps? Jul 14 07:45:09 that doesn't matter Jul 14 07:45:10 Thats what I thought.. it's pretty logical seeing the way logs get that big Jul 14 07:45:11 okayy Jul 14 07:45:31 I have no idea what the cleanup rules are of the old logfiles, removing rsyslog was one of the first things I did Jul 14 07:46:45 I actually also removed persistent journal, i.e. logging is just done to ram. that still allows runtime inspection of what's going on, but avoids data being written to eMMC all the time Jul 14 07:48:38 You mean "volatily" in journald.conf? Jul 14 07:48:53 you can just remove /var/log/journal and reboot Jul 14 07:49:10 journald will notice it's missing and keep journal in memory Jul 14 07:49:23 if you recreate the directory then on next boot it will log to eMMC again Jul 14 07:49:29 okey... I have to reboot my lt to get the remote vpn connected... so I be right back with detailled information :) Jul 14 07:49:40 I think there's also a setting indeed Jul 14 07:49:46 thanks Jul 14 07:49:47 to force it to do one or the other Jul 14 07:50:17 yeah, Storage=volatile/persistent/auto ... auto results in the behaviour I just said Jul 14 07:50:20 After editting journald.conf I directly saw less loginfo saved to emmc Jul 14 07:50:35 Okay.. I changed that to volatile couple of days ago Jul 14 07:50:42 ah ok Jul 14 07:50:54 Because all bb gets offline after one week... because emmc totally filled with logs Jul 14 07:51:09 journal shouldn't do that Jul 14 07:51:15 it has a size limit Jul 14 07:51:21 resulting in crashing the app which couldnt start anymore cause less of rom Jul 14 07:51:38 Yes I know.. but syslog and deamon.log where the causes Jul 14 07:51:44 reason Jul 14 07:51:47 right but that's unrelated to the Storage setting Jul 14 07:52:27 okay.. but storage setting has an option of "logging to syslog" which by default is = yes.. but now set to no Jul 14 07:52:36 that's a different setting Jul 14 07:52:42 that's ForwardToSyslog Jul 14 07:52:49 not Storage Jul 14 07:53:31 you could also just remove the syslog daemon entirely (apt-get purge rsyslog) ... it's completely redundant with journald Jul 14 07:54:14 you can also limit the amount of ram used for in-memory journal with RuntimeMaxUse Jul 14 07:54:42 (and SystemMaxUse for persistent journal, when enabled) Jul 14 08:01:45 I just checked, our application seems to produce a burst of data during startup that's several KB in less than 0.8 seconds Jul 14 08:02:17 as I said if "1000 chars in couple of seconds" is true then that's actually not that much data Jul 14 08:02:34 oh right you're not here Jul 14 08:08:37 Hello, I have a problem on my BBB wireless. It freezes randomly, I already reflashed it several times, sometimes it freezes during the update of the kernel, sometimes during the paste of files from a USB key, it is usually during a working session, but I have no clue on internet to understand where the problem could come from. Do you have any guess on it ? When it freezes USR1 to 3 are off, the USR0 randomly freeze on ON or OFF. Her Jul 14 08:09:14 https://pastebin.com/L4iWUpK6 Jul 14 08:10:59 that kernel log looks like normal startup to me Jul 14 08:11:37 Yes, it seems logic, it is before freezing Jul 14 08:11:41 it takes the standard image 46 seconds to boot? lol, damn... Jul 14 08:12:57 sounds like maybe a kernel panic. do you have a serial debug cable? ( http://elinux.org/Beagleboard:BeagleBone_Black_Serial ) Jul 14 08:13:07 Is it too long ? Jul 14 08:13:18 No I don't Jul 14 08:14:01 But i can make one i guess Jul 14 08:15:58 I haven't used the standard images in a long long time. I generally try to avoid having too much crap on the system, and a while ago also put a bit of effort into boot time optimization of our systems Jul 14 08:16:10 https://liktaanjeneus.nl/boot.svg Jul 14 08:18:10 of course then my collegues come along and add a service written in nodejs that takes 10 seconds to start up... lol Jul 14 08:18:30 with like 200 npm packages Jul 14 08:19:01 lol Jul 14 08:19:04 ( http://devhumor.com/content/uploads/images/July2017/npm_package.png ) Jul 14 08:20:04 This time the updating of the kernell is successfull, maybe it will be ok lol Jul 14 08:20:22 which kernel are you using? Jul 14 08:21:06 How do i know ? Jul 14 08:22:06 presumably if you just installed an update it will include that info in its output Jul 14 08:22:20 you were running 4.4.68-ti-r108 in the kernel log you pasted Jul 14 08:23:14 When rebooting it freezes with the 4 leds on... Jul 14 08:23:32 that's not good Jul 14 08:23:39 which kernel did you install? :P Jul 14 08:25:40 I've just type the command opt/scripts/tools/update_kernel.sh, i reboot it and it freezes, I did not look at the version Jul 14 08:25:49 odd Jul 14 08:26:13 I don't suppose you still have its output ? Jul 14 08:26:19 nop Jul 14 08:26:22 Hi zmatt... What folder should be removed? /var/log/journal? Jul 14 08:27:11 JohnPIA: yes, but if you already configured Storage=volatile then removing the directory won't make a difference anymore Jul 14 08:28:17 zmatt : it was ./update_kernel.sh --lts-4_4 --bone-rt-channel Jul 14 08:28:23 JohnPIA: also, I forgot you mentioned you'd be offline for a bit and kept talking, here's the log -> https://pastebin.com/raw/q2M72mmR Jul 14 08:28:37 Bobby_: why 4.4-bone-rt series? Jul 14 08:29:30 zmatt : Trying to solve my problem I ve just applied internet advices Jul 14 08:29:32 I'm sorry.. causes by the vpn app which connect to all bb-platforms Jul 14 08:29:52 But few days ago I already did al points you mentioned. Thanks Jul 14 08:30:03 I have no journal folder over there Jul 14 08:30:13 syslog / deamon still are small files Jul 14 08:30:59 But when journalctl -u service I get a hugh bunch of data.. this is still ram? Jul 14 08:31:18 Bobby_: I'd suggest a 4.9-bone kernel, or 4.9-ti if you need specific functionality of that kernel. 4.4 kernel only if there's something not yet forward-ported to 4.9 (iirc there was one thing that's keeping it from being the default on new images, but I forgot what) Jul 14 08:31:35 JohnPIA: that's the volatile journal yes Jul 14 08:31:54 Bobby_: -rt kernel only if you really need it and understand what you're doing Jul 14 08:32:19 Ok thx, so I don't type -rt lol Jul 14 08:33:02 I use a 4.9-bone derived kernel for our beagles Jul 14 08:33:59 I just reflash it and i try 4.9 updating Jul 14 08:35:03 I need to kick myself out the door Jul 14 09:21:46 zmatt do you know if it is possible to copy data from a service the terminal? Jul 14 09:22:00 because in journald.conf something like Jul 14 09:22:08 "copy to tty" or something Jul 14 09:22:25 I tried ttyo0 but doesn't see anything on terminal Jul 14 09:22:34 Like a realtime log on terminal of journald infor Jul 14 09:28:49 journalctl -f Jul 14 13:20:17 Is there a project for BBB dev? Meaning the source code... Jul 14 13:21:21 the source code of what? the beagleboard.org images? Jul 14 15:23:31 tbr i mean is their a project i can pull for the board Jul 14 15:24:26 for the hardware itself? Jul 14 15:25:00 https://github.com/beagleboard/beaglebone-black Jul 14 15:25:01 zmatt code boot and app Jul 14 15:25:10 ? Jul 14 15:31:39 nate_: that depends entirely on the particular bit of software you want to look at. Each project has its own "home". Jul 14 15:37:55 what is a home? Jul 14 15:38:43 in this case a place online, a server and or specific part of it, on which a project lives Jul 14 15:39:11 e.g. the Linux kernel lives at kernel.org Jul 14 15:39:42 U-Boot at https://www.denx.de/wiki/U-Boot Jul 14 15:39:50 etc., etc., pp Jul 14 15:43:49 So there is no BBB project? Jul 14 15:43:58 Its all piecemeal? Jul 14 15:46:39 that's how open source works. You improve the originial, so called 'upstream' project, instead of doing your own thing. Jul 14 15:47:18 of course you could decide to run Windows, in which case you'd only need to talk to the integrator and microsoft themselves... Jul 14 15:53:44 tbr ok so how do i get started? its all too vague Jul 14 15:54:00 every tutorial i find has a different path, and is usually out of date Jul 14 15:54:39 well, that depends on what you want to do Jul 14 15:55:45 i want to learn embedded linux Jul 14 15:57:43 ok, no need to put the cart before the horse/donkey then. Jul 14 15:58:13 I'd suggest to start with the default debian image Jul 14 15:58:25 there are some good books on the topic too Jul 14 15:58:43 one just had its second edition released Jul 14 15:59:34 latest images can found here: beagleboard.org/latest-images Jul 14 16:01:22 dude its insanely confusing trying to get started Jul 14 16:01:29 everyone has their own way Jul 14 16:04:04 The on board info doesn't match also: Jul 14 16:04:05 One option to browse your board is to use this node-webkit based application (currently limited to Windows machines): beaglebone-getting-started.zip. Jul 14 16:04:27 beaglebone-getting-started.zip doesn't exist on the device Jul 14 16:07:29 sounds like you might need to upgrade the image on the device (see link above) Jul 14 16:08:05 how do i do that? Jul 14 16:08:20 can i do that on windows? or do I need to use Ubuntu? Jul 14 16:09:08 assuming beaglebone-black: http://beagleboard.org/getting-started#update Jul 14 16:09:16 Which one of these? http://beagleboard.org/latest-images Jul 14 16:10:24 either of the first two, if it's a beaglebone-black Jul 14 16:10:47 the first one if you want graphics output via HDMI Jul 14 16:11:45 OK Jul 14 16:13:07 it's almost like computers are complicated :P Jul 14 16:26:47 vagrantc haha Jul 14 16:26:54 you are so funny Jul 14 16:26:58 :) Jul 14 17:57:38 Hello, I am an Electrical Engineer, and would like to get involved with Embedded Hardware Design. I am currently reverse engineering and redesigning the Beagle Bone Black product, and was wondering if there was a better way to learn? Jul 14 18:00:12 I'd personally start with a microcontroller. less demanding Jul 14 18:02:28 AJS_: What is your goal in reverse engineering the BBB? Jul 14 18:02:58 tbr: +1 Jul 14 18:03:20 More specifically what are you trying to learn? PCB layout, compilation of a kernle, etc... Jul 14 18:04:23 My goal is to learn embedded systems hardware design. Initially schematics but later layout design, and thanks tbr, a micro-controller seems to be a Jul 14 18:04:42 better place to start Jul 14 18:04:54 Yep. Jul 14 18:05:21 much cheaper to have a board done and you can even populate it manually (after a bit of SMD practice) Jul 14 18:05:54 I have a ton of SMD practice :( Jul 14 18:06:29 Why :(? SMD is fun! Jul 14 18:06:36 then maybe don't start with a boring STM32F1xx or F0xx but a F4 ;) Jul 14 18:07:41 I'm addicted to coffee and I couldn't have a drop when reworking and modifying boards, but yeah is is fun Jul 14 18:08:05 You just have to temper the coffee with a couple of beers! Jul 14 18:08:21 Ha! :)) Jul 14 18:11:33 hmm, I think I'll page KotH for some advice on building up embedded system design experience. Jul 14 18:11:41 he tends to have good ideas Jul 14 18:12:07 needs more atomic clocks! Jul 14 18:12:11 what was the question again? Jul 14 18:12:49 AJS_: if you want to do a design which can run real Linux and you don't mind BGA packages, the Atmel SAM9G SoCs aren't a bad place to start Jul 14 18:12:52 The question was about advice on learning schematic design Jul 14 18:13:10 How much do you know? Jul 14 18:13:15 SAM9G isn't horrible complicated but has decently recent interfaces Jul 14 18:13:24 Cause it is just basically complicated legos Jul 14 18:13:28 and there's plenty of existing open designs to learn from Jul 14 18:13:32 accidental client closure? Jul 14 18:18:00 pshh, microcontrollers are for pansies, just go straight for the am57xx Jul 14 18:18:03 ;) Jul 14 18:23:15 am57xx is a bitch Jul 14 18:26:46 at least it has a generous 0.8 mm pitch Jul 14 18:27:04 omap5432 has the same number of balls but with 0.5 mm pitch :) Jul 14 18:28:30 zmatt: "generous" Jul 14 18:28:49 heh Jul 14 18:33:09 omap5430 had 30% more balls and 0.4 mm pitch Jul 14 18:33:25 nuts Jul 14 18:33:31 nuts, balls, oh my! Jul 14 18:33:40 badum, tss! Jul 14 18:33:43 :P Jul 14 18:34:21 I first thought that crazy ballcount included the top balls, but no it didn't Jul 14 18:34:45 (980, for omap5430 CBU) Jul 14 18:35:27 how the hell can it have that much more terminals... Jul 14 21:03:24 X15 listing on uk.rs-online says "Discontinued product" Jul 14 21:03:37 didnt do that last week but was instead back ordered Jul 14 21:05:05 mouser has 400pcs ordered Jul 14 22:43:43 hi can i connect to my BBB using a VM of ubuntu running on windows 10? Jul 14 22:57:09 my BBB from sparkfun has a password for logging in via SSH Jul 14 22:57:23 does anyone know where I can find the passwprd? Jul 14 23:02:48 my BBB from sparkfun has a password for logging in via SSH, does anyone know where to find the password? Jul 14 23:17:08 nate_: Jul 14 23:17:08 When using 'ssh' with the provided image, the username is 'debian' and the password is 'temppwd'. Jul 14 23:17:16 nate_: http://beagleboard.org/getting-started Jul 14 23:17:34 the first link from googling "beaglebone black default password" Jul 14 23:32:38 alan_o doesn't work Jul 14 23:33:35 alan_o how do I login ssh via root? Jul 14 23:33:42 I cannot change the ssh_config file Jul 14 23:33:50 because I do not have root access Jul 14 23:34:12 which doesn't work? Jul 14 23:34:18 root Jul 14 23:34:22 debian temppwd doesn't work? Jul 14 23:34:25 ssh login via root Jul 14 23:34:29 probably can't Jul 14 23:34:32 sudo? Jul 14 23:34:36 debian + temppwd Jul 14 23:34:40 root + ??? Jul 14 23:34:48 root + Jul 14 23:34:54 hahahahahaha Jul 14 23:34:57 wow Jul 14 23:34:59 login as debian and use sudo Jul 14 23:35:01 why do i even try Jul 14 23:35:17 are you familiar with sudo? Jul 14 23:35:17 sudo requires the root password, i don't know it Jul 14 23:35:22 no it doesn't Jul 14 23:35:24 yes i use sudo Jul 14 23:35:29 yes it does Jul 14 23:35:31 it requires your password, not the root password Jul 14 23:35:42 tried that Jul 14 23:35:45 doesn;t work Jul 14 23:35:48 what did it say? Jul 14 23:36:34 it did work Jul 14 23:36:37 my mistake Jul 14 23:36:46 i thought sudo needed root password Jul 14 23:36:58 tried empty password based on old instructions Jul 14 23:37:06 there are many instructions Jul 14 23:37:14 with varying degrees of being old and/or wrong Jul 14 23:37:35 i thought sudo needed root password Jul 14 23:37:46 su needs root password Jul 14 23:38:07 holy mackerel there is soo much wrong documentation out there Jul 14 23:38:26 impossible to wade through and stay sane Jul 14 23:38:43 these open source projects need to get under control Jul 14 23:38:46 BBB has been around a while and the software situation has changed Jul 14 23:38:48 too much chaos Jul 14 23:38:57 feel free to get it under control then. Jul 14 23:39:07 fight with all the people who have bad info on their websites Jul 14 23:39:11 see the problem? Jul 14 23:39:19 i'm a newbie to BBB and elinux, its been a mess already Jul 14 23:39:31 there's bad info on BBB website!!!! Jul 14 23:40:00 jkridner is on this channel most of the time. If the BBB website is wrong, he will fix it. Jul 14 23:40:26 so let him know if you see him Jul 14 23:40:55 so maybe it isn;t wrong but the info always leaves off info Jul 14 23:41:01 hard for newbies Jul 14 23:41:04 like this: Jul 14 23:41:12 http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#i_take_full_responsibility_for_knowing_my_beagle_is_now_insecure Jul 14 23:41:24 i have no idea what to do with that info Jul 14 23:41:33 trying to figure out what the hell it means Jul 14 23:42:06 do i execute those via ssh login as debian user? Jul 14 23:44:09 fist off, that's elinux.org, not the beagleboard website Jul 14 23:44:13 elinux.org is a wiki Jul 14 23:44:19 so if it's bad, feel free to edit Jul 14 23:44:29 oh yea, i'm tired and cranky, sorry' Jul 14 23:44:35 Those things are for passwordless logins Jul 14 23:44:39 my mistake Jul 14 23:44:40 no worries Jul 14 23:44:56 i lumped the 2 together in my mind Jul 14 23:45:05 ssh'ing to a machine as root is generally considered a bad security practice, which is why it's typically disabled by default... Jul 14 23:45:10 that's part of the problem with these projects, too many cooks Jul 14 23:45:24 and also the only way they've been successful Jul 14 23:45:39 i just need to reflash my board, by changing a file on the sd card that is part of the image Jul 14 23:46:06 hi vagrantc, I keep coming across your card on my desk Jul 14 23:46:27 many people free to experiment and do whatever they want means there's a lack of consistancy, but also you're not limited by what someone else decided you should be able to do Jul 14 23:47:36 * vagrantc wanders off into the philosphical ether Jul 14 23:47:38 * vagrantc waves Jul 14 23:47:56 vagrantc i see, and that's great, but there seems to be no way to filter it all out Jul 14 23:49:28 BBB needs to have a walkthrough on beagleboard.org that is differentiated by version, current image, new image, host OS Jul 14 23:49:53 would be nice Jul 14 23:50:45 I've always argued for better documentation Jul 14 23:50:52 I've even made some of it Jul 14 23:51:19 alan_o so the elinux site has different instructions for reflashin Jul 14 23:51:33 http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Flashing_eMMC Jul 14 23:52:24 http://beagleboard.org/getting-started#update refers to the elinux site for reflash Jul 14 23:52:51 would be better if it were all covered in http://beagleboard.org/getting-started Jul 14 23:53:17 I'm actually not a fan of the on-board eMMC for a dev board Jul 14 23:53:23 but that's just me Jul 14 23:53:48 it's a lot easier to explain: "make this SD card and boot with it" rather than, "well it's complicated... you have to make a card to flash the emmc" Jul 14 23:54:03 but it is what it is. Jul 14 23:55:00 well thanks to your help i was able to change the file, to reflash Jul 14 23:55:13 trying a reflash now Jul 14 23:56:18 ah, great! Jul 14 23:56:22 alan_o in the file it says: #make sure, these tools are installed: dosfstools rsync Jul 14 23:56:35 this doesn;t match the elinux site Jul 14 23:56:39 what do i do? Jul 14 23:57:05 install them Jul 14 23:57:07 it can't hurt Jul 14 23:57:16 I mean you'll need them for something Jul 14 23:57:20 man Jul 14 23:57:23 what a mess Jul 14 23:57:34 every day I regret going into engineering Jul 14 23:57:35 sudo apt-get install dosfstools rsync. What's hard about that? Jul 14 23:57:41 bullet to the head Jul 14 23:58:17 ok, I'm being summoned, bbl Jul 14 23:59:52 in the uEnv.txt file it says: #make sure, these tools are installed: dosfstools rsync Jul 15 00:00:10 how do i verify they are installed? Jul 15 00:00:57 apt list dosfstools rsync Jul 15 00:01:09 why does it need dosfstools anyway? Jul 15 00:02:28 wait what are you trying to do? Jul 15 00:03:02 if you want to reflash eMMC you just download a flasher image, write it to sd card, and boot the bbb from it Jul 15 00:04:06 zmatt no doesn;t work anymore Jul 15 00:04:24 http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Flashing_eMMC Jul 15 00:04:47 read the text in bold on the first line of that section Jul 15 00:05:09 yea and i don't have one of those Jul 15 00:05:18 i'm following instructions on this site Jul 15 00:05:26 https://beagleboard.org/latest-images Jul 15 00:05:27 oh right rcn renamed them at one point and didn't update that line in the wiki, argh Jul 15 00:05:30 says go there Jul 15 00:05:34 the flasher images are still there Jul 15 00:05:42 if you say so man Jul 15 00:05:46 search "flasher" on the wiki page Jul 15 00:06:05 how about update the page? Jul 15 00:06:10 can i update it? Jul 15 00:06:12 please? Jul 15 00:06:14 no, neither can I Jul 15 00:06:27 the amount of bad info is overwhelming Jul 15 00:06:33 yes, it is annoying Jul 15 00:06:43 99% of my time is spent finding correct info Jul 15 00:06:50 1% actuallty doing something Jul 15 00:06:57 I don't understand the strange name of the flasher images currently either Jul 15 00:07:02 the miracle of open source LOL Jul 15 00:07:10 but at least they're clearly labeled "Flasher" in the table of contents Jul 15 00:07:36 yeah there have been too many changes in too little time Jul 15 00:07:53 there aren't any flasher images here: https://beagleboard.org/latest-images Jul 15 00:07:56 wiki Jul 15 00:08:58 zmatt the uboot updates the debian imae right? Jul 15 00:09:09 uboot is not updated, is that correct? Jul 15 00:09:25 a flasher updates everything, including u-boot Jul 15 00:09:35 which is also exactly what you want Jul 15 00:09:46 that's scary Jul 15 00:09:50 why? Jul 15 00:09:59 uboot update interrupted == brick Jul 15 00:10:03 nope Jul 15 00:10:16 why not? Jul 15 00:10:18 ROM bootloader can boot sd cards directly Jul 15 00:10:32 really? wow, that's cool Jul 15 00:10:34 it can load u-boot from sd card just as easily as it can load it from eMMC Jul 15 00:10:47 which isn't too strange, since sd cards and eMMC are very similar Jul 15 00:11:04 so ROM boot loads uboot, does ROM boot lad debian as well? Jul 15 00:11:14 or does uboot take over the reflash process? Jul 15 00:11:30 reflashing is done by a shell script Jul 15 00:11:38 huh? Jul 15 00:11:47 you boot a linux system from sd card which then proceeds to flash eMMC Jul 15 00:11:49 what is exe the shell script? Jul 15 00:12:15 zmatt i don't follow Jul 15 00:12:33 where is the code that updates the emmc? Jul 15 00:12:38 on the sd card? Jul 15 00:12:56 yes, it's literally a shell script Jul 15 00:13:00 /opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh Jul 15 00:13:37 so the reflash is just a script on the sd card, but a script reqs an os Jul 15 00:13:46 script != instructions Jul 15 00:13:57 which is the linux system which is also located on the sd card Jul 15 00:14:14 (which is the same linux system that is then copied to eMMC) Jul 15 00:14:43 oh ok, so there is a debian executable image on the sd card, that image is executed and it copies itself to the emmc Jul 15 00:14:47 is that correct? Jul 15 00:16:09 yes Jul 15 00:16:39 sorry, I was browsing the scripts a bit to see how exactly they work (I don't use them so I never really looked at them) Jul 15 00:17:06 nate_: essentially correct but I'd call it a dangerous simplification, as the image isn't exactly execute. bootstrapped would be a more correct term Jul 15 00:17:29 what does bootstrapped mean? copied to RAM and executed? Jul 15 00:17:39 not trying to be pendantic.. but fuzzy terminology leads to fuzzy thinking and I've see it cause a lot of problem Jul 15 00:17:56 freemor i agree Jul 15 00:18:26 executed would tend to imply a single binary.. the boot process is much more complex then that Jul 15 00:18:27 i can;t seem to find a pedantic translation of what the reflash process is Jul 15 00:18:50 freemor of course, there is uboot and debian iamge Jul 15 00:18:59 image*** Jul 15 00:19:05 both to be updated right? Jul 15 00:19:46 not sure what the ROM does, but that is the starting point Jul 15 00:19:46 yes.. the flasher basically doesa full fopy of the SD to the eMMC Jul 15 00:19:51 boot process: ROM bootloader loads "SPL" into internal ram and executes it. SPL, which is basically a stripped-down u-boot, performs board initialization including setting up the ddr3 memory, loads the full u-boot into ddr3 memory and executes it. u-boot then proceeds to locate and load the root filesystem, loads /boot/uEnv.txt, loads the kernel, device tree, and initramfs (if applicable), and then Jul 15 00:19:57 executes the kernel Jul 15 00:20:38 copy not fopy Jul 15 00:20:57 zmatt so that is the process when no sd reflash image is present right? Jul 15 00:21:09 or when it is Jul 15 00:21:44 both cases are the same up to that point... they only differ in whether stuff is loaded from eMMC or from uSD Jul 15 00:21:57 they begin to diverge after that Jul 15 00:22:07 am I remembering correctly that many images now have a line in the uEnv.txt that you uncomment to run the flasher script at boot? Jul 15 00:22:28 freemor: yeah, or you download a flasher image which is already setup like that Jul 15 00:23:15 zmatt loading from sd or emmc is diverging Jul 15 00:23:24 * freemor loves the unbrickable-ness of the BB line Jul 15 00:23:57 ROM pulls from SD xor eMMC or either? Jul 15 00:24:12 nate_: so, the kernel, once it's ready to begin executing userspace code, will create the first process (pid 1) into which it loads /bin/init unless some different program is specified with the "init=" kernel parameter Jul 15 00:24:18 zmatt what is SPL? Jul 15 00:25:14 zmatt "so, the kernel, once it's ready to begin executing userspace code, will create the first process (pid 1) into which it loads /bin/init unless some different program is specified with the "init=" kernel parameter" that is way later and higher level then I am curious about at this time Jul 15 00:25:22 ok Jul 15 00:25:25 "SPL, which is basically a stripped-down u-boot" Jul 15 00:26:07 u-boot's fat ass doesn't fit in the am335x's internal SRAM, which is why the intermediate stage is needed Jul 15 00:26:07 zmatt where is SPL? Jul 15 00:26:28 eMMC or SD (or various other options) Jul 15 00:26:48 zmatt you said ROM loads SPL, but from where? Jul 15 00:26:52 eMMC or SD (or various other options) Jul 15 00:27:12 how does it decide sd or emmc? Jul 15 00:27:49 it has a boot order of devices to try. the boot order itself is configured by pulling certain pins low or high during power-on Jul 15 00:28:05 ok, boot order, got it Jul 15 00:28:17 how is a device deemed bootable? Jul 15 00:28:20 SPL is storred on first few blocks of the sstorrage not as a file on the filesystem IIRC Jul 15 00:28:39 i.e. if i have an sd card of images of cars, it isn;t bootable Jul 15 00:28:55 man, soo much to learn Jul 15 00:29:00 holy shmoly Jul 15 00:29:17 nate_: varies per device. a summary can be found in the readme of this project I made -> https://github.com/mvduin/bbb-asm-demo Jul 15 00:29:32 it's a tiny tiny program that can be directly loaded and executed by ROM Jul 15 00:29:41 freemor is SPL machine code? Jul 15 00:29:59 yeah Jul 15 00:30:07 with a small header Jul 15 00:30:21 oh ok, and does that mean bootable devices all contain an SPL? Jul 15 00:31:02 they contain something that ROM can load and execute Jul 15 00:31:15 if you're using u-boot as bootloader, that something will be an SPL Jul 15 00:31:40 wait, what? uboot is an spl? Jul 15 00:32:09 holy moly Jul 15 00:32:26 good googlymoogly Jul 15 00:32:38 SPL belongs with u-boot... it's a separate executable built from the u-boot source tree. when you compile u-boot you get both SPL and the full u-boot image at the same time Jul 15 00:32:47 SPL is needed simply because u-boot is too big Jul 15 00:33:51 how is uboot ever used if it doesn't fit into RAM Jul 15 00:34:03 is uboot exe from emmc? Jul 15 00:34:07 u-boot doesn't fit in internal SRAM, so the external (DDR3) ram is needed. ROM can't init external memory since it has no way of knowing the right parameters. Jul 15 00:34:26 ROM boot is always internal Jul 15 00:34:50 ROM is internal to the AM335x yes Jul 15 00:34:51 nate_: This is where the term bootstrapped/ing historically comes from.. the system is pulling istself up by it's own bootstraps :) Jul 15 00:35:00 that's the whole point of ROM boot, it is part of chip, not erasable I think Jul 15 00:35:02 along with 128 KB of internal SRAM Jul 15 00:35:25 step 1: ROM starts executing, tight? Jul 15 00:35:27 correct this ROM is really ROM, hardwired in the chip Jul 15 00:35:28 right? Jul 15 00:35:56 well, step 1 is the power-on sequence and reset procedure :P Jul 15 00:36:07 always the same ROM, it has to have code to connect to another memory, right? Jul 15 00:36:29 zmatt true Jul 15 00:36:43 (both of which are also quite non-trivial) Jul 15 00:37:04 execution always begins in ROM, at address 0 Jul 15 00:37:15 some chips it is not 0 Jul 15 00:37:19 on this one it is Jul 15 00:37:21 is this one 0? Jul 15 00:37:30 ok cool, that is the good way Jul 15 00:37:33 easy to member Jul 15 00:37:41 not that it's important to remember :P Jul 15 00:38:09 so PC is at 0, is there stack yet? Jul 15 00:38:27 i worked on one system at that used no stack for ROM boot Jul 15 00:38:38 there's no stack until you set up a stack point Jul 15 00:38:38 er Jul 15 00:38:44 because RAM was externa Jul 15 00:38:46 l Jul 15 00:38:53 it has immediately-accessible ram Jul 15 00:39:05 so setting up a stack is just a matter of initializing the stack pointer register Jul 15 00:39:15 oh ok, so is there not a location in vector table for initial stack pointer? Jul 15 00:39:35 nope Jul 15 00:39:39 is it internal RAM? Jul 15 00:39:48 nust not be internal Jul 15 00:40:12 there's 64 KB of SRAM embedded in the subsystem that houses the cortex-a8 Jul 15 00:40:35 if it is internal it would ne in vector and loaded along with first instucvtion to PC Jul 15 00:40:50 you're not making sense Jul 15 00:41:07 i'll have to look at the scheme-attics Jul 15 00:41:18 ehm Jul 15 00:41:39 sounds like it may not be available after reset Jul 15 00:41:46 ehm Jul 15 00:41:46 anywho Jul 15 00:41:48 what? Jul 15 00:41:51 ehm? Jul 15 00:42:01 you're making really no sense Jul 15 00:42:15 ok, sorry Jul 15 00:42:19 we're talking right now about the very early startup of the cortex-a8 core inside the AM335x Jul 15 00:42:28 right Jul 15 00:42:40 and suddenly you were talking about schematics Jul 15 00:43:05 i don;t know if there is RAM in the A8 Jul 15 00:43:14 in the AM335 Jul 15 00:43:24 02:40 < zmatt> there's 64 KB of SRAM embedded in the subsystem that houses the cortex-a8 Jul 15 00:43:54 dude what does that even mean Jul 15 00:44:14 ELI5 Jul 15 00:44:15 there's another 64 KB of SRAM connected to the on-chip interconnect, which is accessible once ROM enables it Jul 15 00:45:17 you're asking about really really really low-level stuff that most bbb users will never know or even think to think about, you happen to ask someone who actually *knows* this stuff, and you want me to ELI5 ? :P Jul 15 00:45:58 yes, sorry, i have only used one other system this complex, just trying to understand it Jul 15 00:46:18 I appreciate your help! zmatt and freemor! Jul 15 00:46:39 so the am335x has 64kb internal RAM Jul 15 00:46:49 so ROM could use it Jul 15 00:46:50 02:44 < zmatt> there's another 64 KB of SRAM connected to the on-chip interconnect, which is accessible once ROM enables it Jul 15 00:47:31 the two blocks are contiguous, so it can be treated as 128 KB of SRAM Jul 15 00:48:01 zmatt and freemor just know i do appreciate your insight, i have issues understanding systems unless i can get a feel for how they start up, i'm nosy Jul 15 00:48:09 btw if you really want to know this sort of detail you should definitely also get the Technical Reference Manual Jul 15 00:48:12 http://www.ti.com/lit/ug/spruh73p/spruh73p.pdf Jul 15 00:49:05 unfortunately it doesn't seem to have a good block diagram of the whole SoC Jul 15 00:49:06 * freemor can appreciate nate_ wanting to understand the boot process.. I grew up working very close to the metal Jul 15 00:49:48 (some other TI SoCs have pretty nice block diagrams... https://liktaanjeneus.nl/omap4430-block.png ) Jul 15 00:50:37 omap 4 Jul 15 00:50:38 noooo Jul 15 00:51:22 kremlin: lol, what? :D Jul 15 00:51:29 I found Malloy's "Exploring BeagleBone" to be a really good starting point for getting to know BB based system (I have 2 BBGW's) Jul 15 00:51:48 ive heard bad things about omap4k series Jul 15 00:52:24 one generally calls the series just "omap4", not omap4k :P Jul 15 00:52:52 I don't have any experience with the omap4 actually. I am involved with a project based on the omap5 though Jul 15 00:59:59 nate_: I can kinda understand, but you should of course also realize that it is not easy to get a full grasp of the startup of a big SoC like this Jul 15 01:00:51 nate_: the fact that the manual has a 248-page chapter about power, reset, and clock management should give a bit of indication about that ;) Jul 15 01:03:11 lol.. yes not as simple as the first Ti chipset I had :) (TMS9900) Jul 15 01:05:06 also, not all of the details are public knowledge. if you try to halt the processor at the very first instruction (by holding the processor in Wait In Reset mode and then attaching a JTAG debugger), you'll find its PC is at 0x20000 rather than 0x0 :-) Jul 15 01:05:23 0x20000 is the start of Public ROM Jul 15 01:05:36 the part below that is Secure ROM Jul 15 01:06:46 zmatt, freemor firefox has tried to stop me from chatting yet again Jul 15 01:07:15 the firefox open source project strikes again Jul 15 01:07:19 nate_: you should set youself up a proper IRC client Jul 15 01:07:28 zmatt? freemor? Jul 15 01:07:31 https://hastebin.com/raw/nejatudotu Jul 15 01:08:21 thanks zmatt for the copy Jul 15 01:08:50 woah don;t talk to the kremlin peeps Jul 15 01:09:09 what Jul 15 01:09:33 * freemor suspects nate_ was just riff'n on your nick Jul 15 01:09:40 insert soviet russia joke Jul 15 01:09:42 political joke sorry Jul 15 01:09:50 zmatt right haha Jul 15 01:10:00 i shouldn't have Jul 15 01:10:25 freemor what is a proper irc client? Jul 15 01:10:33 i know nothing about everything Jul 15 01:10:51 unlimitless pool of knowledge Jul 15 01:10:54 depends on your OS but weechat/xchat/irssi Jul 15 01:11:29 mirc if you're using a microsoft product Jul 15 01:11:34 kremlin just joking around sory Jul 15 01:12:18 yea is use da windows 10 not with vm of ubuntu, but i've used windurs so long i can't stop now, addicted Jul 15 01:12:18 nate_: btw page 187 of the TRM does have fairly decent block diagram of the cortex-a8 subsystem Jul 15 01:13:00 then mIRC is your go-to client Jul 15 01:13:11 zmatt is this the trm you are referrring to? http://www.ti.com/lit/ds/sprs717j/sprs717j.pdf Jul 15 01:13:23 that's the datasheet Jul 15 01:13:48 which is more for stuff like timings diagrams and electrical characteristics Jul 15 01:13:58 the trm is http://www.ti.com/lit/ug/spruh73p/spruh73p.pdf .. I gave you the link earlier Jul 15 01:14:38 ok mIRC, says run as portable, anyone know what that means? Jul 15 01:15:01 zmatt ok cool Jul 15 01:15:07 downloading trm Jul 15 01:17:42 ok so, last thing i remember was SPL is a smaller ubott Jul 15 01:17:45 uboot Jul 15 01:18:22 the ROM boot could use 64kB internal ram but it doesn't? Jul 15 01:18:27 * freemor hasn't used mIRC since the early 90's Jul 15 01:18:41 oh, is there a built in for Ubuntu? Jul 15 01:19:05 xchat probably your best bet there Jul 15 01:19:08 i have an ubuntu vm running, could use that Jul 15 01:19:13 unless you like the console Jul 15 01:19:41 nate_: uh what? of course ROM uses the 128 KB internal ram... it's the only ram it has Jul 15 01:20:38 zmatt i mean for stack Jul 15 01:20:56 for all things for which it needs memory Jul 15 01:20:59 does ROM use stack, the system I worked on before ROM used no stack Jul 15 01:21:01 there's nothing special about stack Jul 15 01:21:28 stack is just a piece of ram, the stack pointer is just a register Jul 15 01:21:36 zamtt it depands, if you want to startoff with auto variable in c you need stack pointer set Jul 15 01:21:57 yes, so obviously they do set up a stack pointer Jul 15 01:22:08 oh ok Jul 15 01:22:34 see also section 26.1.4.2 of the TRM, page 5021 Jul 15 01:22:38 fo ROM sets stack, renesas chips i used had stack set by vector table entry Jul 15 01:22:54 so ROM sets stack, renesas chips i used had stack set by vector table entry Jul 15 01:23:26 cortex-M microcontrollers initialize the SP in a similar way Jul 15 01:23:55 i used cortexM mostly, cortex R sonce Jul 15 01:23:59 once*** Jul 15 01:24:17 but that's also because the stack has special significance to the architecture.. it automatically pushes stuff onto it when an irq or exception is taken Jul 15 01:24:48 this is not the case on cortex-A Jul 15 01:25:28 so joined from xchat Jul 15 01:25:33 nate__ Jul 15 01:25:56 on older versions of the ARM architecture the stack pointer was really just a normal register like any other Jul 15 01:26:02 * freemor wave goodnight as it is bedtime for this techie Jul 15 01:26:07 it has become *slightly* more special over time Jul 15 01:26:27 ok good noght to freemor Jul 15 01:26:34 thanks for the insight Jul 15 01:26:53 zmatt it is still a register right? Jul 15 01:26:58 what the Jul 15 01:27:04 has to be a register Jul 15 01:27:07 yes Jul 15 01:27:09 Thanks.. I think you'll find xchat much nicer to use Jul 15 01:27:29 but originally it was *just* a register, no different from any other Jul 15 01:27:35 R13 was stack pointer merely by convention Jul 15 01:28:21 it had no special properties in the hardware Jul 15 01:43:28 zmatt your were referring to exception entry exit Jul 15 01:43:49 not sure if that matters w.r.t. setting it in the vector table Jul 15 01:44:19 I can't think of any other reason Jul 15 01:44:27 it being the stack base pointer Jul 15 01:45:07 oh right, if you want to support writing even your reset vector code in C Jul 15 01:46:22 well, that's definitely not the case on cortex-A or older ARM processors :) Jul 15 01:48:58 zmatt so when an exception occurs it doesn't retreive the value in vector table Jul 15 01:49:46 if it did it would overright used and valid stack values Jul 15 01:51:45 my recommendation is to just skip over the entire topic of exception handling on ARM until you really can't avoid it (because you're working on an OS or a baremetal application or something) Jul 15 01:51:49 :) Jul 15 01:52:28 zmatt yea i've researched it on cortexm, deep dive for a project, maybe it is not the saame Jul 15 01:52:34 not remotely Jul 15 01:52:42 not in any way or shape Jul 15 01:53:52 must be simular Jul 15 01:54:29 the stack is not involved at all in exception entry/exit Jul 15 01:54:41 on which arch? Jul 15 01:54:42 or, I should say, none of the stacks are Jul 15 01:54:43 ARM Jul 15 01:54:47 not-cortex-M Jul 15 01:54:58 on cortexm it is used Jul 15 01:55:01 I know that Jul 15 01:55:04 oh ok Jul 15 01:55:13 so i need to research r and a Jul 15 01:55:15 that's why I said cortex-M is not remotely similar Jul 15 01:55:27 good to know, thanks for correcting Jul 15 01:55:32 ok cool Jul 15 01:55:35 assumptions Jul 15 01:55:37 i make them Jul 15 01:56:38 although you can recreate cortex-M-like exception handling thanks to two instructions they added... I think in ARMv6K Jul 15 01:56:54 which is what I do in my baremetal code -> https://liktaanjeneus.nl/start.S.html Jul 15 01:56:54 seems like a bad idea Jul 15 01:57:03 there's a vulnerablility there maybe Jul 15 01:57:15 you can change the return to point Jul 15 01:57:19 i've done it Jul 15 01:57:44 you can return to any address you like if you mod the stack in an exception/interrupt Jul 15 01:57:54 yes, and? Jul 15 01:58:11 just saying Jul 15 01:58:18 you can also do that if you mod the stack in any function call Jul 15 01:58:26 or just jump somewhere if you like it Jul 15 01:58:56 true, very true Jul 15 01:59:22 maye not an issue Jul 15 02:00:31 well it is an issue if you put a buffer on stack and write data there from a hostile source without checking that it fits... then you've found the classic "buffer overflow" vulnerability :P Jul 15 02:00:40 nothing to do with exception handling though Jul 15 02:01:55 what about changing the magic link value? 0xF...9 Jul 15 02:02:18 It has some magic on cortexm Jul 15 02:02:51 that's really very specific to cortex-M Jul 15 02:03:31 (the am335x also has a cortex-M3 btw, it's used for managing some low-power / suspend states) Jul 15 02:03:33 yea Jul 15 02:04:21 true but some jack%$# has done IoT DDOS using IoT ARM devices, not sure if they used cortexm Jul 15 02:04:52 they used all sorts of devices, nothing ARM-specific Jul 15 02:05:36 and that generally has to do with IoT standing for Idiots on TCP Jul 15 02:06:06 haha very true Jul 15 02:06:08 e.g. devices with a telnet port open that accepts root login with blank password or something equally silly Jul 15 02:06:18 hey now Jul 15 02:06:23 i see what you did there Jul 15 02:06:59 (read http://census2012.sourceforge.net/paper.html if you haven't already :-) Jul 15 02:07:23 it is BBB and simular's fault lol Jul 15 02:07:34 they started down this path Jul 15 02:07:52 BB not just BBB, pi and other's Jul 15 02:08:05 everyone and their grandma can make IoT now! Jul 15 02:08:36 everyone and their grandma don't produce sufficient quantity of devices to be a big threat, it's mostly cheap chinese stuff that's the problem Jul 15 02:09:27 true Jul 15 02:11:49 wat is this start file link you sent? Jul 15 02:12:36 not important, you can ignore it Jul 15 02:12:56 (meaning, I'm not really in the mood to explain more) Jul 15 02:13:13 ok np Jul 15 02:43:28 so i just tried to reflash my BBB, it has been several hours, the LEDs are in a back and forth pattern Jul 15 02:44:09 I am not sure what is going on: http://beagleboard.org/getting-started#update "When the flashing is complete, all 4 USRx LEDs will be steady on or off." Jul 15 02:44:27 supposed to be 45 minutes or so Jul 15 02:49:05 Just finished, was about 5 hours Jul 15 02:49:15 says 45 minutes in Jul 15 02:50:33 holy f*&^ing shit it just keeps rebooting and reinstalling Jul 15 02:50:36 WTF people Jul 15 02:52:22 holy fucking shit Jul 15 02:52:37 after a reflash DO NOT auto reboot **** ENDING LOGGING AT Sat Jul 15 03:00:04 2017