Page MenuHomeFreeBSD

sbin/init: merge ttys file down to single file
ClosedPublic

Authored by ehem_freebsd_m5p.com on May 13 2021, 10:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 16, 2:28 PM
Unknown Object (File)
Tue, Feb 20, 9:54 PM
Unknown Object (File)
Feb 12 2024, 12:05 AM
Unknown Object (File)
Jan 26 2024, 4:39 PM
Unknown Object (File)
Dec 30 2023, 9:52 AM
Unknown Object (File)
Dec 30 2023, 9:48 AM
Unknown Object (File)
Dec 30 2023, 9:48 AM
Unknown Object (File)
Dec 27 2023, 8:14 AM

Details

Summary

The tty lists were already pretty similar and there hadn't been any real
need for them to remain distinct for some time. As such merge to a
single file.

The Xen and RISC-V consoles are being preserved. For systems using them
they are crucial, for other systems the devices won't exist and their
presence in /etc/ttys is harmless. The XDM line from x86 was the one
chosen.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Follow on for D29873. Clearly the ttys files have been slowly converging, so perhaps it is finally time to go ahead and merge them into a single file.

Some notes: I'll confess I haven't actually confirmed a full build with this yet, so if the Makefile is subtler than expected I may have broken it (and will update later). Second, there is room for argumentation about device order in /etc/ttys.

The greatest impact would be on MIPS since ttys.mips didn't have anywhere near as many devices listed as others. All the others already had ttyv0-ttyv8 listed (though the XDM lines for ttyv8 differed).

This is pretty close to where I was headed when I started doing my diff reductions.
thanks for taking it the rest of the way.

This revision is now accepted and ready to land.May 13 2021, 10:35 PM

The greatest impact would be on MIPS since ttys.mips didn't have anywhere near as many devices listed as others. All the others already had ttyv0-ttyv8 listed (though the XDM lines for ttyv8 differed).

True, but MIPS doesn't have syscons or vt (IIRC), so it will be a nop there. That tty file was effectively forked when the onifexists didn't exist.

Tested in a build and passed. Can be adjusted on commit, but I suspect this really should be titled "etc/ttys: merge ttys file down to single file". Grabbed the repository file location, instead of the output location when initially committing.

This seems ready to go, but perhaps D29873 should become the child revision? I.e. cleanup first, addition second.

This seems ready to go, but perhaps D29873 should become the child revision? I.e. cleanup first, addition second.

That is likely better, but may be better for fixing during commit.

@imp do you care to commit this or shall I?

This revision was automatically updated to reflect the committed changes.

Do we really need to keep rcons?

Hm, never mind, I guess Spike doesn't end up with a ttyu0, only rcons?

Hm, never mind, I guess Spike doesn't end up with a ttyu0, only rcons?

Yeah, I think this is the reason for it, but I'm not certain. I believe the SBI get/putchar methods are now deprecated (disappointing), so this will need to be looked at eventually. Perhaps rcons could be made into a proper uart driver, but this is hardly exciting work.