From nobody Sun Jan 28 20:05:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMq60mnpz59CTS; Sun, 28 Jan 2024 20:05:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNMq574WJz3wsf; Sun, 28 Jan 2024 20:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rT5Kwy0BbcWPx/8y68bM2Nrx1nPf5itgY2jCLlTmzn4=; b=R+P3Mm4SCxuUo1A0SSxbQrU9YDRuY6mrHdwoQraDdi7VF9iot86wt2N/FsTNnPjROGBEOD Y3dwte/rlKZehp8yDmE+OxpTxx0GUqfHpD0RVSkDEzx3NZWscpjUtU5d4+pmlcHitriqzs CCWQmFTTgnua5HOsUl/ED6sIp8JRusRfFZs+ZKdXH0odKQYGuoe1wJMNpkPeflfh4/8tsF RDEJ2uQd8xilwnlQG/+hc5e4s5mlt8Zavdhx39ci7K0Gi3G+OlAvun5BMEd3VGf01fWu3o SaVpaKVo3yrd5ZE3fvrU0XfyqWmZ2DNmbzA2v5uAjo7GXLaGHBZT5gnRGshabw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rT5Kwy0BbcWPx/8y68bM2Nrx1nPf5itgY2jCLlTmzn4=; b=Xy0jND57nXvjOLVSihlH15lQSjht8sGmg40K4DtcPvMGVMkPsZSN0BEX7hWXT+TH5L2wrY VU32INBgiJ/emb5tLbpJz1LfOcyNjA8Ue2bdPw3uuMLfRDrqbuuobmvuz/+pEMuk6SMdaw LzBClEToaNT0LULmvW2MA/xaf4meD0zo8JJw0SKgE0KJi0xvFXgcXgWzogjVEHpPtqFpsr HZjmAM4S4dcypsXJ/ILZuEBgO0sM4g6+ce37SSBTfBs2bI8De2z6V2FUg14T5lOJcW2Iyu mHyyWb5NEDXyM7mQ6rkXQE6C4lph+fzift4fkdIMEzLERBR4ABqqDrqHalG1Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472306; a=rsa-sha256; cv=none; b=oxZK0iBdaCnzm2Wjt4XVKa5jWWGFx9OnsxhnpQQxsehFORx9YdiV4hHBEWCzcvFn/gWjkW 1iPj//ZkMMss+X0wWzARXK9/LpBgeExNr9ZmHYbbvvxyZAgChhOMqlEd493j0YUHuxjOpl IlJBly43GXXJY9v2NcRhAxyZc5UYhLIpSOhZZ2LE8CV1fF3h7jsbX+uS6YiZeQpEyYeUxJ IKpJWrT+yObRoblop7GfvvJzfp9P2u+mkYfgayG9YZP/s5AlQuYDH0TVxAit6zdQigYBk+ Q5GFopvNbnHLsflT+WhNeM6JX3nb53bDeZMvt+p26FVsWI8z73i96nnJRSuwdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMq569thzLcv; Sun, 28 Jan 2024 20:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40SK55s7032510; Sun, 28 Jan 2024 20:05:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK55oB032507; Sun, 28 Jan 2024 20:05:05 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:05 GMT Message-Id: <202401282005.40SK55oB032507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a03411e84728 - main - kboot: Move _start out of kboot and into libkboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a03411e84728e9b267056fd31c7d1d9d1dc1b01e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a03411e84728e9b267056fd31c7d1d9d1dc1b01e commit a03411e84728e9b267056fd31c7d1d9d1dc1b01e Author: Warner Losh AuthorDate: 2024-01-28 18:53:59 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 kboot: Move _start out of kboot and into libkboot Move the startup code from kboot/kboot to kboot/libkboot and add the necessary infrastructure for it to build. move start_arch.h, a private header for libkboot, over as well. Sponsored by: Netflix --- stand/kboot/Makefile | 2 +- stand/kboot/Makefile.inc | 6 ++++++ stand/kboot/kboot/Makefile | 5 ++--- stand/kboot/libkboot/Makefile | 10 ++++++++++ stand/kboot/{kboot => libkboot}/arch/aarch64/start_arch.h | 0 stand/kboot/{kboot => libkboot}/arch/amd64/start_arch.h | 0 stand/kboot/{kboot => libkboot}/arch/powerpc64/start_arch.h | 0 stand/kboot/{kboot => libkboot}/crt1.c | 0 8 files changed, 19 insertions(+), 4 deletions(-) diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile index 2e0b9d7a2e09..72dbabc00568 100644 --- a/stand/kboot/Makefile +++ b/stand/kboot/Makefile @@ -2,6 +2,6 @@ NO_OBJ=t .include -SUBDIR+= kboot +SUBDIR+= libkboot .WAIT kboot .include diff --git a/stand/kboot/Makefile.inc b/stand/kboot/Makefile.inc index 01b5f23410c8..02aecdad55f1 100644 --- a/stand/kboot/Makefile.inc +++ b/stand/kboot/Makefile.inc @@ -1 +1,7 @@ +# Bring in the mini-libc that we wrote + +KBOOTSRC=${BOOTSRC}/kboot +CFLAGS+=-I${KBOOTSRC}/include +LIBKBOOT=${BOOTOBJ}/kboot/libkboot/libkboot.a + .include "../Makefile.inc" diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index b9d68cddf97d..4054bb1da9f2 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -21,7 +21,6 @@ INSTALLFLAGS= -b SRCS= \ bootinfo.c \ conf.c \ - crt1.c \ gfx_fb_stub.c \ host_syscalls.c \ hostcons.c \ @@ -63,7 +62,7 @@ CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} CFLAGS+= -Wall -DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} +LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} .include diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile new file mode 100644 index 000000000000..415571617d2a --- /dev/null +++ b/stand/kboot/libkboot/Makefile @@ -0,0 +1,10 @@ +.include + +LIB= kboot +WARNS?= 4 + +CFLAGS+=-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} + +SRCS= crt1.c + +.include diff --git a/stand/kboot/kboot/arch/aarch64/start_arch.h b/stand/kboot/libkboot/arch/aarch64/start_arch.h similarity index 100% rename from stand/kboot/kboot/arch/aarch64/start_arch.h rename to stand/kboot/libkboot/arch/aarch64/start_arch.h diff --git a/stand/kboot/kboot/arch/amd64/start_arch.h b/stand/kboot/libkboot/arch/amd64/start_arch.h similarity index 100% rename from stand/kboot/kboot/arch/amd64/start_arch.h rename to stand/kboot/libkboot/arch/amd64/start_arch.h diff --git a/stand/kboot/kboot/arch/powerpc64/start_arch.h b/stand/kboot/libkboot/arch/powerpc64/start_arch.h similarity index 100% rename from stand/kboot/kboot/arch/powerpc64/start_arch.h rename to stand/kboot/libkboot/arch/powerpc64/start_arch.h diff --git a/stand/kboot/kboot/crt1.c b/stand/kboot/libkboot/crt1.c similarity index 100% rename from stand/kboot/kboot/crt1.c rename to stand/kboot/libkboot/crt1.c