Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst/arch/zaurus Select a proper kernel set...
details: https://anonhg.NetBSD.org/src/rev/3e9a438e437e
branches: trunk
changeset: 773451:3e9a438e437e
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Feb 02 16:00:35 2012 +0000
description:
Select a proper kernel set (GENERIC or C700) per running INSTALL kernel name.
diffstat:
distrib/utils/sysinst/arch/zaurus/md.c | 18 ++++++++++++++++--
distrib/utils/sysinst/arch/zaurus/md.h | 4 +++-
distrib/utils/sysinst/arch/zaurus/msg.md.de | 5 ++++-
distrib/utils/sysinst/arch/zaurus/msg.md.en | 4 +++-
distrib/utils/sysinst/arch/zaurus/msg.md.es | 5 ++++-
distrib/utils/sysinst/arch/zaurus/msg.md.fr | 5 ++++-
distrib/utils/sysinst/arch/zaurus/msg.md.pl | 5 ++++-
7 files changed, 38 insertions(+), 8 deletions(-)
diffs (138 lines):
diff -r 3a635ad6efdd -r 3e9a438e437e distrib/utils/sysinst/arch/zaurus/md.c
--- a/distrib/utils/sysinst/arch/zaurus/md.c Thu Feb 02 15:57:39 2012 +0000
+++ b/distrib/utils/sysinst/arch/zaurus/md.c Thu Feb 02 16:00:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.10 2011/11/07 14:18:52 he Exp $ */
+/* $NetBSD: md.c,v 1.11 2012/02/02 16:00:35 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -35,6 +35,7 @@
/* md.c -- zaurus machine specific routines */
#include <sys/param.h>
+#include <sys/sysctl.h>
#include <stdio.h>
#include <util.h>
@@ -52,7 +53,20 @@
void
md_init_set_status(int flags)
{
- (void)flags;
+ static const int mib[2] = {CTL_KERN, KERN_VERSION};
+ size_t len;
+ char *version;
+
+ /* check INSTALL kernel name to select an appropriate kernel set */
+ /* XXX: hw.cpu_model has a processor name on arm ports */
+ sysctl(mib, 2, NULL, &len, NULL, 0);
+ version = malloc(len);
+ if (version == NULL)
+ return;
+ sysctl(mib, 2, version, &len, NULL, 0);
+ if (strstr(version, "C700") != NULL)
+ set_kernel_set(SET_KERNEL_C700);
+ free(version);
}
int
diff -r 3a635ad6efdd -r 3e9a438e437e distrib/utils/sysinst/arch/zaurus/md.h
--- a/distrib/utils/sysinst/arch/zaurus/md.h Thu Feb 02 15:57:39 2012 +0000
+++ b/distrib/utils/sysinst/arch/zaurus/md.h Thu Feb 02 16:00:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.h,v 1.4 2012/01/26 16:12:14 tsutsui Exp $ */
+/* $NetBSD: md.h,v 1.5 2012/02/02 16:00:35 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -57,8 +57,10 @@
* base etc comp games man misc tests text xbase xcomp xetc xfont xserver
*/
#define SET_KERNEL_GENERIC SET_KERNEL_1
+#define SET_KERNEL_C700 SET_KERNEL_2
#define SET_KERNEL_1_NAME "kern-GENERIC"
+#define SET_KERNEL_2_NAME "kern-C700"
/*
* Machine-specific command to write a new label to a disk.
diff -r 3a635ad6efdd -r 3e9a438e437e distrib/utils/sysinst/arch/zaurus/msg.md.de
--- a/distrib/utils/sysinst/arch/zaurus/msg.md.de Thu Feb 02 15:57:39 2012 +0000
+++ b/distrib/utils/sysinst/arch/zaurus/msg.md.de Thu Feb 02 16:00:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.md.de,v 1.3 2011/04/04 08:30:46 mbalmer Exp $ */
+/* $NetBSD: msg.md.de,v 1.4 2012/02/02 16:00:35 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -53,3 +53,6 @@
message set_kernel_1
{Kernel (GENERIC)}
+
+message set_kernel_2
+{Kernel (C700)}
diff -r 3a635ad6efdd -r 3e9a438e437e distrib/utils/sysinst/arch/zaurus/msg.md.en
--- a/distrib/utils/sysinst/arch/zaurus/msg.md.en Thu Feb 02 15:57:39 2012 +0000
+++ b/distrib/utils/sysinst/arch/zaurus/msg.md.en Thu Feb 02 16:00:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.md.en,v 1.3 2011/04/04 08:30:46 mbalmer Exp $ */
+/* $NetBSD: msg.md.en,v 1.4 2012/02/02 16:00:35 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -54,3 +54,5 @@
message set_kernel_1
{Kernel (GENERIC)}
+message set_kernel_2
+{Kernel (C700)}
diff -r 3a635ad6efdd -r 3e9a438e437e distrib/utils/sysinst/arch/zaurus/msg.md.es
--- a/distrib/utils/sysinst/arch/zaurus/msg.md.es Thu Feb 02 15:57:39 2012 +0000
+++ b/distrib/utils/sysinst/arch/zaurus/msg.md.es Thu Feb 02 16:00:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.md.es,v 1.3 2011/04/04 08:30:46 mbalmer Exp $ */
+/* $NetBSD: msg.md.es,v 1.4 2012/02/02 16:00:35 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -54,3 +54,6 @@
message set_kernel_1
{Núcleo (GENERIC)}
+
+message set_kernel_2
+{Núcleo (C700)}
diff -r 3a635ad6efdd -r 3e9a438e437e distrib/utils/sysinst/arch/zaurus/msg.md.fr
--- a/distrib/utils/sysinst/arch/zaurus/msg.md.fr Thu Feb 02 15:57:39 2012 +0000
+++ b/distrib/utils/sysinst/arch/zaurus/msg.md.fr Thu Feb 02 16:00:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.md.fr,v 1.4 2011/04/04 08:30:46 mbalmer Exp $ */
+/* $NetBSD: msg.md.fr,v 1.5 2012/02/02 16:00:35 tsutsui Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -54,3 +54,6 @@
message set_kernel_1
{Kernel (GENERIC)}
+
+message set_kernel_2
+{Kernel (C700)}
diff -r 3a635ad6efdd -r 3e9a438e437e distrib/utils/sysinst/arch/zaurus/msg.md.pl
--- a/distrib/utils/sysinst/arch/zaurus/msg.md.pl Thu Feb 02 15:57:39 2012 +0000
+++ b/distrib/utils/sysinst/arch/zaurus/msg.md.pl Thu Feb 02 16:00:35 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.md.pl,v 1.4 2011/04/04 08:30:46 mbalmer Exp $ */
+/* $NetBSD: msg.md.pl,v 1.5 2012/02/02 16:00:35 tsutsui Exp $ */
/* Based on english version: */
/* NetBSD: msg.md.en,v 1.1 2002/02/11 13:50:18 skrll Exp */
@@ -54,3 +54,6 @@
message set_kernel_1
{Kernel (GENERIC)}
+
+message set_kernel_2
+{Kernel (C700)}
Home |
Main Index |
Thread Index |
Old Index