From nobody Fri Dec 19 21:00:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1748621577092772.4762104964477; Fri, 30 May 2025 09:12:57 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 75B234026D; Fri, 30 May 2025 16:12:54 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a4-smtp.messagingengine.com [103.168.172.147]) by coreboot.org (Postfix) with ESMTP id 19BCE40268 for ; Fri, 30 May 2025 16:12:20 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 326221380318; Fri, 30 May 2025 12:12:19 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-01.internal (MEProxy); Fri, 30 May 2025 12:12:19 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 30 May 2025 12:12:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1748621539; x=1748707939; bh=xcTRsb1k3yGBmbLtm4/CVXvOdjxbSiXPunCZx60Ewts=; b= 3KS6HNW2B1w1/4+qQ8l9BKxOgSvp76YVSLkvclS1V9PS+x1A0rjHnShFktamhOlC O8yVmlTpRXK06S17YUzfl5kIgN1ARgHM0Dbk2YO681DtFw13gDJKeJ0SaC7ICLIk eLZ44eb0V27JQ6KwEoBt68yhQwsQwYw9iycoyTxpnDS+RWzHufMi48+YHetJ/c1A qUDztqPInlBbGcGogZOCAUugK2zOWpiIZdLg+UWqe4Pw27T3BNQOMConoyow+2s0 zrHgvfZMbd9gRzasyIaWS/2X0gX81EQreAeieY+l/ZqS2t06nJpPza4WkE6VtlrL irrBTcvNmK7WkICDxQbC8A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748621539; x= 1748707939; bh=xcTRsb1k3yGBmbLtm4/CVXvOdjxbSiXPunCZx60Ewts=; b=j KY1hOcCSEhJNrBFQ49JXJSH1t3i9xbl5n21JEKnIBtZjUPiEVsMFKPLXEbFHS9vB 7uOIYoqH3zd4LnGGyxtSauoNbMkqNBhwFYMXAWok5xGkf2TMWmBN+dLZjDG3WqTt lC1z0VxaamigUV3I2ANiLxd76C2iTeGrzWqeA5jKnbVhqNQf0cEFzYVlkNIvovD8 1kgp7PBZ33oMMXk/+b2lTmlBWZRTL2m/RKOiEe3TgSh/f3bLE/DBjzZtvxVm0QIv pE+agn2rUJfa0x9fPF+LYSFHJgQdYvpbTMptAym8yfxis/SNncRX524XqN7yiZ1h 7T1Ab5gdBZ1Qmn87Ebfeg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleegieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhm peflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtg homheqnecuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtddu udeghfeuveegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgvrggsih hoshesshgvrggsihhoshdrohhrghdprhgtphhtthhopehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Fri, 30 May 2025 17:12:16 +0100 MIME-Version: 1.0 Message-Id: <20250530-build-v1-1-93fe220fd713@flygoat.com> References: <20250530-build-v1-0-93fe220fd713@flygoat.com> In-Reply-To: <20250530-build-v1-0-93fe220fd713@flygoat.com> To: seabios@seabios.org X-Developer-Signature: v=1; a=openpgp-sha256; l=16864; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=Eorcheo9bZWWNyHyjfkAOKVMrzEQP27Ogl2rKL7Nj14=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhgzLGw+fvFSa+Paq9c/DOZc6+C+ZzZ72S+c96w6tyVIad 3+uO/3yS0cpC4MYF4OsmCJLiIBS34bGiwuuP8j6AzOHlQlkCAMXpwBMxCif4X9Wodaefj1nCZfF 35Ref+PpPcSTWLzh6b0LGjvdV1v05cQxMrSXyP8U9JrBqat/QOqVgYmW/BnpQ5Pm5Bhb3q8vrNg 6kQ0A X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Message-ID-Hash: BYWXMLC7SKATJU6YISN53YYB7BT2SYV3 X-Message-ID-Hash: BYWXMLC7SKATJU6YISN53YYB7BT2SYV3 X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH RESEND 1/7] Remove remaining ACPI tooling bits List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZM-MESSAGEID: 1748621578674116600 Content-Type: text/plain; charset="utf-8" Builtin ACPI support was removed before. Now clean remaining tooling bits. Fixes: a2725e2814f0 ("drop acpi tables and hex includes") Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- Makefile | 3 +- scripts/acpi_extract.py | 366 ---------------------------------= ---- scripts/acpi_extract_preprocess.py | 41 ----- 3 files changed, 1 insertion(+), 409 deletions(-) diff --git a/Makefile b/Makefile index 4ccc2bee8129b1f1d49f61559533fdbdf6e1ddd8..01f42ec334591be5c6ed58c6bbe= 478de01f4b26d 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,6 @@ OBJDUMP=3D$(CROSS_PREFIX)objdump STRIP=3D$(CROSS_PREFIX)strip PYTHON=3Dpython CPP=3Dcpp -IASL:=3Diasl LD32BIT_FLAG:=3D-melf_i386 =20 # Source files @@ -111,7 +110,7 @@ all: $(target-y) ################ Common build rules =20 # Verify the build environment works. -TESTGCC:=3D$(shell OUT=3D"$(OUT)" CC=3D"$(CC)" LD=3D"$(LD)" IASL=3D"$(IASL= )" scripts/test-build.sh) +TESTGCC:=3D$(shell OUT=3D"$(OUT)" CC=3D"$(CC)" LD=3D"$(LD)" scripts/test-b= uild.sh) ifeq "$(TESTGCC)" "-1" $(error "Please upgrade the build environment") endif diff --git a/scripts/acpi_extract.py b/scripts/acpi_extract.py deleted file mode 100755 index 3ed863b6a79412a1276bb905d08f92bd677e9e09..000000000000000000000000000= 0000000000000 --- a/scripts/acpi_extract.py +++ /dev/null @@ -1,366 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin -# -# This file may be distributed under the terms of the GNU GPLv3 license. - -# Process mixed ASL/AML listing (.lst file) produced by iasl -l -# Locate and execute ACPI_EXTRACT directives, output offset info -#=20 -# Documentation of ACPI_EXTRACT_* directive tags: -#=20 -# These directive tags output offset information from AML for BIOS runtime -# table generation. -# Each directive is of the form: -# ACPI_EXTRACT_ (...) -# and causes the extractor to create an array -# named with offset, in the generated AML, -# of an object of a given type in the following . -#=20 -# A directive must fit on a single code line. -#=20 -# Object type in AML is verified, a mismatch causes a build failure. -#=20 -# Directives and operators currently supported are: -# ACPI_EXTRACT_NAME_DWORD_CONST - extract a Dword Const object from Name() -# ACPI_EXTRACT_NAME_WORD_CONST - extract a Word Const object from Name() -# ACPI_EXTRACT_NAME_BYTE_CONST - extract a Byte Const object from Name() -# ACPI_EXTRACT_METHOD_STRING - extract a NameString from Method() -# ACPI_EXTRACT_NAME_STRING - extract a NameString from Name() -# ACPI_EXTRACT_PROCESSOR_START - start of Processor() block -# ACPI_EXTRACT_PROCESSOR_STRING - extract a NameString from Processor() -# ACPI_EXTRACT_PROCESSOR_END - offset at last byte of Processor() + 1 -# ACPI_EXTRACT_DEVICE_START - start of Device() block -# ACPI_EXTRACT_DEVICE_STRING - extract a NameString from Device() -# ACPI_EXTRACT_DEVICE_END - offset at last byte of Device() + 1 -# ACPI_EXTRACT_PKG_START - start of Package block -# -# ACPI_EXTRACT_ALL_CODE - create an array storing the generated AML byteco= de -#=20 -# ACPI_EXTRACT is not allowed anywhere else in code, except in comments. - -import re -import sys -import fileinput - -aml =3D [] -asl =3D [] -output =3D {} -debug =3D "" - -class asl_line: - line =3D None - lineno =3D None - aml_offset =3D None - -def die(diag): - sys.stderr.write("Error: %s; %s\n" % (diag, debug)) - sys.exit(1) - -#Store an ASL command, matching AML offset, and input line (for debugging) -def add_asl(lineno, line): - l =3D asl_line() - l.line =3D line - l.lineno =3D lineno - l.aml_offset =3D len(aml) - asl.append(l) - -#Store an AML byte sequence -#Verify that offset output by iasl matches # of bytes so far -def add_aml(offset, line): - o =3D int(offset, 16) - # Sanity check: offset must match size of code so far - if (o !=3D len(aml)): - die("Offset 0x%x !=3D 0x%x" % (o, len(aml))) - # Strip any trailing dots and ASCII dump after " - line =3D re.sub(r'\s*\.*\s*".*$', "", line) - # Strip traling whitespace - line =3D re.sub(r'\s+$', "", line) - # Strip leading whitespace - line =3D re.sub(r'^\s+', "", line) - # Split on whitespace - code =3D re.split(r'\s+', line) - for c in code: - # Require a legal hex number, two digits - if (not(re.search(r'^[0-9A-Fa-f][0-9A-Fa-f]$', c))): - die("Unexpected octet %s" % c) - aml.append(int(c, 16)) - -# Process aml bytecode array, decoding AML -def aml_pkglen_bytes(offset): - # PkgLength can be multibyte. Bits 8-7 give the # of extra bytes. - pkglenbytes =3D aml[offset] >> 6 - return pkglenbytes + 1 - -def aml_pkglen(offset): - pkgstart =3D offset - pkglenbytes =3D aml_pkglen_bytes(offset) - pkglen =3D aml[offset] & 0x3F - # If multibyte, first nibble only uses bits 0-3 - if ((pkglenbytes > 1) and (pkglen & 0x30)): - die("PkgLen bytes 0x%x but first nibble 0x%x expected 0x0X" % - (pkglen, pkglen)) - offset +=3D 1 - pkglenbytes -=3D 1 - for i in range(pkglenbytes): - pkglen |=3D aml[offset + i] << (i * 8 + 4) - if (len(aml) < pkgstart + pkglen): - die("PckgLen 0x%x at offset 0x%x exceeds AML size 0x%x" % - (pkglen, offset, len(aml))) - return pkglen - -# Given method offset, find its NameString offset -def aml_method_string(offset): - #0x14 MethodOp PkgLength NameString MethodFlags TermList - if (aml[offset] !=3D 0x14): - die( "Method offset 0x%x: expected 0x14 actual 0x%x" % - (offset, aml[offset])) - offset +=3D 1 - pkglenbytes =3D aml_pkglen_bytes(offset) - offset +=3D pkglenbytes - return offset - -# Given name offset, find its NameString offset -def aml_name_string(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x08): - die( "Name offset 0x%x: expected 0x08 actual 0x%x" % - (offset, aml[offset])) - offset +=3D 1 - # Block Name Modifier. Skip it. - if (aml[offset] =3D=3D 0x5c or aml[offset] =3D=3D 0x5e): - offset +=3D 1 - return offset - -# Given data offset, find 8 byte buffer offset -def aml_data_buffer8(offset): - #0x08 NameOp NameString DataRef - expect =3D [0x11, 0x0B, 0x0A, 0x08] - if (aml[offset:offset+4] !=3D expect): - die( "Name offset 0x%x: expected %s actual %s" % - (offset, aml[offset:offset+4], expect)) - return offset + len(expect) - -# Given data offset, find dword const offset -def aml_data_dword_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x0C): - die( "Name offset 0x%x: expected 0x0C actual 0x%x" % - (offset, aml[offset])) - return offset + 1 - -# Given data offset, find word const offset -def aml_data_word_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x0B): - die( "Name offset 0x%x: expected 0x0B actual 0x%x" % - (offset, aml[offset])) - return offset + 1 - -# Given data offset, find byte const offset -def aml_data_byte_const(offset): - #0x08 NameOp NameString DataRef - if (aml[offset] !=3D 0x0A): - die( "Name offset 0x%x: expected 0x0A actual 0x%x" % - (offset, aml[offset])) - return offset + 1 - -# Find name'd buffer8 -def aml_name_buffer8(offset): - return aml_data_buffer8(aml_name_string(offset) + 4) - -# Given name offset, find dword const offset -def aml_name_dword_const(offset): - return aml_data_dword_const(aml_name_string(offset) + 4) - -# Given name offset, find word const offset -def aml_name_word_const(offset): - return aml_data_word_const(aml_name_string(offset) + 4) - -# Given name offset, find byte const offset -def aml_name_byte_const(offset): - return aml_data_byte_const(aml_name_string(offset) + 4) - -def aml_device_start(offset): - #0x5B 0x82 DeviceOp PkgLength NameString - if ((aml[offset] !=3D 0x5B) or (aml[offset + 1] !=3D 0x82)): - die( "Name offset 0x%x: expected 0x5B 0x82 actual 0x%x 0x%x" % - (offset, aml[offset], aml[offset + 1])) - return offset - -def aml_device_string(offset): - #0x5B 0x82 DeviceOp PkgLength NameString - start =3D aml_device_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - offset +=3D pkglenbytes - return offset - -def aml_device_end(offset): - start =3D aml_device_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - pkglen =3D aml_pkglen(offset) - return offset + pkglen - -def aml_processor_start(offset): - #0x5B 0x83 ProcessorOp PkgLength NameString ProcID - if ((aml[offset] !=3D 0x5B) or (aml[offset + 1] !=3D 0x83)): - die( "Name offset 0x%x: expected 0x5B 0x83 actual 0x%x 0x%x" % - (offset, aml[offset], aml[offset + 1])) - return offset - -def aml_processor_string(offset): - #0x5B 0x83 ProcessorOp PkgLength NameString ProcID - start =3D aml_processor_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - offset +=3D pkglenbytes - return offset - -def aml_processor_end(offset): - start =3D aml_processor_start(offset) - offset +=3D 2 - pkglenbytes =3D aml_pkglen_bytes(offset) - pkglen =3D aml_pkglen(offset) - return offset + pkglen - -def aml_package_start(offset): - offset =3D aml_name_string(offset) + 4 - # 0x12 PkgLength NumElements PackageElementList - if (aml[offset] !=3D 0x12): - die( "Name offset 0x%x: expected 0x12 actual 0x%x" % - (offset, aml[offset])) - offset +=3D 1 - return offset + aml_pkglen_bytes(offset) + 1 - -def get_value_type(maxvalue): - #Use type large enough to fit the table - if (maxvalue >=3D 0x10000): - return "int" - elif (maxvalue >=3D 0x100): - return "short" - else: - return "char" - -def main(): - global debug - lineno =3D 0 - for line in fileinput.input(): - # Strip trailing newline - line =3D line.rstrip() - # line number and debug string to output in case of errors - lineno =3D lineno + 1 - debug =3D "input line %d: %s" % (lineno, line) - #ASL listing: space, then line#, then ...., then code - pasl =3D re.compile('^\s+([0-9]+)(:\s\s|\.\.\.\.)\s*') - m =3D pasl.search(line) - if (m): - add_asl(lineno, pasl.sub("", line)) - # AML listing: offset in hex, then ...., then code - paml =3D re.compile('^([0-9A-Fa-f]+)(:\s\s|\.\.\.\.)\s*') - m =3D paml.search(line) - if (m): - add_aml(m.group(1), paml.sub("", line)) - - # Now go over code - # Track AML offset of a previous non-empty ASL command - prev_aml_offset =3D -1 - for i in range(len(asl)): - debug =3D "input line %d: %s" % (asl[i].lineno, asl[i].line) - - l =3D asl[i].line - - # skip if not an extract directive - a =3D len(re.findall(r'ACPI_EXTRACT', l)) - if (not a): - # If not empty, store AML offset. Will be used for sanity chec= ks - # IASL seems to put {}. at random places in the listing. - # Ignore any non-words for the purpose of this test. - m =3D re.search(r'\w+', l) - if (m): - prev_aml_offset =3D asl[i].aml_offset - continue - - if (a > 1): - die("Expected at most one ACPI_EXTRACT per line, actual %d" % = a) - - mext =3D re.search(r''' - ^\s* # leading whitespace - /\*\s* # start C comment - (ACPI_EXTRACT_\w+) # directive: group(1) - \s+ # whitspace separates directive from array n= ame - (\w+) # array name: group(2) - \s*\*/ # end of C comment - \s*$ # trailing whitespace - ''', l, re.VERBOSE) - if (not mext): - die("Stray ACPI_EXTRACT in input") - - # previous command must have produced some AML, - # otherwise we are in a middle of a block - if (prev_aml_offset =3D=3D asl[i].aml_offset): - die("ACPI_EXTRACT directive in the middle of a block") - - directive =3D mext.group(1) - array =3D mext.group(2) - offset =3D asl[i].aml_offset - - if (directive =3D=3D "ACPI_EXTRACT_ALL_CODE"): - if array in output: - die("%s directive used more than once" % directive) - output[array] =3D aml - continue - if (directive =3D=3D "ACPI_EXTRACT_NAME_BUFFER8"): - offset =3D aml_name_buffer8(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_DWORD_CONST"): - offset =3D aml_name_dword_const(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_WORD_CONST"): - offset =3D aml_name_word_const(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_BYTE_CONST"): - offset =3D aml_name_byte_const(offset) - elif (directive =3D=3D "ACPI_EXTRACT_NAME_STRING"): - offset =3D aml_name_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_METHOD_STRING"): - offset =3D aml_method_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_DEVICE_START"): - offset =3D aml_device_start(offset) - elif (directive =3D=3D "ACPI_EXTRACT_DEVICE_STRING"): - offset =3D aml_device_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_DEVICE_END"): - offset =3D aml_device_end(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PROCESSOR_START"): - offset =3D aml_processor_start(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PROCESSOR_STRING"): - offset =3D aml_processor_string(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PROCESSOR_END"): - offset =3D aml_processor_end(offset) - elif (directive =3D=3D "ACPI_EXTRACT_PKG_START"): - offset =3D aml_package_start(offset) - else: - die("Unsupported directive %s" % directive) - - if array not in output: - output[array] =3D [] - output[array].append(offset) - - debug =3D "at end of file" - - # Pretty print output - outstrs =3D ["/* DO NOT EDIT! This is an autogenerated file." - " See scripts/acpi_extract.py. */"] - for array in output.keys(): - otype =3D get_value_type(max(output[array])) - outstrs.append("static unsigned %s %s[] =3D {" % (otype, array)) - odata =3D [] - for value in output[array]: - odata.append("0x%02x" % value) - if len(odata) >=3D 8: - outstrs.append(" %s," % (', '.join(odata),)) - del odata[:] - outstrs.append(" %s" % (', '.join(odata),)) - outstrs.append('};') - outstrs.append('') - sys.stdout.write('\n'.join(outstrs)) - -if __name__ =3D=3D '__main__': - main() diff --git a/scripts/acpi_extract_preprocess.py b/scripts/acpi_extract_prep= rocess.py deleted file mode 100755 index 2698118406d97c164783335c7fb6cbfa6239183b..000000000000000000000000000= 0000000000000 --- a/scripts/acpi_extract_preprocess.py +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/python -# Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin -# -# This file may be distributed under the terms of the GNU GPLv3 license. - -# Read a preprocessed ASL listing and put each ACPI_EXTRACT -# directive in a comment, to make iasl skip it. -# We also put each directive on a new line, the machinery -# in scripts/acpi_extract.py requires this. - -import re -import sys -import fileinput - -def die(diag): - sys.stderr.write("Error: %s\n" % (diag)) - sys.exit(1) - -# Note: () around pattern make split return matched string as part of list -psplit =3D re.compile(r''' ( - \b # At word boundary - ACPI_EXTRACT_\w+ # directive - \s+ # some whitespace - \w+ # array name - )''', re.VERBOSE) - -lineno =3D 0 -for line in fileinput.input(): - # line number and debug string to output in case of errors - lineno =3D lineno + 1 - debug =3D "input line %d: %s" % (lineno, line.rstrip()) - - s =3D psplit.split(line) - # The way split works, each odd item is the matching ACPI_EXTRACT dire= ctive. - # Put each in a comment, and on a line by itself. - for i in range(len(s)): - if (i % 2): - sys.stdout.write("\n/* %s */\n" % s[i]) - else: - sys.stdout.write(s[i]) - --=20 Git-154) _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Fri Dec 19 21:00:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1748621593785263.64211039337283; Fri, 30 May 2025 09:13:13 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 334EE40646; Fri, 30 May 2025 16:13:11 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) by coreboot.org (Postfix) with ESMTP id 4ECD940268 for ; Fri, 30 May 2025 16:12:21 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1F0CD11400FE; Fri, 30 May 2025 12:12:20 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-06.internal (MEProxy); Fri, 30 May 2025 12:12:20 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 30 May 2025 12:12:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1748621540; x=1748707940; bh=MMDHVmgdUDWZsdn2NSy+GCzA/nz4pSeWYP0T9pNdNSU=; b= iu2mxLCuUGAccHmkOesnHvEJ9CG/X/JJHWglcNPrJWO8tgOo5fZGlXJROCwpfCPk 9i196EyyvBhMKKsK+RXN0mZ3nGccANMiCQfgvD9sNfUS4zJGbzZJmi+KFrSgm7uZ 6/51nJat0TU1aAUg1oVgnD8PelY84S+8ldtOFVBNzm29emUZdY8015h5T/sOkmMA fF5piPSI0Tz9dS02YycrWxArv7etw7xwbLJkVrZZUCtVNRnYKAhktS4l9Gs92c+Y qVeSvYrfXmEzJ1dDASxyiLVT7bjxW0zOC2N28fMYtKgWYIKSIeA7RqdbNc5YgLaj xYxHAYKRRu/RArqUxpcvew== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748621540; x= 1748707940; bh=MMDHVmgdUDWZsdn2NSy+GCzA/nz4pSeWYP0T9pNdNSU=; b=i WQSlDbOtRzKENF/7rPWP+v8cm9uliN/7oqaZLEKw5O2C7S/53HvkStrTx4CTkoLs imr8V6Ndc6JFuDRIyNDjUb5uc1Gbjc3M4ScaktJ2+PfBGqW2gesanJ8aYuRlMuDJ mdaUXkRh2NN8Bxln9Y8I2aUHg7gElgwTPBowvrnnofP3NA5neBRr9boOsb80vA+0 aMhfiAXde/emMDOv6lTvdmYTmPbdQLNvPASe0EBbAvUSOqATCtF0B2PE68eVIju8 7fyEgfvBx3bq3mFjjnSuZhr62jW1yQiwvmPb8rEFltniNMhNqcfHwW7MkBm8M6kG 9R0Bc5Jq9dKW0Px929MHw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleegieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhm peflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtg homheqnecuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtddu udeghfeuveegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgvrggsih hoshesshgvrggsihhoshdrohhrghdprhgtphhtthhopehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Fri, 30 May 2025 17:12:17 +0100 MIME-Version: 1.0 Message-Id: <20250530-build-v1-2-93fe220fd713@flygoat.com> References: <20250530-build-v1-0-93fe220fd713@flygoat.com> In-Reply-To: <20250530-build-v1-0-93fe220fd713@flygoat.com> To: seabios@seabios.org X-Developer-Signature: v=1; a=openpgp-sha256; l=874; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=+dNzDy7qnBKRlYpj116fxDxe1C/GHmLBr3V+h4IMBvQ=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhgzLGw9fl/943/3e0ftD8AaOrZuXnJXkWJdYPXFWbvGbl j+/HbhCOkpZGMS4GGTFFFlCBJT6NjReXHD9QdYfmDmsTCBDGLg4BWAiuxoZGSZHHUutyCwILxIN fje53u1YptWeGaU2bdEP9P/4/ZtyppXhf0VptMbHwqDLrSWxMySjSq1Vs+3SxZ05z0u9F7M+caK DEQA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Message-ID-Hash: TZ6URTZQUA3IS26PCKZ77NP5VE5UIPAD X-Message-ID-Hash: TZ6URTZQUA3IS26PCKZ77NP5VE5UIPAD X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH RESEND 2/7] Makefile: Don't use $(CC) as default hostcc List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: --- X-ZM-MESSAGEID: 1748621594852116600 Content-Type: text/plain; charset="utf-8" This effectively breaks cross build which cross CC is supplied externally. Signed-off-by: Jiaxun Yang --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 01f42ec334591be5c6ed58c6bbe478de01f4b26d..1e03a0e5af9a974b0c8c0c8c952= 69b7635737315 100644 --- a/Makefile +++ b/Makefile @@ -8,15 +8,14 @@ OUT=3Dout/ =20 # Common command definitions -export HOSTCC :=3D $(CC) +export HOSTCC :=3D cc export CONFIG_SHELL :=3D sh export KCONFIG_AUTOHEADER :=3D autoconf.h export KCONFIG_CONFIG :=3D $(CURDIR)/.config export LC_ALL :=3D C -CROSS_PREFIX=3D -ifneq ($(CROSS_PREFIX),) + +CROSS_PREFIX :=3D CC=3D$(CROSS_PREFIX)gcc -endif AS=3D$(CROSS_PREFIX)as LD=3D$(CROSS_PREFIX)ld OBJCOPY=3D$(CROSS_PREFIX)objcopy --=20 Git-154) _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Fri Dec 19 21:00:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1748621612273463.3076301954188; Fri, 30 May 2025 09:13:32 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id B74CA4074A; Fri, 30 May 2025 16:13:29 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) by coreboot.org (Postfix) with ESMTP id A1C744026D for ; Fri, 30 May 2025 16:12:23 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id BB11811400FE; Fri, 30 May 2025 12:12:22 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-01.internal (MEProxy); Fri, 30 May 2025 12:12:22 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 30 May 2025 12:12:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1748621542; x=1748707942; bh=3CL2g7b+ms9h6hsOPZ9obxhMo5/9U1zpju3MMgR05Vg=; b= AZeI8IY5q+lpQn63maLRhsMu30RuJMe9PM6K2yTBEZr2qdMW2fB3S2ssOYx2x9Ls qlCag0Eo87xaHr7LYk8JFKiUIT9QGpYFV7A9IjNPK20wP9GTjiqTjsZbJlgWHMfU Z5Taca0vGU7s1rqbSlJaGCc9qHqa389bd9HgqjPWKg2Of6pNt53rH2UgcnyF6FoK LxIw8aAlMFeMZfWT+a2o7dzfOEvDZSOPDoFjdsO4dy3WvYtORF+Pvc1HAoZ2pHA1 CFvSyrg+fc8mFeT2LoW2E1xqsCq3zDgE3hmiHYaT4U8nsmC8ne1QhGwOxQPkX1Zy k8ASdwZP4rKp+8K6rIIypQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748621542; x= 1748707942; bh=3CL2g7b+ms9h6hsOPZ9obxhMo5/9U1zpju3MMgR05Vg=; b=d lHN2xtuPAey2MTmPEbl6awHOWdHCMJpsf1sGmRCcLSczLRj4MQXykI8BERArPvDe HqKbBv7coNJbIpVrLe48UeOlIdK1A4aaRDrGtrQ3OvZ6JE4BA0jfQnqS2TKgCwEE w3tXGZtJEfs72hphcCinMTR6oliWfV9HqlNYtq6G3JKRD5JzqWjhB2P1MchPEWX/ 6a47cJJMvOsBfF5tQg/IRhgAgPFD97jR/8gbeUXko8sJV0mpt54cUJan57kFLlOE xM2ewGc2eGPInezNU73ujD6J8zMs9/6+OiQKOGjpbHhCZ0Qa2XB7beq3maW8Ydhr 3iC7DRTdixQFeXASwt60g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleegieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhm peflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtg homheqnecuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtddu udeghfeuveegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgvrggsih hoshesshgvrggsihhoshdrohhrghdprhgtphhtthhopehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Fri, 30 May 2025 17:12:18 +0100 MIME-Version: 1.0 Message-Id: <20250530-build-v1-3-93fe220fd713@flygoat.com> References: <20250530-build-v1-0-93fe220fd713@flygoat.com> In-Reply-To: <20250530-build-v1-0-93fe220fd713@flygoat.com> To: seabios@seabios.org X-Developer-Signature: v=1; a=openpgp-sha256; l=8431; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=MepC4MvRAm1gcPrkKL/U0S2uHlMDfAxOiEomvWobpx0=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhgzLGw+LL/mu+m1xRi1g6hm9HeduPvc+d8A52ef/iv/Wz LMkl7UqdpSwMIhxMciKKbKECCj1bWi8uOD6g6w/MHNYmUCGMHBxCsBEcmcwMjSK5iZ01knaFpz+ avewIpVp111pq958sUPB33JZ9dRfdDB8Uzi9htU8UbS1Z/3bm3OsLrdFS3768974T0nyorcCmk5 cAA== X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Message-ID-Hash: UTTIWN2HZ7LE3VMDTRWRAR2DLKIMHH4X X-Message-ID-Hash: UTTIWN2HZ7LE3VMDTRWRAR2DLKIMHH4X X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH RESEND 3/7] Makefile: Invoke AS, CPP and LD via CC List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZM-MESSAGEID: 1748621615299116600 Content-Type: text/plain; charset="utf-8" This is perfered way to get correct LD and AS flags set, as well as preprocessor definitions on cross builds. Also mandatory for potential clang build. Signed-off-by: Jiaxun Yang --- Makefile | 35 +++++++++++++++++------------------ scripts/test-build.sh | 12 ++++++------ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index 1e03a0e5af9a974b0c8c0c8c95269b7635737315..31579992da6f045dbc4a1bc1143= ef7ff553127b9 100644 --- a/Makefile +++ b/Makefile @@ -14,16 +14,12 @@ export KCONFIG_AUTOHEADER :=3D autoconf.h export KCONFIG_CONFIG :=3D $(CURDIR)/.config export LC_ALL :=3D C =20 -CROSS_PREFIX :=3D +CROSS_PREFIX :=3D CC=3D$(CROSS_PREFIX)gcc -AS=3D$(CROSS_PREFIX)as -LD=3D$(CROSS_PREFIX)ld OBJCOPY=3D$(CROSS_PREFIX)objcopy OBJDUMP=3D$(CROSS_PREFIX)objdump STRIP=3D$(CROSS_PREFIX)strip PYTHON=3Dpython -CPP=3Dcpp -LD32BIT_FLAG:=3D-melf_i386 =20 # Source files SRCBOTH=3Dmisc.c stacks.c output.c string.c block.c cdrom.c disk.c \ @@ -62,9 +58,10 @@ COMMONCFLAGS :=3D -I$(OUT) -Isrc -Os -MD -g \ -m32 -march=3Di386 -mregparm=3D3 -mpreferred-stack-boundary=3D2 \ -minline-all-stringops -fomit-frame-pointer \ -freg-struct-return -ffreestanding -fno-delete-null-pointer-checks \ - -ffunction-sections -fdata-sections -fno-common -fno-merge-constants -COMMONCFLAGS +=3D $(call cc-option,$(CC),-nopie,) + -ffunction-sections -fdata-sections -fno-common -static -nostdlib \ + -fno-merge-constants COMMONCFLAGS +=3D $(call cc-option,$(CC),-fno-pie,) +COMMONCFLAGS +=3D $(call cc-option,$(CC),-nopie,) COMMONCFLAGS +=3D $(call cc-option,$(CC),-fno-stack-protector,) COMMONCFLAGS +=3D $(call cc-option,$(CC),-fno-stack-protector-all,) COMMONCFLAGS +=3D $(call cc-option,$(CC),-fstack-check=3Dno,) @@ -81,6 +78,8 @@ CFLAGS32SEG :=3D $(CFLAGSSEG) -DMODE16=3D0 CFLAGS16 :=3D $(CFLAGSSEG) -DMODE16=3D1 \ $(call cc-option,$(CC),-m16,-Wa$(COMMA)src/code16gcc.s) \ $(call cc-option,$(CC),--param large-stack-frame=3D4,-fno-inline) +LD32BIT_FLAG:=3D $(COMMONCFLAGS) -Wl,-melf_i386 \ + $(call cc-option,$(CC),-Wl$(COMMA)--no-warn-rwx-segments) =20 # Run with "make V=3D1" to see the actual compile commands ifdef V @@ -109,7 +108,8 @@ all: $(target-y) ################ Common build rules =20 # Verify the build environment works. -TESTGCC:=3D$(shell OUT=3D"$(OUT)" CC=3D"$(CC)" LD=3D"$(LD)" scripts/test-b= uild.sh) +TESTGCC:=3D$(shell OUT=3D"$(OUT)" CC=3D"$(CC)" CFLAGS16=3D"$(CFLAGS16)" \ + LD32BIT_FLAG=3D"$(LD32BIT_FLAG)" scripts/test-build.sh) ifeq "$(TESTGCC)" "-1" $(error "Please upgrade the build environment") endif @@ -141,8 +141,7 @@ $(OUT)%.o: %.c $(OUT)autoconf.h =20 $(OUT)%.lds: %.lds.S @echo " Precompiling $@" - $(Q)$(CPP) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $@ - + $(Q)$(CC) -E $(COMMONCFLAGS) $(CPPFLAGS) -D__ASSEMBLY__ $< -o $@ =20 ################ Main BIOS build rules =20 @@ -164,10 +163,10 @@ $(OUT)romlayout.o: src/romlayout.S $(OUT)autoconf.h $= (OUT)asm-offsets.h =20 $(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16= .o $(OUT)romlayout.o src/version.c scripts/layoutrom.py scripts/buildversio= n.py @echo " Building ld scripts" - $(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(= AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autoversion.h + $(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(= OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autoversion.h $(Q)$(CC) $(CFLAGS32FLAT) -c src/version.c -o $(OUT)version.o - $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT= )code32flat.o - $(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)c= ode16.o + $(Q)$(CC) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT= )code32flat.o + $(Q)$(CC) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)c= ode16.o $(Q)$(OBJDUMP) -thr $(OUT)code32flat.o > $(OUT)code32flat.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code32seg.o > $(OUT)code32seg.o.objdump $(Q)$(OBJDUMP) -thr $(OUT)code16.o > $(OUT)code16.o.objdump @@ -179,15 +178,15 @@ $(OUT)romlayout32seg.lds $(OUT)romlayout32flat.lds $(= OUT)code32flat.o $(OUT)code =20 $(OUT)rom16.o: $(OUT)code16.o $(OUT)romlayout16.lds @echo " Linking $@" - $(Q)$(LD) -T $(OUT)romlayout16.lds $< -o $@ + $(Q)$(CC) $(LD32BIT_FLAG) -T $(OUT)romlayout16.lds $< -o $@ =20 $(OUT)rom32seg.o: $(OUT)code32seg.o $(OUT)romlayout32seg.lds @echo " Linking $@" - $(Q)$(LD) -T $(OUT)romlayout32seg.lds $< -o $@ + $(Q)$(CC) $(LD32BIT_FLAG) -T $(OUT)romlayout32seg.lds $< -o $@ =20 $(OUT)rom.o: $(OUT)rom16.noexec.o $(OUT)rom32seg.noexec.o $(OUT)code32flat= .o $(OUT)romlayout32flat.lds @echo " Linking $@" - $(Q)$(LD) -N -T $(OUT)romlayout32flat.lds $(OUT)rom16.noexec.o $(OUT)rom3= 2seg.noexec.o $(OUT)code32flat.o -o $@ + $(Q)$(CC) $(LD32BIT_FLAG) -Wl,-N -T $(OUT)romlayout32flat.lds $(OUT)rom16= .noexec.o $(OUT)rom32seg.noexec.o $(OUT)code32flat.o -o $@ =20 $(OUT)bios.bin.prep: $(OUT)rom.o scripts/checkrom.py @echo " Prepping $@" @@ -225,7 +224,7 @@ $(OUT)vgaccode16.raw.s: $(OUT)autoconf.h $(patsubst %.c= , $(OUT)%.o,$(SRCVGA)) ; $(OUT)vgaccode16.o: $(OUT)vgaccode16.raw.s scripts/vgafixup.py @echo " Fixup VGA rom assembler" $(Q)$(PYTHON) ./scripts/vgafixup.py $< $(OUT)vgaccode16.s - $(Q)$(AS) --32 src/code16gcc.s $(OUT)vgaccode16.s -o $@ + $(Q)$(CC) -c $(CFLAGS16) $(OUT)vgaccode16.s -o $@ else $(OUT)vgaccode16.o: $(OUT)autoconf.h $(patsubst %.c, $(OUT)%.o,$(SRCVGA)) = ; $(call whole-compile, $(CFLAGS16) -Isrc, $(SRCVGA),$@) endif @@ -238,7 +237,7 @@ $(OUT)vgarom.o: $(OUT)vgaccode16.o $(OUT)vgaentry.o $(O= UT)vgasrc/vgalayout.lds v @echo " Linking $@" $(Q)$(PYTHON) ./scripts/buildversion.py -e "$(EXTRAVERSION)" -t "$(CC);$(= AS);$(LD);$(OBJCOPY);$(OBJDUMP);$(STRIP)" $(OUT)autovgaversion.h $(Q)$(CC) $(CFLAGS16) -c vgasrc/vgaversion.c -o $(OUT)vgaversion.o - $(Q)$(LD) --gc-sections -T $(OUT)vgasrc/vgalayout.lds $(OUT)vgaccode16.o = $(OUT)vgaentry.o $(OUT)vgaversion.o -o $@ + $(Q)$(CC) $(LD32BIT_FLAG) -Wl,--gc-sections -T $(OUT)vgasrc/vgalayout.lds= $(OUT)vgaccode16.o $(OUT)vgaentry.o $(OUT)vgaversion.o -o $@ =20 $(OUT)vgabios.bin.raw: $(OUT)vgarom.o @echo " Extracting binary $@" diff --git a/scripts/test-build.sh b/scripts/test-build.sh index 25cc2f20ef85da4e9fb0d7c6aedd3290a86c5b60..2aba2b0ad1976bec30d74bbbeff= 68fe0ee16f38e 100755 --- a/scripts/test-build.sh +++ b/scripts/test-build.sh @@ -27,7 +27,7 @@ SECTIONS } } EOF -$CC -O -g -c $TMPFILE1 -o $TMPFILE1o > /dev/null 2>&1 +$CC $CFLAGS16 -O -g -c $TMPFILE1 -o $TMPFILE1o > /dev/null 2>&1 if [ $? -ne 0 ]; then echo "Unable to execute the C compiler ($CC)." >&2 echo "" >&2 @@ -35,7 +35,7 @@ if [ $? -ne 0 ]; then echo -1 exit 0 fi -$LD -T $TMPFILE1_ld $TMPFILE1o -o $TMPFILE2o > /dev/null 2>&1 +$CC $LD32BIT_FLAG -v -T $TMPFILE1_ld $TMPFILE1o -o $TMPFILE2o > /dev/null = 2>&1 if [ $? -ne 0 ]; then echo "The version of LD on this system ($LD) does not properly handle"= >&2 echo "alignments. As a result, this project can not be built." >&2 @@ -50,7 +50,7 @@ fi =20 # Test for "-fwhole-program". Older versions of gcc (pre v4.1) don't # support the whole-program optimization - detect that. -$CC -fwhole-program -S -o /dev/null -xc /dev/null > /dev/null 2>&1 +$CC -m32 -fwhole-program -S -o /dev/null -xc /dev/null > /dev/null 2>&1 if [ $? -ne 0 ]; then echo " Working around no -fwhole-program" >&2 echo 2 @@ -67,14 +67,14 @@ void __attribute__((externally_visible)) t1() { } extern unsigned char v1; unsigned char v1 __attribute__((section(".data16.foo.19"))) __attribute__(= (externally_visible)); EOF -$CC -Os -c -fwhole-program $TMPFILE1 -o $TMPFILE1o > /dev/null 2>&1 +$CC -m32 -Os -c -fwhole-program $TMPFILE1 -o $TMPFILE1o > /dev/null 2>&1 cat - > $TMPFILE2 < /dev/null 2>&1 -$CC -nostdlib -Os $TMPFILE1o $TMPFILE2o -o $TMPFILE3o > /dev/null 2>&1 +$CC -m32 -Os -c -fwhole-program $TMPFILE2 -o $TMPFILE2o > /dev/null 2>&1 +$CC ${LD32BIT_FLAG} -Os $TMPFILE1o $TMPFILE2o -o $TMPFILE3o > /dev/null 2>= &1 if [ $? -ne 0 ]; then echo " Working around non-functional -fwhole-program" >&2 echo 2 --=20 Git-154) _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Fri Dec 19 21:00:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1748621628538790.5530443110118; Fri, 30 May 2025 09:13:48 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id A2581406F3; Fri, 30 May 2025 16:13:45 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a4-smtp.messagingengine.com [103.168.172.147]) by coreboot.org (Postfix) with ESMTP id 6FCF640358 for ; Fri, 30 May 2025 16:12:24 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [10.202.2.49]) by mailfout.phl.internal (Postfix) with ESMTP id 89512138016C; Fri, 30 May 2025 12:12:23 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-09.internal (MEProxy); Fri, 30 May 2025 12:12:23 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 30 May 2025 12:12:22 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1748621543; x=1748707943; bh=NBHp9miTGciUmgWZrObkf7cg+LFxEYMPeykURejgads=; b= TR/vN01SFvA8hW6xyS01+sOgK3UvfGQr86W7kQYi4im7vyc6IgK7nd4fNVX4kU4q TX7aN9PlM4vD+T4dPefEM1N05Uo52hMKNk4tLRJXjU8Q89/V8yg1/hRKMaVVROUG nq8uH2m3MVIpcF5eGk4yQsNszt0td9yXvO6W6t6cugS4WwzYAqhfamA8Q9Zmr0cA DHnib32ohJlCcf0RpMQHZkeGKJZbcgumgSi1/Qri1W6cbG11VQI0Dpd3ZRf7sGJP mUFfniQNU/j/V1JUptNtcDhOC5eitSLw9A6doUItDZ2PG+OMdpaLDIQumjbPVOHe TJO1sx77iObywe49fVGe2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748621543; x= 1748707943; bh=NBHp9miTGciUmgWZrObkf7cg+LFxEYMPeykURejgads=; b=X l6OdLjzOFRxT5JruXAlMrZ+z24K1Z3sSn5qg9tFUNfBJ8GalBo1mxOSRkoS9/FUH 7p8o2Qc45BjM5bTBkW4g4sD+HAWBT3AYCEpt7Cg1Sm0GZcPRpqbVv6OWzcTxkzrW qLqOScmJrlQdtbJXBCKNFIfnlbN+cA/AOkVUqQ5j1z2C1YzKCsEWTdw9ubsHQ8iD l9Mj9Vyt5V4jrLc043vl8ih3CSdTIlzIETYjeT3/1pegWG7wVKda5gwhZvm1er0H 6cnkvhVxRhEPWmwAP7vtyA6RXCbW8HKQu3FekRzf3USB74UzTq0soZ2MIme+j7FS SwJGuCpP4nK1t80uDrSvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleegieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhm peflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtg homheqnecuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtddu udeghfeuveegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgvrggsih hoshesshgvrggsihhoshdrohhrghdprhgtphhtthhopehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Fri, 30 May 2025 17:12:19 +0100 MIME-Version: 1.0 Message-Id: <20250530-build-v1-4-93fe220fd713@flygoat.com> References: <20250530-build-v1-0-93fe220fd713@flygoat.com> In-Reply-To: <20250530-build-v1-0-93fe220fd713@flygoat.com> To: seabios@seabios.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1792; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=UzUgeJw5/YUBwsXG8EJjwUA/isJ/uy97YRKjOCcYSaE=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhgzLGw/fqt6N0os+4jlBbWOKeVOyaEDzN2fdCqNd8nu/m dTt372xo5SFQYyLQVZMkSVEQKlvQ+PFBdcfZP2BmcPKBDKEgYtTACYi1sbIMO1ryhZp7opVMic/ S967WtdxaNrx2bsi1969pP5r8hQ2i12MDLtr3+icXfj93G4Dvye1uTbnX0wwU9jrlst8atWVTNs 2K1YA X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Message-ID-Hash: JJDJNMPTNSHP4I7RYWXBJYWKCP3DRSFC X-Message-ID-Hash: JJDJNMPTNSHP4I7RYWXBJYWKCP3DRSFC X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH RESEND 4/7] Makefile: Allow more linux style knobs List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZM-MESSAGEID: 1748621629323116600 Content-Type: text/plain; charset="utf-8" Allow all hoat flags to be set at top level makefile. Allow KBUILD_DEFCONFIG to be specified to load external defconfigs. Allow linux style CROSS_COMPILE specifier. Signed-off-by: Jiaxun Yang --- Makefile | 6 +++++- scripts/kconfig/Makefile | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 31579992da6f045dbc4a1bc1143ef7ff553127b9..ae168e212b51366df966aae11b3= fd8af3f49e9e7 100644 --- a/Makefile +++ b/Makefile @@ -9,12 +9,16 @@ OUT=3Dout/ =20 # Common command definitions export HOSTCC :=3D cc +export HOSTCLFLAGS :=3D +export HOSTLDFLAGS :=3D export CONFIG_SHELL :=3D sh export KCONFIG_AUTOHEADER :=3D autoconf.h export KCONFIG_CONFIG :=3D $(CURDIR)/.config +export KBUILD_DEFCONFIG :=3D /dev/null export LC_ALL :=3D C =20 -CROSS_PREFIX :=3D +CROSS_COMPILE :=3D +CROSS_PREFIX :=3D $(CROSS_COMPILE) CC=3D$(CROSS_PREFIX)gcc OBJCOPY=3D$(CROSS_PREFIX)objcopy OBJDUMP=3D$(CROSS_PREFIX)objdump diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 1c1293618764c891f04d55f7ca5a24d42a218215..96793619356ed649a467513ebcd= 829a143798a57 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -11,6 +11,10 @@ else Kconfig :=3D Kconfig endif =20 +ifndef KBUILD_DEFCONFIG +KBUILD_DEFCONFIG :=3D defconfig +endif + # We need this, in case the user has it in its environment unexport CONFIG_ =20 @@ -96,7 +100,7 @@ savedefconfig: $(obj)/conf =20 defconfig: $(obj)/conf @echo " Build default config" - $(Q)$< --defconfig=3D/dev/null $(Kconfig) + $(Q)$< --defconfig=3D$(KBUILD_DEFCONFIG) $(Kconfig) =20 %_defconfig: $(obj)/conf $(Q)$< --defconfig=3Darch/$(SRCARCH)/configs/$@ $(Kconfig) --=20 Git-154) _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Fri Dec 19 21:00:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1748621644974314.4469273742619; Fri, 30 May 2025 09:14:04 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 5DF3340646; Fri, 30 May 2025 16:14:02 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a4-smtp.messagingengine.com [103.168.172.147]) by coreboot.org (Postfix) with ESMTP id 28582405B1 for ; Fri, 30 May 2025 16:12:25 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [10.202.2.46]) by mailfout.phl.internal (Postfix) with ESMTP id 41FE11380185; Fri, 30 May 2025 12:12:24 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-06.internal (MEProxy); Fri, 30 May 2025 12:12:24 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 30 May 2025 12:12:23 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1748621544; x=1748707944; bh=nIpFICFrBneA7BQ87N1j4h1UkSWjXxRqTlsdnekeK5M=; b= QtpF7JVVzUbcMuFBcT9KnKWzHa9JTxXbU1rB/clfVBBO3XozRVPmD/Q6nlhKEtiv kwZYOHKfcyi+1EzrImY9U3q15Hn+ryPP+yxSujOq5udorbnMa5dGySnpcSQN9ZI8 sCF33cyQqz5HeyVWXdEoAzOSBuuqPeJsSaGnBkHmhghH6A5DC/rccogVlKjcFVlB 98BB5oBxJox/pdFCCnpiJvWchZuvL+RC66NPxJHlIPBaW8v7UKxeTYA93lxFqx/1 HT8MBmTmV1XZ8Ij722nsT3EH+HjwW9K3PTGfrotHzkqEypNcuqZcPMa9wWH3MVOc h8f6uqOUrAxWyGpcUCH1Cw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748621544; x= 1748707944; bh=nIpFICFrBneA7BQ87N1j4h1UkSWjXxRqTlsdnekeK5M=; b=a oTTRp869LhtOT0P5OgM4ZY3gy5DPzo4A+LpvOVVjkSpqeBbrTNzhwvrNIcJizVlX 3UJQ7+/Q01oGrmfpzK4qqN3955b4CQ0G6JAp/IVKrCQl9/fCQfexV09dLh2ryIFe rT3hn1/xxIFIVNWDXP/vnPLpKBrwKAcD3UJSyRu7AGLF5OWJN91XIwlppckuqSQX O/hYm4vAuhDuueAAVrXYoExpg0jZqw0r/aQC1TiarzjqACMu19Zhu/CHdIqO+vlz ZQn7bADNGBH4hhRDm5W9ClZZCv6i0G6ufqhTEB/6TSszaj8wf3eFA3FNcG5pkM7A PtSHhLuhslwXZA/AGag4Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleegieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhm peflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtg homheqnecuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtddu udeghfeuveegffegudekjeelnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpe hmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgvrggsih hoshesshgvrggsihhoshdrohhrghdprhgtphhtthhopehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Fri, 30 May 2025 17:12:20 +0100 MIME-Version: 1.0 Message-Id: <20250530-build-v1-5-93fe220fd713@flygoat.com> References: <20250530-build-v1-0-93fe220fd713@flygoat.com> In-Reply-To: <20250530-build-v1-0-93fe220fd713@flygoat.com> To: seabios@seabios.org X-Developer-Signature: v=1; a=openpgp-sha256; l=1714; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=0B5nUFIma15AINxorYl6HO5OFszu588M0Qu8F7NZTS4=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhgzLGw/bKlTYfdJ8Gp7LnH0UK9rarKpc/vClCttuM6Gut lNvFC52lLIwiHExyIopsoQIKPVtaLy44PqDrD8wc1iZQIYwcHEKwES4IxgZPlgqcEfffX3M7lbX lgv3D81Y9mIB49pHLLItzQYzJsp8FWRkuFzRpKDoXXNf4ANTeB5HTAmPZcGUuocdN5Yp7HS5cfU nAwA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Message-ID-Hash: C2JUFCDUMYZ3LQZX4UD6EOVDLGKPTRZJ X-Message-ID-Hash: C2JUFCDUMYZ3LQZX4UD6EOVDLGKPTRZJ X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH RESEND 5/7] asm-offset: Refresh definations from Linux List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZM-MESSAGEID: 1748621645471116600 Content-Type: text/plain; charset="utf-8" To adopt newer toolchains. Signed-off-by: Jiaxun Yang --- scripts/gen-offsets.sh | 7 ++++--- src/gen-defs.h | 8 +++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/gen-offsets.sh b/scripts/gen-offsets.sh index 73dede82b86da25cba0abbcf86039490c21e90cc..eeddca7f594a108a22439e5827b= a09714a52b254 100755 --- a/scripts/gen-offsets.sh +++ b/scripts/gen-offsets.sh @@ -9,9 +9,10 @@ cat > "$OUTFILE" </{s:->#\(.*\):/* \1 */:; \ - s:^->\([^ ]*\) [\$\#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \ - s:->::; p;}" < "$INFILE" >> "$OUTFILE" +sed -ne 's:^[[:space:]]*\.ascii[[:space:]]*"\(.*\)".*:\1:; + /^->/{s:->#\(.*\):/* \1 */:; + s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; + s:->::; p;}' < "$INFILE" >> "$OUTFILE" cat >> "$OUTFILE" <" #sym " %0 " #val : : "i" (val)) + asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val)) =20 -#define BLANK() \ - asm volatile("\n->" : : ) +#define BLANK() asm volatile("\n.ascii \"->\"" : : ) =20 #define OFFSET(sym, str, mem) \ DEFINE(sym, offsetof(struct str, mem)) =20 #define COMMENT(x) \ - asm volatile("\n->#" x) + asm volatile("\n.ascii \"->#" x "\"") =20 #endif // gen-defs.h --=20 Git-154) _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Fri Dec 19 21:00:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1748621661787486.8628520926353; Fri, 30 May 2025 09:14:21 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 2B3E1406F3; Fri, 30 May 2025 16:14:19 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a4-smtp.messagingengine.com [103.168.172.147]) by coreboot.org (Postfix) with ESMTP id DCAC0405B1 for ; Fri, 30 May 2025 16:12:25 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 0193B138016C; Fri, 30 May 2025 12:12:25 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-01.internal (MEProxy); Fri, 30 May 2025 12:12:25 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 30 May 2025 12:12:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1748621544; x=1748707944; bh=E8JqCGjg+R3efsorR0XnUZpeApd0AovlO+jbit72AS8=; b= SnAfYwnkj8Qs5Bodx6YKTsOI7bPzyMjQ+xFlGUaqoddJEqikCKW0LuYiG7bMklxo EJxDDQK8xZc1k4O91l8FFd8Yr3eNZpzPLUFTPNYTJ0i2nNkm5kgySu64soCE4Yva LVzQmLsQTTGVfPkS14dmOPn+dS+LTA92XexFQhZXMXiqcUH2On8Pbr8YTwwHd93Z 0qbWmyBVU+LrdBvUqJP5Jg581OuElcFW+yCRqrAiqnt7Ibs2vZdaYLxeRh03aL2f pdQVevsvmfAM1bsQdm0AhELF7XbCBcVxsvUHNNafNkzFVIck+eov1Uz2PO97ZzBP PAcV3/eFOog82FnMjGZrHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748621544; x= 1748707944; bh=E8JqCGjg+R3efsorR0XnUZpeApd0AovlO+jbit72AS8=; b=N DABAfAFPKOcu7gGFdnDe2H7BQy8fkaKZvFp5Nz/LR5Wh1+hxNvn/3JvlKGdNp5ti qYCVXYtLWe8TWoAFOGz5CpeGxZ4v/Wy4SzkpovmtmTdNKIZO/Etj4+6Vh2boOjNI LD/sMHrk0HPRzJLXoMIk26wCXWCwvvxyf4q+9xDr4yn95jDelqAzJrtvYO0Hm0gL IV7etsXa9Smd6Lj1ynHsj1mtcwrGTbS3YrxIanFKPfxGLwi6B2fzf0Jn7mCZea0l pTKlNVNXZuJ4ijBw/QfwaI/TYYHW4Y2hh4VptxETk8HX/SUYkACJANY6vaLtT5il XTTT53N/+URa2lKV8f2Uw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleegieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhm peflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtg homheqnecuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtddu udeghfeuveegffegudekjeelnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpe hmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgvrggsih hoshesshgvrggsihhoshdrohhrghdprhgtphhtthhopehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Fri, 30 May 2025 17:12:21 +0100 MIME-Version: 1.0 Message-Id: <20250530-build-v1-6-93fe220fd713@flygoat.com> References: <20250530-build-v1-0-93fe220fd713@flygoat.com> In-Reply-To: <20250530-build-v1-0-93fe220fd713@flygoat.com> To: seabios@seabios.org X-Developer-Signature: v=1; a=openpgp-sha256; l=5428; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=vRZOMJEm3B5sTOfsfIxfTJjF2RTTdZVoq+shUm3WBhw=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhgzLGw8Nezf4m6+YZfL+ypXundoqHG07r2ttrVk4Oaudz +iLwDvZjlIWBjEuBlkxRZYQAaW+DY0XF1x/kPUHZg4rE8gQBi5OAZgI1yRGhgnW/dmJs4q1Hl0q N/hpfa0/Oosv6LrvuxeO8687rzR4+Ibhn24857UTjH2lthc82//8+H8grXPHNok4XpH4ZFkPlt2 3eQA= X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Message-ID-Hash: G2ZXX4KGZ5KMPJVC5VAMOKXBFM6XLSKY X-Message-ID-Hash: G2ZXX4KGZ5KMPJVC5VAMOKXBFM6XLSKY X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH RESEND 6/7] scripts: Use python3 as python List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZM-MESSAGEID: 1748621664084116600 Content-Type: text/plain; charset="utf-8" We can't assume python is python3 on build platforms. Explictly use python3 for running those scripts. Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- Makefile | 2 +- scripts/buildrom.py | 2 +- scripts/buildversion.py | 2 +- scripts/checkrom.py | 2 +- scripts/checkstack.py | 2 +- scripts/checksum.py | 2 +- scripts/encodeint.py | 2 +- scripts/layoutrom.py | 2 +- scripts/ldnoexec.py | 2 +- scripts/readserial.py | 2 +- scripts/transdump.py | 2 +- scripts/vgafixup.py | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index ae168e212b51366df966aae11b3fd8af3f49e9e7..b41bb7cbe94bdd7510594438e2a= 452477805a908 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ CC=3D$(CROSS_PREFIX)gcc OBJCOPY=3D$(CROSS_PREFIX)objcopy OBJDUMP=3D$(CROSS_PREFIX)objdump STRIP=3D$(CROSS_PREFIX)strip -PYTHON=3Dpython +PYTHON=3Dpython3 =20 # Source files SRCBOTH=3Dmisc.c stacks.c output.c string.c block.c cdrom.c disk.c \ diff --git a/scripts/buildrom.py b/scripts/buildrom.py index 48bfc177d27f1a4eb4984f5d1a1ff12413cceb6e..a4a7b95f8d3170bf5f231e6f41e= da17953cd2134 100755 --- a/scripts/buildrom.py +++ b/scripts/buildrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Fill in checksum/size of an option rom, and pad it to proper length. # # Copyright (C) 2009 Kevin O'Connor diff --git a/scripts/buildversion.py b/scripts/buildversion.py index 8875497cb72cb26f6e438d10419c4583b61c5b64..13624ce8aa996e805e9c7cd0892= 0e2608d504869 100755 --- a/scripts/buildversion.py +++ b/scripts/buildversion.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Generate version information for a program # # Copyright (C) 2015 Kevin O'Connor diff --git a/scripts/checkrom.py b/scripts/checkrom.py index a5b15a4c2816cffecc99dc9e2da6e3d9f87f2bb6..7d73eebb67db229c4bee2c977de= e764dd7ff22cb 100755 --- a/scripts/checkrom.py +++ b/scripts/checkrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script to check a bios image and report info on it. # # Copyright (C) 2008 Kevin O'Connor diff --git a/scripts/checkstack.py b/scripts/checkstack.py index 255768aebce0341f0bb06d13973e653735aa5154..3bb58bc8d5f5e021ec1cbe2f74e= 4c6b3a641e6a9 100755 --- a/scripts/checkstack.py +++ b/scripts/checkstack.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script that tries to find how much stack space each function in an # object is using. # diff --git a/scripts/checksum.py b/scripts/checksum.py index 773fa7aa9f956385ea20e055275b481adec8b4a4..87cce60319a43b256c2689ef282= b19d6b68c2121 100755 --- a/scripts/checksum.py +++ b/scripts/checksum.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script to report the checksum of a file. # # Copyright (C) 2009 Kevin O'Connor diff --git a/scripts/encodeint.py b/scripts/encodeint.py index 0d34aee071ffea8fd7b489cfae82fcc6e6528091..e861d8156b0db440f8301dd5391= 15e739bfbadf8 100755 --- a/scripts/encodeint.py +++ b/scripts/encodeint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Encode an integer in little endian format in a file. # # Copyright (C) 2011 Kevin O'Connor diff --git a/scripts/layoutrom.py b/scripts/layoutrom.py index abebf0211fa9627cec31cce76b8d55e688445b45..a193f258123bd36e8c6bdf455af= f6584d4216efd 100755 --- a/scripts/layoutrom.py +++ b/scripts/layoutrom.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script to analyze code and arrange ld sections. # # Copyright (C) 2008-2014 Kevin O'Connor diff --git a/scripts/ldnoexec.py b/scripts/ldnoexec.py index 60bed078866363a52c573360b3426dc91af0ebc1..97e0f387c9fa88e8d3cc958922e= e90d3d93db166 100755 --- a/scripts/ldnoexec.py +++ b/scripts/ldnoexec.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script to remove EXEC flag from an ELF file # # Copyright (C) 2020 Kevin O'Connor diff --git a/scripts/readserial.py b/scripts/readserial.py index e3f56e5da57c1a97c59ab856f82fae6c2346363c..b64fe07dc9bd709d8fd56fa1123= c4e0fa2a45cd5 100755 --- a/scripts/readserial.py +++ b/scripts/readserial.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Script that can read from a serial device and show timestamps. # # Copyright (C) 2009 Kevin O'Connor diff --git a/scripts/transdump.py b/scripts/transdump.py index 665f04a000fccd9250a94357be9c16891a45c855..9877b33a2380a61138c4c6236de= c059be2e87b95 100755 --- a/scripts/transdump.py +++ b/scripts/transdump.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 =20 # This script is useful for taking the output of memdump() and # converting it back into binary output. This can be useful, for diff --git a/scripts/vgafixup.py b/scripts/vgafixup.py index 2053cd5d78e5935658e1fecec074b258ba1d75ba..01ec81496a18995197b4095217f= be25fd90b081d 100644 --- a/scripts/vgafixup.py +++ b/scripts/vgafixup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Work around x86emu bugs by replacing problematic instructions. # # Copyright (C) 2012 Kevin O'Connor --=20 Git-154) _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org From nobody Fri Dec 19 21:00:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of seabios.org designates 78.46.105.101 as permitted sender) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=flygoat.com Return-Path: Received: from coreboot.org (mail.coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1748621678171395.86401297586417; Fri, 30 May 2025 09:14:38 -0700 (PDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by coreboot.org (Postfix) with ESMTPA id 93E164073A; Fri, 30 May 2025 16:14:35 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) (fout-a4-smtp.messagingengine.com [103.168.172.147]) by coreboot.org (Postfix) with ESMTP id D2E06405C7 for ; Fri, 30 May 2025 16:12:26 +0000 (UTC) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id DA3851380185; Fri, 30 May 2025 12:12:25 -0400 (EDT) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by phl-compute-08.internal (MEProxy); Fri, 30 May 2025 12:12:25 -0400 Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) 30 May 2025 12:12:25 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1748621545; x=1748707945; bh=BLvclYFeo7cbVFiqDJ8IhvkRUfMT+J10eIUtN6MiP9o=; b= sSqeokg1eJHvoZuECeLXEialvE9bzQfbTv/riBGGC4DNbArNN3EU/n8UvGJ1yEm3 dkpeejt9wsXtZeuOGf2t32EuWESlfwuFhJDFTlmoYUbOKDxYKzs/yZoMSODjrIqr XcyLUTBImayyXEQYwAB77Qh+q4f4n2ETJ7EQ0SlP/5zqvH8FiQkiuYbtpvp6FPIE ABVDGDal7ONbvq69AlYwboNef/LA68L+vkxXtC4c2uWx/hwGekbFdkzBxNMg6qF4 wcNn/glXoEvI9kTa8deAck/07n4dzGuPC7pQxYyyp+hj9jgtsng7BbKJIbmayIrO AbLuoyy3D95LGUqYXW7syQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1748621545; x= 1748707945; bh=BLvclYFeo7cbVFiqDJ8IhvkRUfMT+J10eIUtN6MiP9o=; b=q ADMwSXohMmC1flKJYOxdyg1aw8DfAvG8q5pJs/OPI3H+3Hckuo2mupHKtNb1bg0S kat8u8GI0U04QG+bwcqTTEjFhjDkXzBhFosmqneve/L6wN6gCUKj/3yIo9WqqC5k 8Kv2EFW2ml1pXc1xBOw1Md8iLgco1kq4pG/ce7ZF853uNLDVCK9Slbef+0tUUrSA 6WU68hVUblt/9n/1t85/xBEWeBX1I9QL7HLCX4Rh228isShKw24I73B2DW8lU3tA S6C/eiD9JlqjxuIhMVRYB/fTgB+3/YvXQzqjJGK4I15KlAaUhKvx6mmHTide+xva YawL+C2pU68qEslLr/Arg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleegieculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdejnecuhfhrohhm peflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtg homheqnecuggftrfgrthhtvghrnhepvdekiefhfeevkeeuveetfeelffekgedugefhtddu udeghfeuveegffegudekjeelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepjhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomhdpnhgs pghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepshgvrggsih hoshesshgvrggsihhoshdrohhrghdprhgtphhtthhopehjihgrgihunhdrhigrnhhgsehf lhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail From: Jiaxun Yang Date: Fri, 30 May 2025 17:12:22 +0100 MIME-Version: 1.0 Message-Id: <20250530-build-v1-7-93fe220fd713@flygoat.com> References: <20250530-build-v1-0-93fe220fd713@flygoat.com> In-Reply-To: <20250530-build-v1-0-93fe220fd713@flygoat.com> To: seabios@seabios.org X-Developer-Signature: v=1; a=openpgp-sha256; l=3236; i=jiaxun.yang@flygoat.com; h=from:subject:message-id; bh=EiHREBO/Mb4llPV2DjVinrWvMKchOrieVmHGcDILKsY=; b=owGbwMvMwCXmXMhTe71c8zDjabUkhgzLGw8bAoV3dWgc/7Ts+I5bT3h2irpI8u2yOfJ7auO78 865dw7c6ShlYRDjYpAVU2QJEVDq29B4ccH1B1l/YOawMoEMYeDiFICJCHgwMkwQP+rTydulvkv4 dPLZ0+94FHpL+v6q+drF/7Rk+WPx9g7D/+p7vIt+76/mSa15r/RHUrkxPJTZ5+p0XUGeB/efHZm WwwQA X-Developer-Key: i=jiaxun.yang@flygoat.com; a=openpgp; fpr=980379BEFEBFBF477EA04EF9C111949073FC0F67 Message-ID-Hash: UX5I6AGOWNQACJR4RJCPQNJALDMTB5DN X-Message-ID-Hash: UX5I6AGOWNQACJR4RJCPQNJALDMTB5DN X-MailFrom: jiaxun.yang@flygoat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jiaxun Yang X-Mailman-Version: 3.3.11b1 Precedence: list Subject: [SeaBIOS] [PATCH RESEND 7/7] Clear clang warnings List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org; auth=pass smtp.auth=mailman@coreboot.org smtp.mailfrom=seabios-bounces@seabios.org X-Spamd-Bar: ---- X-ZM-MESSAGEID: 1748621680033116600 Content-Type: text/plain; charset="utf-8" Although we are not going to have a clang build any time soon, those warnings generally make sense. ./src/hw/usb-ohci.c:192:13: warning: logical not is only applied to the lef= t hand side of this bitwise operator [-Wlogical-not-parentheses] 192 | if (! status & OHCI_HCR) ./src/util.h:217:53: warning: attribute declaration must precede definition= [-Wignored-attributes] 217 | extern struct bios_config_table_s BIOS_CONFIG_TABLE __aligned(1); | ^ In file included from out/ccode32flat.o.tmp.c:83: ./src/hw/virtio-blk.c:56:9: warning: misleading indentation; statement is n= ot part of the previous 'while' [-Wmisleading-indentation] 56 | vring_get_buf(vq, NULL); Signed-off-by: Jiaxun Yang --- src/hw/serialio.c | 1 + src/hw/usb-ohci.c | 2 +- src/hw/virtio-blk.c | 2 +- src/std/LegacyBios.h | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hw/serialio.c b/src/hw/serialio.c index fa663b9949191d930c395cea9498c103b0884027..985481ae52479879bd946616590= c067502d799a4 100644 --- a/src/hw/serialio.c +++ b/src/hw/serialio.c @@ -39,6 +39,7 @@ serial_debug_read(u8 offset) ASSERT32FLAT(); return readb((void*)CONFIG_DEBUG_SERIAL_MEM_ADDRESS + 4*offset); } + return 0; } =20 // Setup the debug serial port for output. diff --git a/src/hw/usb-ohci.c b/src/hw/usb-ohci.c index 90f60e6452957552412d2aa9958f00141473437a..0fe8ea9e5d36468516e60830510= 4da1e2129be70 100644 --- a/src/hw/usb-ohci.c +++ b/src/hw/usb-ohci.c @@ -189,7 +189,7 @@ start_ohci(struct usb_ohci_s *cntl, struct ohci_hcca *h= cca) writel(&cntl->regs->cmdstatus, OHCI_HCR); for (;;) { u32 status =3D readl(&cntl->regs->cmdstatus); - if (! status & OHCI_HCR) + if (!(status & OHCI_HCR)) break; if (timer_check(end)) { warn_timeout(); diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c index 137a2c3c75579beae69611e248002d48f947fdac..351692e22e6ebaf63626348e47a= 0f0533617325e 100644 --- a/src/hw/virtio-blk.c +++ b/src/hw/virtio-blk.c @@ -53,7 +53,7 @@ virtio_blk_op_one_segment(struct virtiodrive_s *vdrive, usleep(5); =20 /* Reclaim virtqueue element */ - vring_get_buf(vq, NULL); + vring_get_buf(vq, NULL); =20 /** ** Clear interrupt status register. Avoid leaving interrupts stuck diff --git a/src/std/LegacyBios.h b/src/std/LegacyBios.h index 5170c37865fc573d54a06c8b1140a353721daec7..0f3f647bf0b1e5162353d6a2ca4= 80d1f1c63bdae 100644 --- a/src/std/LegacyBios.h +++ b/src/std/LegacyBios.h @@ -285,7 +285,7 @@ typedef enum { /// code is read/write. /// Input: /// AX =3D Compatibility16PrepareToBoot - /// ES:BX =3D Pointer to EFI_TO_COMPATIBILITY16_BOOT_TABLE structure =20 + /// ES:BX =3D Pointer to EFI_TO_COMPATIBILITY16_BOOT_TABLE structure /// Return: /// AX =3D Returned status codes /// @@ -982,4 +982,6 @@ typedef struct { UINT16 SecondaryBusMaster; ///< The secondary= device bus master I/O base. } EFI_LEGACY_INSTALL_PCI_HANDLER; =20 +#pragma pack() + #endif --=20 Git-154) _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org