Pull up following revision(s) (requested by tsutsui in ticket #962):

sys/arch/cobalt/conf/majors.cobalt: revision 1.34
	etc/MAKEDEV.awk: revision 1.29
	etc/etc.cobalt/MAKEDEV.conf: revision 1.18
	etc/etc.cobalt/MAKEDEV.conf: revision 1.19

panel -> lcdpanel

Part of PR port-cobalt/55009

When reading in the MD MAKEDEV.conf, perform block / char major
substitutions that may be present in that file.
PR port-cobalt/55009

Create a compatibility symlink panel0 -> lcdpanel0
PR port-cobalt/55009

Fix leading 8 spaces to a tab.
This commit is contained in:
martin 2020-06-20 16:19:43 +00:00
parent 63aba3311c
commit f3a1b6b02e
3 changed files with 33 additions and 8 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/awk -
#
# $NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $
# $NetBSD: MAKEDEV.awk,v 1.26.2.2 2020/06/20 16:19:43 martin Exp $
#
# Copyright (c) 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@ -104,10 +104,33 @@ BEGIN {
getline < cfgfile # blank line
MDDEV = 0 # MD device targets
while (getline < cfgfile) {
#
# Perform the same blk / chr subsitution that happens below.
#
md_deventry = $0
if (match(md_deventry, /%[a-z0-9]*_(blk|chr)%/)) {
nam = substr(md_deventry, RSTART + 1, RLENGTH - 6);
typ = substr(md_deventry, RSTART + RLENGTH - 4, 3);
dev = ""
if (typ == "blk") {
if (nam in blk) {
dev = blk[nam];
}
} else {
if (nam in chr) {
dev = chr[nam];
}
}
if (dev != "") {
parsed = substr(md_deventry, 1, RSTART - 1) dev
md_deventry = substr(md_deventry, RSTART + RLENGTH)
}
md_deventry = parsed md_deventry
}
if (MDDEV)
MDDEV = MDDEV "\n" $0
MDDEV = MDDEV "\n" md_deventry
else
MDDEV = $0
MDDEV = md_deventry
}
close(cfgfile)
@ -225,7 +248,7 @@ BEGIN {
print "# Generated from:"
# MAKEDEV.awk (this script) RCS Id
ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $"
ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.2 2020/06/20 16:19:43 martin Exp $"
gsub(/\$/, "", ARCSID)
print "# " ARCSID

View File

@ -1,4 +1,4 @@
# $NetBSD: MAKEDEV.conf,v 1.16 2018/09/23 09:20:58 maxv Exp $
# $NetBSD: MAKEDEV.conf,v 1.16.2.1 2020/06/20 16:19:43 martin Exp $
all_md)
makedev wd0 wd1 sd0 sd1 sd2 sd3
@ -26,7 +26,9 @@ minimal)
;;
lcdpanel)
mkdev lcdpanel0 c %lcdpanel_chr% 0 660
mkdev lcdpanel0 c %lcdpanel_chr% 0 660
# Support the legacy "panel0" name.
lndev lcdpanel0 panel0
;;

View File

@ -1,4 +1,4 @@
# $NetBSD: majors.cobalt,v 1.32 2019/01/28 02:28:57 dholland Exp $
# $NetBSD: majors.cobalt,v 1.32.4.1 2020/06/20 16:19:43 martin Exp $
#
# Device majors for cobalt
#
@ -39,7 +39,7 @@ device-major ld char 27 block 10 ld
device-major clockctl char 33 clockctl
#device-major obsolete char 34 obsolete (systrace)
device-major cgd char 35 block 11 cgd
device-major panel char 36 panel
device-major lcdpanel char 36 lcdpanel
device-major ksyms char 37 ksyms
device-major pci char 38 pci
device-major zstty char 39 zstty