From nobody Tue Apr 16 20:12:20 2024 X-Original-To: dev-commits-src-all@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 4VJwF073XPz5HT4q; Tue, 16 Apr 2024 20:12:20 +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 4VJwF04dpQz4sCk; Tue, 16 Apr 2024 20:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298340; 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=+I7SO9lXLdUhAif6M42X+E/4/KvZeJy+0nG4+YrOVRg=; b=DwRZC1Ke5CiHnrioCON9zsBCE0d/Ttx8f7kGywHJpRplcKMvGOMarLJvSvWeaMKtlZZyVH snOAjIXa8IB9XmAbNdWKcz/tNhqJBEdewwe43uTqoZNlc7eT28gN2rBU1EnC5TzbHGdmTc E4ANU9NiAE9vlgIEFHRZMJZcGqekcAuPOvspHfWakfgjdWAxnZJCBtSTQfsMRvnjDa/Gs7 2rnTXnXmB7T37fcw3oGv1sR7XFwNH7P2ll4GBY/AYojJqHmf80D2wruvVu7LO94kWNWX6B qRIS7ByZxWXwickFQyoo40x0TGk05UNNC2vdZvRIs3YpgK9cD9g2IkmCB8wiDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713298340; a=rsa-sha256; cv=none; b=MrQ/uovNZa85bV3t1yI7Lt0SG/HQ0Rz435o9oD3uLyE2ZPRQKwPYCyKY+NSdX31uyTo7W+ GPpw/KcdgHgZ6R5MQk8XHA+0x8uIPv4ZCUu4rBFa9Zbh3VessHNE3CYJ8V3aJTflnKSLoj Bbkpx+MUKZIDitnPi20plqr6Fp9+xx495OCpUbqmIj4JfoZ0vNlHJlhcg/jqsN36vMcpsJ fbqJaXIlOeF07KkfLN7sn46gG1T0yfW1x1o90+0cbGHO1Rtm/ToLPBexN6Wp8xdgZWDqNB Q1DHxdq1+vTtxNGNrBWTjt/gOHML10jj+E/Ynqvfs/rm0cMnV8fjAI9F7GiOqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713298340; 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=+I7SO9lXLdUhAif6M42X+E/4/KvZeJy+0nG4+YrOVRg=; b=LZJns+UD4+SOFvmq6TfQdHNySdEhRLCEv89XaFbC2dA4RxHE3ZZWr5R8DLf59tpCaqq4bn CfU9bCPZs2SzU5V4ZwzCd8Ay82pHpS0o8bvKLDW/Z5pXXHjwIdctr4RrskcR1j7RZ9HbRd R6QyDEZWoEg7j+0RnnmycsyD6n6TQ8vSTntGavvi54j5muU4G78ErtTOr+lN2nSQpaOnCq RFOo934gzQH5LJ8Fv9hmTAiKyxQjlRB80+wYbBAX6h+TYuUrl2UM9j8IHY3pJ3cwmr5idQ 393yLxYL3ccl/Abx8zpMyGaBle0QmiOkUvZssbDwiZtpTe5qECXwCSmnMDT2DQ== 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 4VJwF04FszzxWD; Tue, 16 Apr 2024 20:12:20 +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 43GKCKY0036699; Tue, 16 Apr 2024 20:12:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43GKCKR7036696; Tue, 16 Apr 2024 20:12:20 GMT (envelope-from git) Date: Tue, 16 Apr 2024 20:12:20 GMT Message-Id: <202404162012.43GKCKR7036696@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 93fa71ab2499 - stable/14 - kboot: Move _start out of kboot and into libkboot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 93fa71ab2499dcd8460d472d4b9911de120e2577 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=93fa71ab2499dcd8460d472d4b9911de120e2577 commit 93fa71ab2499dcd8460d472d4b9911de120e2577 Author: Warner Losh AuthorDate: 2024-01-28 18:53:59 +0000 Commit: Warner Losh CommitDate: 2024-04-16 19:54:20 +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 (cherry picked from commit a03411e84728e9b267056fd31c7d1d9d1dc1b01e) --- 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