-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For jessie: Trying to understand adtpro.sh #15
Comments
Also, ttyAMA0 is reserved for Apple II Pi, since that's what the Apple II Pi card uses, so I don't consider it any more; and it requires a boutique cable to pull up the 3.3v on the Pi to 5v.
As for your startup delay, maybe, but I thought I worked around that so it could start up in the background. Maybe I didn't.
|
On Thu, Nov 19, 2015 at 03:57:50AM -0800, IvanExpert wrote:
I'll give it a once over at least. Nothing there looks to be a
Ah interesting! Well then, I think I will re-implement the clean
You can use udev rules, but the idea under systemd is that udev I may actually write udev rules to create a better /dev/serial. /dev/serial 2 directories, 8 files In fact that tree illustrates the problem--ttyUSB3 is going to be Notably the two FTDI serial devices have some kind of serial number I think a device name like /dev/tty-serial/usb-0:1.2:1.0-port0 or
Good to know that Dave got it from you. That means if I can come up
Unfortunately you can't. You need some way to identify the device by Basically Raspbian has become to armv6hf/armv7hf devices what Debian I think the solution to that is some udev rules like the above along
But you might not have an Apple II Pi card. If you didn't get one I'd rather not tie anyone into anything, though I agree ttyAMA0 is
I can bet that I can guess what it is now: You generally start it headless when the device is connected. But. If this is the first time you've run ADTPro, it hasn't got those I have a feeling at some point I'm producing a shell script that
I'll just make it sleep only if stdout is a tty.
I'll see what I can come up with. Joseph |
I found at last one bashism: ${serialPortName:0:5}. I felt bash was ubiquitous enough that there was no reason to expect it. it. You may feel differently.
Ok, I see where you're going with this. I didn't realize Raspbian was used on other boards. I guess if there were some one-time user-friendly way of asking the user what adapter is what, and then remembering what port it's in and instructing the user to mark it or note it as well, that might be plausible.
That sounds right.
It would definitely be a bonus to be able to trigger bootstrap from command line so the user theoretically never has to fuss with GUI.
Good idea! ID |
On Fri, Nov 20, 2015 at 05:38:23AM -0800, IvanExpert wrote:
As long as the script is labeled as using bash, I'm not concerned
Yes, the ODROID-XU4 would make a very nice Raspple II buildbot
Done as of 20815bf. |
I do believe this is pretty well resolved at this point--though see #30 for a problem with how ADTPro starts in that the headless X server seems not to be exiting when ADTPro does. This is very problematic on every Pi, but particularly on lower-spec models. |
Hey Ivan, I think I mostly have the adtpro.sh script figured out, but maybe you can provide some of your thinking in a few places. This script and the udev rules are basically why it doesn't work with systemd, but I think I have a handle on how to do that. Mostly. Anyway, let's have a look at the diff:
That's totally on me. :) I actually didn't check the scripts for bashisms, I just made them all use bash since most of the scripts did. Might wanna revert that for this script if it truly isn't necessary. Anyway…
Setting ADTPRO_HOME is obvious. Changing uname -p to
uname -m
is less obvious, until you note that uname -p returns unknown on many Linux installations, including the Raspberry Pi. I see you changed how headless is processed here—entirely so you could add the usage message? If so, I'll make the usage message work more the way the rest of the script does and submit that change to David for upstream inclusion.The real meat follows:
That's a big bite. There's a fair number of lines we can ignore due to the minus side being a script template. I note you try to force ONE serial port to be used here, and we've already discussed how the UDEV rules you've got now just won't quite do going forward. But I also think upstream does it wrong here by hard-coding ttyUSB0 and ttyAMA0 on the Pi. Probably the best solution all around is either a UDEV rule that does what /dev/serial SHOULD do (enumerate all serial devices, not just the USB ones), or to write some function that can build a list of serial devices. The trick there is that we'd probably prefer /dev/serial/by-path/ entries over /dev/tty* entries for those that have them.
Is there a reason you create the ADTPro properties file here instead of just running it? with serial and the port name to use in the environment?
Let's skip the OS X and Solaris stuff since that's just template related.
There's the rest of the headless and other argument parsing getting moved around. I'd probably change those
[[ ! -f /usr/bin/xvfb-run ]]
's to! command -v xvfb-run >/dev/null
. That's another one for upstream too.What was the reason for the sleep 30 in there? I'm betting that's the reason why my Pi's boot process seems to halt an annoyingly long time vs. vanilla Raspbian. ;)
That bit there with disabling a getty that might be running on the serial port in question probably isn't real systemd compatible. Likely the ttyusbhandler also breaks it. That'll want to be a systemd service file most likely. Fortunately, it's actually pretty easy to write those so that you can configure what port causes stuff to happen and what to have happen, and make the whole thing contingent on there being enough system running to actually have the thing start.
Anyway, if there's anything you can add to all of that, lemme know!
Thanks! :)
The text was updated successfully, but these errors were encountered: