From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web12.7645.1592977734265622008 for ; Tue, 23 Jun 2020 22:48:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=tuXYms0A; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: bob.c.feng@intel.com) IronPort-SDR: qTTl6Z15nxgN+UWebcPi+8o9U+0slwwn9nzlTAmg7oTvbaW/jcv0zAmMpl87FiDpJ0T+3OQLnb c1xUDHkvyeOg== X-IronPort-AV: E=McAfee;i="6000,8403,9661"; a="162426897" X-IronPort-AV: E=Sophos;i="5.75,274,1589266800"; d="scan'208";a="162426897" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2020 22:48:53 -0700 IronPort-SDR: sOc5yyZ8r558vR0urO4gVPpGa8oC6zXZ/nMZn/JF+la/jz9q2lx/BR+GhDJ4TsNfrK+fsXB5zH jlCqvCmK0bDg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,274,1589266800"; d="scan'208";a="279364067" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga006.jf.intel.com with ESMTP; 23 Jun 2020 22:48:53 -0700 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 23 Jun 2020 22:48:53 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX111.amr.corp.intel.com (10.22.240.12) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 23 Jun 2020 22:48:53 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.176) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 23 Jun 2020 22:48:51 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BNGmyvLD2uQoikFCw5OIyO6wgzBFyYWtWrg9FWozB2GYvGSxuEBzs+wLnhUJcQbNR2ZSNzSF3LVRWTgv2TcyRLrm7Ryo/QROgzV56MwtdkJxsUtTGFm/ItiB7x0+2VD+zI61mssslih6zatKlg/K0DiBF5oURJKFUd6E7Apfrh7jqqbOYOyCTe1n6ZCNr/Y/659wVK1wa392zUytaFR1op0DLRKgMGr1+NTRECcUuwdqmb56PhUzadPNZF0dGAgAn3iqZWQF7AEeK5lL7z4NzkWKJX9wuypRp9D/aWZMczN3iIy+DadirM+Y+PjXq8KSok6AxcujXpcnumscv3V+IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y5VS9T6vDEUYCRK8PV2+GOUjBvqIUMYpNZE8eSwIQTQ=; b=efZn/pqgd6rqm22DoacMT6/TO+DgdTyYdxUEYqaWGj9MqcfQykf9AacHhU6+W84phokzMSlT1t4kmEW/vrrDNwq/j0ZdL1smVhMlklrAJm18ybHZztOiHQSSKqmSvx/w8TUV63J7wF24wfvP3pumPJD4be2WuZ5P6OyJaU//1ODpRuWg2lVHVNcQ3YpJK98wzMvxK7JgNAUzK1ZyVI2qnx9xsOX/YLyFZC3t7unLSSnqPoVVCHq3QBeF8OcDzjyxpUwM8w8VdFBthba3ZyKs75V7oZq6o5uJQv2Ghy36G5j7Mhn5l+d2+6eVti2qnaKNfJv3xRvNDcGJCamdq7Dabg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y5VS9T6vDEUYCRK8PV2+GOUjBvqIUMYpNZE8eSwIQTQ=; b=tuXYms0A7VNpisxSTeU0dEyuOOq2qaYCT76XPmxBSx0ecLEHCrS1Q7ZBg/BUxgKVWeLx6/XckzMtLlTKHl4I6Fv52CO8xpghAzSsb4FQaC7W9K7rwVXqHDaXspo75zUQH/BsTLvLVT45EAd+Zg9qbYQbuxpCY7M77lOngpKB5Ak= Received: from BN6PR11MB0068.namprd11.prod.outlook.com (2603:10b6:405:69::17) by BN6PR11MB1955.namprd11.prod.outlook.com (2603:10b6:404:100::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Wed, 24 Jun 2020 05:48:50 +0000 Received: from BN6PR11MB0068.namprd11.prod.outlook.com ([fe80::6870:82d3:5bde:4153]) by BN6PR11MB0068.namprd11.prod.outlook.com ([fe80::6870:82d3:5bde:4153%6]) with mapi id 15.20.3109.027; Wed, 24 Jun 2020 05:48:50 +0000 From: "Bob Feng" To: PierreGondois , "devel@edk2.groups.io" CC: "sami.mujawar@arm.com" , "tomas.pilar@arm.com" , "Gao, Liming" , "nd@arm.com" Subject: Re: [PATCH v2 2/4] BaseTools: Rename AmlToHex script to AmlToC Thread-Topic: [PATCH v2 2/4] BaseTools: Rename AmlToHex script to AmlToC Thread-Index: AQHWRXykTM476qzz/EK7Jyfj1Nl3yqjnSz9w Date: Wed, 24 Jun 2020 05:48:50 +0000 Message-ID: References: <20200618142713.146412-1-pierre.gondois@arm.com> <20200618142713.146412-3-pierre.gondois@arm.com> In-Reply-To: <20200618142713.146412-3-pierre.gondois@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2fa33035-76e7-4f02-167c-08d818024557 x-ms-traffictypediagnostic: BN6PR11MB1955: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-forefront-prvs: 0444EB1997 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6DwBdhNq4/qDtuKMVjHOcR3cOibW5i9JvV41d9DYw/05LHvUlIozl0MvIdkp1oxlEuIhTlkFD0Yg/sbJhKB3PP5Nj9UZkbwtjd/HVIsm2ldHiVceiRiSERZPURdsCxE54Jcvgs8jFsh0kHE0gFXMXhpkkx99jsd3B7nr+lZ9znTdiLGnxCAMOXS6WXQV7S2IY+GHf0YTZAz//OM7lgC9WttNFjKPPvTtYHQq2w9qnTxnNXVZ6vatt/gDeU6Jfc9dwO/Cu8g8wP5u2rROM24LXbdTNWFLIaL8nNjsqB4Q48Q703RI1D9d3jaMW46SEV3lrzha8fS0IGi3ruCNw96NSXD+m0o5Lde82guXaENnn2mWdwGKeOJB6WvRH9wUHFdHrxTke4HESfykT7NwFVkJ/A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6PR11MB0068.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(6029001)(4636009)(136003)(376002)(346002)(39860400002)(396003)(366004)(66556008)(66476007)(8936002)(6506007)(64756008)(66446008)(316002)(76116006)(110136005)(8676002)(66946007)(5660300002)(54906003)(55016002)(9686003)(2906002)(71200400001)(478600001)(7696005)(186003)(4326008)(53546011)(52536014)(26005)(86362001)(83380400001)(966005)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: /hbwuYkDKXbDwm6Vgj4RyG/u1CSbZbuvZlmiVR6kvWLubOD+kEKHh9ix3tQeMJwpwFeI9YM4bXdW5pNC7XT2gy86EDI9k20/WO6M4/zmoaBYgA4O0MDhNka3Xjc7l2U4NQ2UmmPxw+nYPRWH5Qqj+9+hpLwnxh+deB30t/OesjyysVQQSWvxlIF6lfGL5I98lXqiYiPuSNCgS3Hhy0BX2gYT9fp7smG3N1vte/59b6bhJZ2W81o7yeWj2WXeJb/BPet4c7U2qOEZySkHugBrmJLDssV66FdYcK7sxG8mO89GEhgQOy18MW++SB3bfb1bBPfbS+fLs5zyoEgk2/oWEr/8Wi26G2UI0U30fV0FZugTL+s4srax6A+UVIAzUOWGTcNZRhM5dbvXTN7BFeWSB/LkwNjabkMQ6gwc31gdhhQMuRFGLzSI55yJwGFmMo8NgcljVtrBTNx+DQtnOUHnxV37LP0CIubKDdX0/NYpk0QbxhUiwJgehrYxLhITl2Q/ MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2fa33035-76e7-4f02-167c-08d818024557 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jun 2020 05:48:50.4102 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: RzjTmgHg7OkOnDVw6cWPtkguCfDcWEdcD5lmpj3MYILanjJ3GUDnUplTsWczBTZryEoUsxaMFlf7EBEMP9mxjg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1955 Return-Path: bob.c.feng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Pierre, The commit message should not have more than one Signed-off-by. Use of Suggested-by may be more appropriate here. Thanks, Bob -----Original Message----- From: PierreGondois =20 Sent: Thursday, June 18, 2020 10:27 PM To: devel@edk2.groups.io Cc: Pierre Gondois ; sami.mujawar@arm.com; tomas.pi= lar@arm.com; Feng, Bob C ; Gao, Liming ; nd@arm.com Subject: [PATCH v2 2/4] BaseTools: Rename AmlToHex script to AmlToC From: Pierre Gondois The AmlToHex script and Posix/WindowsLike wrappers convert an AML file to a= .hex file, containing a C array storing AML bytecode. This ".hex" file can= then be included in a C file, allowing to access the AML bytecode from thi= s C file. The EDK2 build system doesn't allow to a depict dependency orders between f= iles of different languages. For instance, in a module containing a ".c" fi= le and a ".asl", the ".c" file may or may not be built prior to the ".asl" file. This prevents any inclusion of a generated ".hex" in a ".c" file since this= later ".hex" file may or may not have been created yet. This patch renames the script as AmlToC. It is posted as a separate patch t= o prevent git from seeing the renaming as a deletion plus addition of a new= file. The ending line of the posix-like bin-wrapper script has also been correcte= d. This is a first step toward generating a C file containing the AML bytecode= from an ASL file. This C file will then be handled by the EDK2 build syste= m to generate an object file. Thus, no file inclusion will be required anymore. The C file requiring the = AML bytecode as a C array, and the ASL file, will be compiled independently= . The C array must be defined as an external symbol. The linker is resolvin= g the reference to the C array symbol. To summarize, the flow goes as: -1. ASL file is compiled to AML; -2. AML file is copied to a ".amli" intermediate file; -3. EDK2 build sys= tem applies the rule relevant to ".amli" files. This is, calling the "AmlToC" script, generating a C file from the ".amli" file; -4. EDK2 build system applies the rule relevant to C files. This is creating an object file. -5. EDK2 build system links the object file containing the AML bytecode with the object file requiring it. Signed-off-by: Pierre Gondois Signed-off-by: Tomas Pilar --- The changes can be seen at https://github.com/PierreARM/edk2/commits/pg/803= _Compile_AML_bytecode_array_into_OBJ_file_v2 Notes: Notes: v1: - Rename AmlToHex scripts to AmlToC, and change line endings of the PosixLike bin-wrapper. [Pierre] v2: - No modification. [Pierre] BaseTools/BinWrappers/PosixLike/{AmlToHex =3D> AmlToC} | 28 = ++++++++++---------- BaseTools/BinWrappers/WindowsLike/{AmlToHex.bat =3D> AmlToC.bat} | 0 BaseTools/Source/Python/{AmlToHex/AmlToHex.py =3D> AmlToC/AmlToC.py} | 0 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/BaseTools/BinWrappers/PosixLike/AmlToHex b/BaseTools/BinWrappe= rs/PosixLike/AmlToC similarity index 97% rename from BaseTools/BinWrappers/PosixLike/AmlToHex rename to BaseTools/BinWrappers/PosixLike/AmlToC index 9fb68299e4c67d1f332cd883fd348a896f1bdc50..1dd28e966288f6ea4fc52d42e2d= c7b1f74226c23 100755 --- a/BaseTools/BinWrappers/PosixLike/AmlToHex +++ b/BaseTools/BinWrappers/PosixLike/AmlToC @@ -1,14 +1,14 @@ -#!/usr/bin/env bash -#python `dirname $0`/RunToolFromSource.py `basename $0` $* - -# If a ${PYTHON_COMMAND} command is available, use it in preference to pyt= hon -if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then - python_exe=3D${PYTHON_COMMAND} -fi - -full_cmd=3D${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028= for a discussion of why $0 is not a good choice here -dir=3D$(dirname "$fu= ll_cmd") -exe=3D$(basename "$full_cmd") - -export PYTHONPATH=3D"$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}= " -exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" "$@" +#!/usr/bin/env bash +#python `dirname $0`/RunToolFromSource.py `basename $0` $* + +# If a ${PYTHON_COMMAND} command is available, use it in preference to=20 +python if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then + python_exe=3D${PYTHON_COMMAND} +fi + +full_cmd=3D${BASH_SOURCE:-$0} # see=20 +http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is=20 +not a good choice here dir=3D$(dirname "$full_cmd") exe=3D$(basename=20 +"$full_cmd") + +export PYTHONPATH=3D"$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}= " +exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" "$@" diff --git a/BaseTools/BinWrappers/WindowsLike/AmlToHex.bat b/BaseTools/Bin= Wrappers/WindowsLike/AmlToC.bat similarity index 100% rename from BaseTools/BinWrappers/WindowsLike/AmlToHex.bat rename to BaseTools/BinWrappers/WindowsLike/AmlToC.bat diff --git a/BaseTools/Source/Python/AmlToHex/AmlToHex.py b/BaseTools/Sourc= e/Python/AmlToC/AmlToC.py similarity index 100% rename from BaseTools/Source/Python/AmlToHex/AmlToHex.py rename to BaseTools/Source/Python/AmlToC/AmlToC.py -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'