From a09e8894fa9681cca043528bed773141d48230a1 Mon Sep 17 00:00:00 2001 From: kn Date: Sun, 18 Jan 2026 07:54:36 +0000 Subject: [PATCH] stub 'time' command; OK miod octeon (like loongson at least) lacks clock code and thus the 'time' command besides MD boot* manuals. Since unsupported commands are treated as file names and explicit kernels overrule any /bsd.{boot,upgrade} fallback in general, this causes sysupgrade to not kick in until boot.conf is fixed: >> OpenBSD/octeon BOOT 1.5 upgrade detected: switching to /bsd.upgrade failed to load kernel sd0a:time: No such file or directory will try /bsd boot> NOTE: random seed is being reused. booting sd0a:/bsd Make 'time' do nothing and return success to ensure it doesn't effect subsequent execution. --- sys/arch/octeon/stand/rdboot/cmd.c | 10 +++++++++- sys/arch/octeon/stand/rdboot/rdboot.c | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sys/arch/octeon/stand/rdboot/cmd.c b/sys/arch/octeon/stand/rdboot/cmd.c index d8743e134d3..0040dab1f0b 100644 --- a/sys/arch/octeon/stand/rdboot/cmd.c +++ b/sys/arch/octeon/stand/rdboot/cmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd.c,v 1.6 2025/08/23 16:48:17 gkoehler Exp $ */ +/* $OpenBSD: cmd.c,v 1.7 2026/01/18 07:54:36 kn Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -48,6 +48,7 @@ static int Xhelp(void); static int Xls(void); static int Xnop(void); static int Xreboot(void); +static int Xtime(void); #ifdef MACHINE_CMD static int Xmachine(void); extern const struct cmd_table MACHINE_CMD[]; @@ -70,6 +71,7 @@ const struct cmd_table cmd_table[] = { #endif {"reboot", CMDT_CMD, Xreboot}, {"set", CMDT_SET, Xset}, + {"time", CMDT_CMD, Xtime}, {NULL, 0}, }; @@ -493,6 +495,12 @@ Xreboot(void) return 0; /* just in case */ } +static int +Xtime(void) +{ + return 0; +} + int upgrade(void) { diff --git a/sys/arch/octeon/stand/rdboot/rdboot.c b/sys/arch/octeon/stand/rdboot/rdboot.c index 3a0c9d20b8a..b51a9d6fafc 100644 --- a/sys/arch/octeon/stand/rdboot/rdboot.c +++ b/sys/arch/octeon/stand/rdboot/rdboot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rdboot.c,v 1.10 2025/08/23 16:48:17 gkoehler Exp $ */ +/* $OpenBSD: rdboot.c,v 1.11 2026/01/18 07:54:36 kn Exp $ */ /* * Copyright (c) 2019-2020 Visa Hankala @@ -51,7 +51,7 @@ void kexec(int); struct cmd_state cmd; int octbootfd = -1; -const char version[] = "1.5"; +const char version[] = "1.6"; int main(void)