**** BEGIN LOGGING AT Thu Apr 08 02:59:57 2021 Apr 08 05:24:25 Well...hopefully. If i can wire one wire correctly. Blah. Apr 08 05:33:23 I think that might be a worthy cause? :D Apr 08 05:33:28 good night Apr 08 05:38:06 Later! Apr 08 10:21:46 Hello! I would like to copy the contents of the emmc into a microsd, how should I proceed? Apr 08 11:30:49 m Apr 08 14:00:48 GenTooMan: Sleep is over! Apr 08 14:34:12 zmatt: confirmed those boards were actually made by Embest, bought by Seeed and sold to Digikey. They are A1a. Apr 08 14:34:24 ah Apr 08 16:37:00 Hi G-Morning: I created systemd timer, which activates a service. In service, if Type=forking, it activates an application, BUT the timer trigger turns to N/A after one trigger. If Type=oneshot, the application doesn't run ( or runs and exits), then the timer will trigger again. I want the service activates application, and come back to check if Apr 08 16:37:01 the application still running Apr 08 16:37:40 tiger: uhh, not super clear, can you share your unit files via pastebin? Apr 08 16:38:03 "oneshot" and "forking" are intended for very different circumstances Apr 08 16:39:25 "oneshot" means that the systemd will consider the service as "starting" while the program runs, and "started" once it completes (and it then automatically becomes stopped again unless RemainAfterExit is true) Apr 08 16:40:22 "forking" is intended for daemons that fork as part of their initialization (with the daemon being the child process and the parent exiting) Apr 08 16:40:41 (which is common behaviour for traditional unix services) Apr 08 16:41:30 what is your goal here exactly? Apr 08 16:42:38 if you just want to keep your service running, a timer unit is neither necessary nor appropriate, you can just use settings in your .service file to have systemd auto-restart your service if it fails (optionally after waiting a bit) Apr 08 16:43:46 So, oneshot with  RemainAfterExit is true, ( does this mean the APPLICATION remains after the service exit ?) will support what I want, right? Apr 08 16:44:19 also, regarding your earlier question about starting your java app... what did you put in your script? since forking a process into the background is usually not appropriate (though it can be supported) Apr 08 16:44:38 tiger: no, it means systemd will *consider* your service to be "running" after your program has exited Apr 08 16:45:05 type=oneshot does not allow your program to actually remain running for any significant amount of time Apr 08 16:45:30 since the service is considered "starting" during that time, and after some timeout it will go into failed state Apr 08 16:45:41 "oneshot" is meant for quick one-shot actions Apr 08 16:45:50 I starts java app: java -jar "$JETTY_HOME/start.jar" > $MNU_HOME/log/jetty.out 2>&1  & in my service script Apr 08 16:45:58 yeah that's your problem Apr 08 16:46:03 the & Apr 08 16:46:34 or, well, you could do that with Type=forking, but there's no reason to do that in the first place Apr 08 16:46:37 The last & shall be removed? Apr 08 16:46:40 what does your script look like overall? Apr 08 16:47:12 Let me pose the script in pastebin Apr 08 16:48:55 if you just want to redirect the output of your service (instead of using journal) you can configure that in your .service file too Apr 08 16:49:23 https://pastebin.com/YCQ5R7tJ Apr 08 16:50:01 redirecting isn't the issue, though; exiting is Apr 08 16:50:16 okay this script looks entirely superfluous Apr 08 16:50:22 might be considered cleaner to set the desired output location in the usual place, obviously Apr 08 16:50:30 mru: ? Apr 08 16:50:49 everything this script does is duplicating things systemd normally does for you Apr 08 16:51:00 well, that's just silly Apr 08 16:51:40 typical java Apr 08 16:52:18 tiger: what's the purpose of the $mnu_sh thing? the first time this is run you're just exiting? why? Apr 08 16:53:23 tiger: and can you share your current .service file? Apr 08 16:53:50 this is just to skip one trigger. Need to delay some time before start java. I can change timer setting, but timer also used for other things Apr 08 16:56:01 Here is the timer and service: https://pastebin.com/QwVgGr30 Apr 08 16:56:08 why do you need "some delay" ? if your app needs certain things to be available before it is started, add those as dependency instead of just some random delay :P Apr 08 16:57:24 when started, does your service normally continue running or does it just run for a bit and then exit? Apr 08 16:58:31 The timer was create earlier used for other things. I used it for auto-start java for field-testing, which as started manually. Apr 08 17:00:09 When it started, I checked pid, it was not listed for the java process, if Type-oneshot. But if forking, it java runs ok, but timer trigger N/A Apr 08 17:00:53 your script forks your java app into the background and then exits Apr 08 17:01:00 You can ignore delay thing. Apr 08 17:01:34 with Type=forking systemd will detect that, in all other cases when your script exits your service will stop hence all of its processes will be terminated Apr 08 17:01:45 I don't know what you mean by "timer trigger N/A" Apr 08 17:01:53 if your service is already running, there's nothing for the timer to trigger Apr 08 17:02:21 since the timer will try to start your service, which is already running hence nothing to do done Apr 08 17:03:03 also, systemd already logs when your service starts/stops, no need to log it yourself (and writing it to the *kernel* log is pretty weird) Apr 08 17:03:05 this is the timer/services status:  https://pastebin.com/tXP04KXt Apr 08 17:03:26 yes, so everything is running fine Apr 08 17:03:32 but your timer will have nothing to do Apr 08 17:03:47 so, I asked earlier but you didn't answer: 17:57 <@zmatt> when started, does your service normally continue running or does it just run for a bit and then exit? Apr 08 17:03:58 my understanding is that it normally continues running? Apr 08 17:04:30 if so, it doesn't make sense to trigger it with a timer unit Apr 08 17:04:51 Yes. But I would like the timer to keep triggering, ( if it is possible), so I can check if the application started still running, if not, then restart them Apr 08 17:05:00 I can probably help you write a proper systemd service file, but I'm just very confused about what you're even trying to accomplish Apr 08 17:05:35 tiger: why are you doing that with a script? supervising services is the main job of systemd, it does that stuff for you (and will do a better job than a hacky shell script) Apr 08 17:05:55 like I said, it can ensure your service is automatically restarted if it exits Apr 08 17:06:04 if that's what you were trying to do Apr 08 17:07:20 Well, if there is other way to do, (using systemd ? show me a bit more if you can), I am open to any good solutions Apr 08 17:07:45 your script, if there's a need to use one at all (probably not), should do nothing but create the environment needed (e.g. set environment variables, redirect output) and then start your java program with "exec" without &, e.g.: exec java -jar "$JETTY_HOME/start.jar" > $MNU_HOME/log/jetty.out 2>&1 Apr 08 17:08:13 however your program's environment can also be configured in detail in your .service file, so a script is probably not needed at all Apr 08 17:08:52 Ok, I got your point, not to use timer, let the service to periodically activiate itself? Apr 08 17:11:37 okay you keep giving me mixed signals, so can you _please_ answer the question I asked twice already directly: does your java app normally continue running (apart from crashes/failures) or does it just perform some task and then exit? Apr 08 17:11:44 If you can, help me to have an example: What I want is to start java app, or a program, then keep checking if the app/program are still running, if not restart them. Apr 08 17:12:04 i.e. you want your program to keep running? Apr 08 17:12:28 you want systemd to keep your service running, even if it exits or crashes? Apr 08 17:13:03 yes, I want the application keeps running, AND, if it exits by any reason, restart it Apr 08 17:13:59 you can set Restart=always in your [Service] section. if you want a delay before it's restarted, also set something like RestartSec=10 Apr 08 17:14:58 by default systemd does have a limit on how many times it will restart a service in a short amount of time, to avoid infinitely restarting something that just immediately fails at start... you can change that limit or remove it entirely Apr 08 17:15:04 The Java question You asked, I don't have definite answer. What I can say is: if forking type, it runs and keeps running. If oneshot, it may be started, and exited (for some reason) Apr 08 17:15:18 tiger: I'm asking about your program, not about the systemd .service Apr 08 17:16:19 It is the program, exits ( or not started ), if service is oneshot. Apr 08 17:16:21 I understand the behaviour you were seeing with your shell script and .service files with Type=forking or Type=oneshot (both of which are wrong) Apr 08 17:16:37 no I'm asking about the _intended_ behaviour of _your program_ Apr 08 17:16:39 I'm not asking about systemd Apr 08 17:17:10 it sounds to me like the intention is that it just remains running Apr 08 17:17:28 Restart=always in service section, can set some time ( delay or interval ) for restarting Apr 08 17:17:29 and you want it to get restarted if it exits/crashes Apr 08 17:17:36 correct? Apr 08 17:18:15 Yes, correct for the app/application program) Apr 08 17:22:53 putting together an example... Apr 08 17:26:39 Thank you so much Apr 08 17:27:54 https://pastebin.com/UVMZtaWH ... hopefully haven't made any mistakes... I don't think I've ever used environment variables in unit file directives but apparently they should work Apr 08 17:28:59 also, the fact that you're redirecting your output to file and were manually logging when your service starts/stops suggests you're not familiar with journal (the system-wide logging facility provided by systemd), that may be something you want to familiarize yourself with Apr 08 17:29:24 e.g. you can see journal logs related to your service using "journalctl -u HSM" Apr 08 17:31:00 and I think by default rsyslog is also still installed hence system logs will also go into /var/log/, though removing rsyslog is typically one of the first things I do :P Apr 08 17:31:32 writing logs to eMMC is something better avoided unless you really need it (for the sake for eMMC lifetime) Apr 08 17:33:36 for details regarding the many many options you can set, see "man systemd.unit" (for the [Unit] and [Install] sections) and "man systemd.service" and "man systemd.exec" for the [Service] section Apr 08 17:34:15 the logging file, at this point, needs to be in user folder, because the programs are reading the log file. ( I ddidn't write the program). Apr 08 17:34:38 then why doesn't it write to file in the first place instead of writing to stdout? Apr 08 17:34:59 anyway, you as shown in the service file, you can in fact redirect stdout Apr 08 17:36:40 (I hope "HSM" in this context doesn't mean "Hardware Security Module", since this whole thing doesn't particularly inspire a sense of security and trust in me :P ) Apr 08 17:37:10 someone wrote application. I don't like writing to stdout, and redirect to /opt folder Apr 08 17:38:28 I have to worry security afterwards. At this point, to make it work first Apr 08 17:40:33 tiger: note that you can still use a script to launch your java program if that's more comfortable or convenient for you than configuring things like environment variables in the .service file, but that script should then just launch your program (without forking it to the background with &) and nothing more, e.g. https://pastebin.com/MyP1fBHb Apr 08 17:41:19 and use Type=simple Apr 08 17:42:08 OK, let me try it out. Thank for your help and support! Apr 08 17:42:14 actually, Type=exec is probably better (unless your systemd is too old to understand that, but the one on current debian images should be new enough) Apr 08 17:42:30 Type=forking and Type=oneshot and both definitely wrong Apr 08 17:42:33 *are both Apr 08 17:42:44 I will still need the HSM.timer, right? Apr 08 17:43:43 if you really need to start it 60 seconds after boot, then use the timer unit (with OnBootSec only, not OnCalendar) Apr 08 17:44:05 and in HSM.service's [Install] section replace WantedBy=multi-user.target by Also=HSM.timer Apr 08 17:44:59 alternatively, should you continue to use a script to launch the java program, just put "sleep 60" in the script :P Apr 08 17:45:57 note that WantedBy=multi-user.target in HSM.service will cause it to be started at boot (without delay) hence if you have that you should not have a .timer unit Apr 08 17:48:14 WantedBy=multi-user.target,  HSM.timer  separates by ','  or no comma ? Apr 08 17:48:29 ????!? Apr 08 17:49:07 what? did you read what I said at all? Apr 08 17:49:46 In the HSM.service [install] section : WantedBy=multi-user.target,  HSM.timer  ? Apr 08 17:50:02 that is wrong in every way possible Apr 08 17:50:20 and suggests you read nothing of what I just said Apr 08 17:51:14 sorry, replace  WantedBy=multi-user.target with Also=HSM.timer Apr 08 17:51:30 (and no, systemd unit file directives are never comma-separated) Apr 08 17:52:35 So, remove the line : WantedBy=multi-user.target  and add the line : Also=HSM.timer Apr 08 17:52:39 correct? Apr 08 17:53:15 if you want to use a timer unit to start it 60s after boot, yes Apr 08 17:54:09 ok, that's I want Apr 08 17:54:09 the Also=HSM.timer means that if you enable/disable your service (with "sudo systemct enable HSM" / "sudo systemctl disable HSM") then it will implicitly enable/disable your HSM.timer unit Apr 08 17:54:09 that's all it does Apr 08 17:54:44 removing WantedBy=multi-user.target is because you don't want your service to immediately start at boot (which is what you were requesting by having that directive) Apr 08 17:56:04 and whenever you change the [Install] section, do "sudo systemctl reenable HSM" for the changes to actually take effect (since the [Install] section is only consulted when systemctl enable/reenable is used, not at any other time) Apr 08 17:56:12 so many things need to know with Linux :') Apr 08 17:56:35 as opposed to? Apr 08 17:57:25 Well, it is a big system. I am a newbie. Apr 08 17:57:30 I somehow doubt that making a system service is easier on Windows or Mac :P Apr 08 17:58:16 All systems are somewhat  the same. Apr 08 17:58:53 and also very different Apr 08 17:59:25 and how system services are managed is definitely very OS-specific Apr 08 17:59:32 Agreed Apr 09 00:24:18 The BBBlue duneth arrivalled at its finest! If that does not make sense, you read that correctly. Apr 09 00:24:28 New one! Apr 09 00:24:55 Just in the knick of time. Apr 09 00:25:39 For some reason, when they are new, the boards are blazing fast. Apr 09 00:33:31 oh. I know why. Bloat! Apr 09 00:33:39 Too many processes. Apr 09 00:33:59 good evening, I'm new to beaglebone. I'm doing a project on a beaglebone black using Android, where can I find recent versions of Android for it? Apr 09 00:35:05 Be patient. I think someone is here that may know about Android and BBB. There was a Port of Andoid years ago. Apr 09 00:35:10 I remember reading about it. Apr 09 00:35:33 I think it was a GSoC thing. Apr 09 00:35:37 thanks. I´ll wait Apr 09 00:36:26 santos96: one of the first google results is https://www.opersys.com/blog/android-10-on-beaglebone-black/ but it clearly has heavy limitations Apr 09 00:36:37 notably no display/graphics Apr 09 00:37:14 which to me sounds like a bit of an issue for android :P Apr 09 00:38:53 And...I remember a board that handled GPIO on Android Things or whatever they called it back then. Apr 09 00:39:40 But, me personally, I have not gotten it to work just yet on the BBB. Apr 09 00:40:30 santos96: as far as I can tell, the last android version that ran properly on the am335x is jelly bean, which doesn't exactly qualify as "recent" Apr 09 00:42:14 zmatt: Thannks for your repaly. yes, I've seen that, the problem is that display is a must. Apr 09 00:42:59 lol, jelly bean is extra old Apr 09 00:44:38 santos96: Wiketio also had a commercial offering of android Marshmallow: https://web.archive.org/web/20190922064234/https://witekio.com/cpu/am335x/ Apr 09 00:46:03 perhaps they still offer if (or even a more recent version) if you contact them Apr 09 00:47:53 thanks Apr 09 00:48:05 i'll give it a try Apr 09 00:48:36 ah witekio still lists Marshmallow for am335x, you can find it in their catalog: https://witekio.com/software-accelerators/board-support-package/#BSP_catalog Apr 09 00:49:07 "Price: Contact our Support Team" ... never a good sign ;) Apr 09 00:54:41 I was really hopping for something more recent, but i´ll take what I get Apr 09 00:55:03 Thanks for the help zmatt and set_ Apr 09 00:55:59 You are welcome. Apr 09 00:56:04 well, this seems to be one of the few companies with a more recent android than offered by TI, so they can probably tell you if a more recent version of android would be possible (and if so, at what cost) Apr 09 00:56:23 I know what @zmatt is discussing. I have seen the BSPs from Witekio. Apr 09 00:56:59 Big moola! Apr 09 00:57:05 I am guessing, really. Apr 09 00:57:24 It must be extremely difficult to put on the am335x. Apr 09 00:57:44 the big problem no doubt is the gpu driver Apr 09 00:59:30 Oh. Apr 09 01:00:36 Hmm. I thought you all handled that w/ the Imagination Technologies people already. I saw the image avaiable on bbb.io/latest-images. Apr 09 01:00:38 which is already a pain to get to work on a regular linux system, but android has a completely different graphics stack in userspace Apr 09 01:00:46 Oh. Apr 09 01:01:57 yeah so I'm fairly sure that those drivers are not actually usable on android Apr 09 01:02:06 the userspace components that is Apr 09 01:02:17 I was unaware of the android using different graphics. Apr 09 01:02:20 Oh. Okay. Apr 09 01:02:34 android does not really resemble linux Apr 09 01:02:45 even though it uses a linux kernel Apr 09 01:04:05 So, the issue would really be putting the SGX530 into the stack and have a driver for it? Apr 09 01:04:44 "Put this in the stack!" Apr 09 01:04:55 I have no idea what's involved in getting android working on particular hardware, but I don't see what else could be a big obstacle Apr 09 01:05:20 (besides having the know-how of getting android working on particular hardware :P ) Apr 09 01:06:24 I tried w/ a board that is dedicated to Android Things in '19 and got so fed up w/ Android saying, "Return to the previous menu," I sold the expensive board for pennies. Argh! Android! Apr 09 01:06:57 I would really hope someone could figure it out and soon! I saw they have a neat, little GPIO lib. Apr 09 01:07:25 I don't think many people are interested in android on a beaglebone Apr 09 01:08:12 No. You are right. But...in hindsight, maybe b/c of the difficulty of getting it to boot properly, people have become stale to the fact. Apr 09 01:08:13 Maybe? Apr 09 01:11:27 I mean, I stopped b/c I figured I was harassing more than helping. So, I reconvened the idea of booting Android Things many times but never went back to its ideas. Apr 09 01:14:09 santos96: Here >>> https://community.arm.com/developer/tools-software/oss-platforms/b/android-blog/posts/from-zero-to-boot-porting-android-to-your-arm-platform Apr 09 01:14:32 I am in no way condoning what they say b/c I have not tested it. Apr 09 01:14:40 But...it is a start. Apr 09 01:16:20 '13 but there are many ideas in the left-hand column. Apr 09 01:16:42 So, maybe the arm people have revolutionized the Android Kernel since then...? Apr 09 01:17:04 this is a 10 year old article Apr 09 01:17:22 I understand. And the kernel is pre-2.8. Apr 09 01:17:23 Ha. Apr 09 01:17:39 But...the left-hand column in the ideas have other ideas. Apr 09 01:17:43 anyway, "how to port android" is not useful information without working drivers Apr 09 01:18:01 Oh. But...what about the drivers, oh. Apr 09 01:18:01 so this is a waste of time Apr 09 01:18:05 Okay. Apr 09 01:19:27 I mean it is a waste to think something this old could be picked and placed w/ newer entries placed in the older 'slots' and instead of Android Commands for what they have listed, one could update them. Apr 09 01:19:28 No? Apr 09 01:19:51 I will give it the heave-hoe over here. Apr 09 01:21:33 Every time I see how popular Android is for users, I always think, BBB! The older Android ideas can be updated w/ their newer ideas but to know the instruction is to make the entire dev. time easier. Apr 09 01:23:17 I mean, I ported Debian to a Android Box. One would think it could be reversed, right? Apr 09 01:25:11 But. Debian is already prepackaged...it just seems a bit EASIER! No offense. Apr 09 01:25:47 I do not want to crud on people but porting new ideas to the BBB or future boards from you all seems neat to me. Apr 09 01:30:03 debian on a bbb is easy as its all open source... trying to port the gpu code for a dalvik (android) engine is probably way more worth then its worth Apr 09 01:30:15 just my opinion... Apr 09 01:31:03 i thought there were some headless ports tho floating around, just not something i really looked at Apr 09 01:34:04 buzzmarshall: I have to go get this Rover-3.4 working before Sat. for the Faire. Circus Time! Apr 09 01:34:15 bbl Apr 09 01:35:25 np have fun Apr 09 01:36:11 Thank you! **** ENDING LOGGING AT Fri Apr 09 03:00:09 2021