From 74c1c7f42676dd8a65e2ebdb0c6947508fca67e7 Mon Sep 17 00:00:00 2001 From: Lauri Tirkkonen Date: Sat, 24 Nov 2018 12:36:31 +0200 Subject: [PATCH] switch uname -m and -p from i86pc to amd64 --- Sconfig | 2 +- arch/{i386 => amd64} | 0 arch/x86/Sconfig | 2 +- include/Makefile | 2 +- include/sys/Makefile | 2 +- kernel/drivers/Sconfig | 2 +- kernel/drivers/net/Sconfig | 8 ++++---- kernel/drivers/net/sfe/Makefile | 2 +- kernel/drivers/net/wifi/Sconfig | 12 ++++++------ .../fs/doorfs/{door_support_i386.c => door_support_amd64.c} | 0 kernel/fs/zfs/{spa_boot_i386.c => spa_boot_amd64.c} | 0 kernel/mk/defines.mk | 8 +++----- kernel/os/vers.c | 6 +++--- kernel/syscall/systeminfo.c | 2 +- share/man/man4/Makefile | 6 +----- share/man/man7d/Makefile | 6 +----- share/man/man7i/Makefile | 2 +- share/man/man8/Makefile | 2 +- usr/src/uts/Makefile.targ | 6 ++---- usr/src/uts/i86pc/Makefile.i86pc | 5 ----- 20 files changed, 29 insertions(+), 46 deletions(-) rename arch/{i386 => amd64} (100%) rename kernel/fs/doorfs/{door_support_i386.c => door_support_amd64.c} (100%) rename kernel/fs/zfs/{spa_boot_i386.c => spa_boot_amd64.c} (100%) diff --git a/Sconfig b/Sconfig index 6262b660ac..d96a92a85b 100644 --- a/Sconfig +++ b/Sconfig @@ -1,7 +1,7 @@ ((config ; Support for Linux core files LINUX_CORE_SUPPORT - (= MACH 'i386)) + (= MACH 'amd64)) (config ; should SMB expose CUPS printers? diff --git a/arch/i386 b/arch/amd64 similarity index 100% rename from arch/i386 rename to arch/amd64 diff --git a/arch/x86/Sconfig b/arch/x86/Sconfig index 5c068d3cd6..16f3cdf2fd 100644 --- a/arch/x86/Sconfig +++ b/arch/x86/Sconfig @@ -1,6 +1,6 @@ ((const MACH - 'i386) + 'amd64) (const MACH32 diff --git a/include/Makefile b/include/Makefile index 6efdc9ae19..6e23b139a6 100644 --- a/include/Makefile +++ b/include/Makefile @@ -1,5 +1,5 @@ sparc_INCS= -i386_INCS= stack_unwind.h +amd64_INCS= stack_unwind.h ATTRDB_INCS= secdb.h \ auth_attr.h \ diff --git a/include/sys/Makefile b/include/sys/Makefile index 2f0f1c7a38..0a3aeb3a94 100644 --- a/include/sys/Makefile +++ b/include/sys/Makefile @@ -1,4 +1,4 @@ -i386_INCS= \ +amd64_INCS= \ avintr.h \ agpgart.h \ asy.h \ diff --git a/kernel/drivers/Sconfig b/kernel/drivers/Sconfig index 49d54793cb..68c5d9e4a6 100644 --- a/kernel/drivers/Sconfig +++ b/kernel/drivers/Sconfig @@ -16,7 +16,7 @@ (config ; support for virtio devices VIRTIO - (= MACH 'i386)) + (= MACH 'amd64)) (include "net/Sconfig")) diff --git a/kernel/drivers/net/Sconfig b/kernel/drivers/net/Sconfig index a5fc45e0d3..cf0e6a46c1 100644 --- a/kernel/drivers/net/Sconfig +++ b/kernel/drivers/net/Sconfig @@ -26,7 +26,7 @@ (config ; support for i40e network adapters I40E - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for igb network adapters @@ -46,7 +46,7 @@ (config ; support for nge network adapters NGE - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for nxge network adapters @@ -61,13 +61,13 @@ (config ; support for sfxge network adapters SFXGE - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for virtio network devices VIRTIO_NET (and - (= MACH 'i386) + (= MACH 'amd64) (= VIRTIO #t))) (config diff --git a/kernel/drivers/net/sfe/Makefile b/kernel/drivers/net/sfe/Makefile index daf08ade06..4b960b18ef 100644 --- a/kernel/drivers/net/sfe/Makefile +++ b/kernel/drivers/net/sfe/Makefile @@ -4,7 +4,7 @@ MODULE_DEPS= misc/mac \ drv/ip SRCS= sfe.c \ sfe_util.c -DEFS_i386= -Di86pc +DEFS_amd64= -Di86pc DEFS_sparc= -Dsun4u DEFS= -DVERSION='"2.6.1"' \ ${DEFS_${CONFIG_MACH}} \ diff --git a/kernel/drivers/net/wifi/Sconfig b/kernel/drivers/net/wifi/Sconfig index a577eb187b..21423b1a7b 100644 --- a/kernel/drivers/net/wifi/Sconfig +++ b/kernel/drivers/net/wifi/Sconfig @@ -1,31 +1,31 @@ ((config ; support for iwh wireless network adapters IWH - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for iwi wireless network adapters IWI - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for iwk wireless network adapters IWK - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for iwn wireless network adapters IWN - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for iwp wireless network adapters IWP - (= MACH 'i386)) + (= MACH 'amd64)) (config ; support for zyd network devices ZYD - (= MACH 'i386))) + (= MACH 'amd64))) ; vim: set syntax=scheme: diff --git a/kernel/fs/doorfs/door_support_i386.c b/kernel/fs/doorfs/door_support_amd64.c similarity index 100% rename from kernel/fs/doorfs/door_support_i386.c rename to kernel/fs/doorfs/door_support_amd64.c diff --git a/kernel/fs/zfs/spa_boot_i386.c b/kernel/fs/zfs/spa_boot_amd64.c similarity index 100% rename from kernel/fs/zfs/spa_boot_i386.c rename to kernel/fs/zfs/spa_boot_amd64.c diff --git a/kernel/mk/defines.mk b/kernel/mk/defines.mk index 54e7f5459c..639b47e60d 100644 --- a/kernel/mk/defines.mk +++ b/kernel/mk/defines.mk @@ -67,14 +67,12 @@ KERNEL_CFLAGS_64 = \ -D_ELF64 KERNEL_CFLAGS_i386 = \ - -mno-mmx \ - -mno-sse - -KERNEL_CFLAGS_i86 = \ -O \ -march=pentiumpro KERNEL_CFLAGS_amd64 = \ + -mno-mmx \ + -mno-sse \ -O2 \ -Dsun \ -D__SVR4 \ @@ -98,7 +96,7 @@ KERNEL_INCLUDES = \ -I${SRCTOP}/arch/${CONFIG_MACH}/include \ -I${SRCTOP}/include -KERNEL_INCLUDES_i386 = \ +KERNEL_INCLUDES_amd64 = \ -I${SRCTOP}/usr/src/uts/intel KERNEL_INCLUDES_sparc = diff --git a/kernel/os/vers.c b/kernel/os/vers.c index 90f1a83271..4461a43bdd 100644 --- a/kernel/os/vers.c +++ b/kernel/os/vers.c @@ -15,17 +15,17 @@ */ /* - * UTS_VERSION and UTS_PLATFORM must defined by - * the build system. + * UTS_VERSION must defined by the build system. */ #include #include +#include struct utsname utsname = { .sysname = "Unleashed", .nodename = "", .release = "1.1", .version = UTS_VERSION, - .machine = UTS_PLATFORM, + .machine = CONFIG_MACH_STR, }; diff --git a/kernel/syscall/systeminfo.c b/kernel/syscall/systeminfo.c index 91c88bbba4..84e7363f3c 100644 --- a/kernel/syscall/systeminfo.c +++ b/kernel/syscall/systeminfo.c @@ -85,10 +85,10 @@ systeminfo(int command, char *buf, long count) #ifdef _LP64 case SI_ARCHITECTURE_64: case SI_ARCHITECTURE_K: + case SI_ARCHITECTURE: kstr = architecture; break; case SI_ARCHITECTURE_32: - case SI_ARCHITECTURE: kstr = architecture_32; break; case SI_ARCHITECTURE_NATIVE: diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4d4609fb63..8991abe54d 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -2,7 +2,7 @@ MAN_sparc = sbus.4 -MAN_i386 = sysbus.4 +MAN_amd64 = sysbus.4 MAN = Intro.4 \ NISLDAPmapping.4 \ @@ -159,10 +159,6 @@ MAN = Intro.4 \ ypserv.4 \ $(MAN_$(CONFIG_MACH)) - -.if $(CONFIG_MACH) == i386 -.endif - # We want to just install manpages but there is no manpage-only mk file so # we use prog.mk. This is ugly, but so is the entire share/man subtree. # Eventually, it will go away and with it this hack as well. diff --git a/share/man/man7d/Makefile b/share/man/man7d/Makefile index a2094e7651..1c540fe468 100644 --- a/share/man/man7d/Makefile +++ b/share/man/man7d/Makefile @@ -33,7 +33,7 @@ MAN_sparc = audiocs.7d \ zs.7d \ zsh.7d -MAN_i386 = ahci.7d \ +MAN_amd64 = ahci.7d \ amd8111s.7d \ amr.7d \ arcmsr.7d \ @@ -216,10 +216,6 @@ MAN = aac.7d \ zero.7d \ $(MAN_$(CONFIG_MACH)) - -.if $(CONFIG_MACH) == sparc -.endif - # We want to just install manpages but there is no manpage-only mk file so # we use prog.mk. This is ugly, but so is the entire share/man subtree. # Eventually, it will go away and with it this hack as well. diff --git a/share/man/man7i/Makefile b/share/man/man7i/Makefile index 15e223de77..6f5c1569e4 100644 --- a/share/man/man7i/Makefile +++ b/share/man/man7i/Makefile @@ -1,6 +1,6 @@ .include <../../../cfgparam.mk> -MAN_i386 = agpgart_io.7i +MAN_amd64 = agpgart_io.7i MAN = audio.7i \ cdio.7i \ diff --git a/share/man/man8/Makefile b/share/man/man8/Makefile index 2d74079af6..1f7047d710 100644 --- a/share/man/man8/Makefile +++ b/share/man/man8/Makefile @@ -1,6 +1,6 @@ .include <../../../cfgparam.mk> -MAN_i386 = acpidump.8 \ +MAN_amd64 = acpidump.8 \ acpixtract.8 MAN = 6to4relay.8 \ diff --git a/usr/src/uts/Makefile.targ b/usr/src/uts/Makefile.targ index e0b3f9455f..cc8354bc17 100644 --- a/usr/src/uts/Makefile.targ +++ b/usr/src/uts/Makefile.targ @@ -67,16 +67,14 @@ $(MODSTUBS_O): $(MODSTUBS) # Build the source file which contains the kernel's utsname, # with release, version and machine set as follows: # -# version: contents of $(PATCHID) (Spaces replaced by '_') -# machine: contents of $(UNAME_M) +# version: contents of $(VERSION) # # Build environment information is only contained in the comment section. # $(OBJS_DIR)/vers.o: $(OBJECTS) $(COMPILE.c) \ - -DUTS_VERSION=\"`$(ECHO) $(PATCHID) | sed -e 's/ /_/g'`\" \ - -DUTS_PLATFORM=\"$(UNAME_M)\" -o $@ $(SRCTOP)/kernel/os/vers.c + -DUTS_VERSION=\"$(VERSION)\" -o $@ $(SRCTOP)/kernel/os/vers.c $(CTFCONVERT_O) $(POST_PROCESS_O) diff --git a/usr/src/uts/i86pc/Makefile.i86pc b/usr/src/uts/i86pc/Makefile.i86pc index b17ad8a178..6903568363 100644 --- a/usr/src/uts/i86pc/Makefile.i86pc +++ b/usr/src/uts/i86pc/Makefile.i86pc @@ -36,11 +36,6 @@ PLATFORM = i86pc # -# uname -m value -# -UNAME_M = $(PLATFORM) - -# # Everybody needs to know how to build modstubs.o and to locate unix.o # UNIX_DIR = $(UTSBASE)/$(PLATFORM)/unix -- 2.11.4.GIT