Select a proper kernel set (GENERIC or C700) per running INSTALL kernel name.
This commit is contained in:
parent
18b9ea2097
commit
96d29df0a1
@ -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 @@ md_init(void)
|
||||
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
|
||||
|
@ -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.
|
||||
|
@ -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 zaurusfspart
|
||||
|
||||
message set_kernel_1
|
||||
{Kernel (GENERIC)}
|
||||
|
||||
message set_kernel_2
|
||||
{Kernel (C700)}
|
||||
|
@ -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 zaurusfspart
|
||||
message set_kernel_1
|
||||
{Kernel (GENERIC)}
|
||||
|
||||
message set_kernel_2
|
||||
{Kernel (C700)}
|
||||
|
@ -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 @@ Compensaci
|
||||
|
||||
message set_kernel_1
|
||||
{Núcleo (GENERIC)}
|
||||
|
||||
message set_kernel_2
|
||||
{Núcleo (C700)}
|
||||
|
@ -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 zaurusfspart
|
||||
|
||||
message set_kernel_1
|
||||
{Kernel (GENERIC)}
|
||||
|
||||
message set_kernel_2
|
||||
{Kernel (C700)}
|
||||
|
@ -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 zaurusfspart
|
||||
|
||||
message set_kernel_1
|
||||
{Kernel (GENERIC)}
|
||||
|
||||
message set_kernel_2
|
||||
{Kernel (C700)}
|
||||
|
Loading…
Reference in New Issue
Block a user