From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30055.outbound.protection.outlook.com [40.107.3.55]) by dpdk.org (Postfix) with ESMTP id 8595D9187 for ; Thu, 25 May 2017 15:19:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=sqSrSCj+1MTPF2I/fD2MJDn4yQVxFit77aaj6v+FKes=; b=oAis3sElop76mXFC+sBB4E8c2U2yecv43xHpAHYWSrIVSSQSKBJrzNbP/NB8Ml6uodNN7VdVOchfdfRqScmFO5malSHe7Ir21d54almPO/ic+ppMZnmEKRuqCC+SLD8h0w8MdEB5WUM828F5jArwky407uOT6f5uIvbwLA/PTgk= Received: from VI1PR0401MB2464.eurprd04.prod.outlook.com (10.168.64.147) by VI1PR0401MB2461.eurprd04.prod.outlook.com (10.168.64.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Thu, 25 May 2017 13:19:40 +0000 Received: from VI1PR0401MB2464.eurprd04.prod.outlook.com ([10.168.64.147]) by VI1PR0401MB2464.eurprd04.prod.outlook.com ([10.168.64.147]) with mapi id 15.01.1101.021; Thu, 25 May 2017 13:19:39 +0000 From: Shreyansh Jain To: "Hunt, David" CC: "dev@dpdk.org" , "thomas@monjalon.net" Thread-Topic: [PATCH v1 2/2] mk: add sensible default target with defconfig Thread-Index: AQHS1Vd1sf0wTAd9wEaqhE4p9a5LoqIFBl8w Date: Thu, 25 May 2017 13:19:36 +0000 Deferred-Delivery: Thu, 25 May 2017 13:18:37 +0000 Message-ID: References: <1495535304-159542-1-git-send-email-david.hunt@intel.com> <1495535304-159542-3-git-send-email-david.hunt@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0401MB2461; 7:TDXIt/aF0e7ApA4QW67gmjxo60Y9V9oJYza/UY8Pyed0cHcjWi/gR762QByfVl48ltPRn/tlYiqNGwYKQDdSEJDS+q0l/YOKv8zBwyOFAhyhPHJoRvjcu81ndB9I2YBofBvMKuIc07AuWBtCzKqLsAGbw2eI4DiehjPadnssMzlNbMoEyVXs1pOVawga88HXUfGmZU849R3v9c477KWRBp1mM/fudn/gGBrAiS+aikucaWb/jIsfI1MPt1EgKiLTofCpv7LXONoYJp87LLiCdJzdY+Vfn92dIYcKePjUByW0DE+CiDt/+v2hjUuDDYAEdsTGAFH+ZwX/e/ag1+1igg== x-ms-traffictypediagnostic: VI1PR0401MB2461: x-ms-office365-filtering-correlation-id: 3338d2fe-144e-4251-e52f-08d4a370b2d7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081); SRVR:VI1PR0401MB2461; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123558100)(20161123564025)(6072148); SRVR:VI1PR0401MB2461; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2461; x-forefront-prvs: 0318501FAE x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39400400002)(39850400002)(39860400002)(39840400002)(39410400002)(39450400003)(377454003)(24454002)(8676002)(99286003)(33656002)(81166006)(6666003)(6246003)(86362001)(55016002)(478600001)(229853002)(2950100002)(5660300001)(9686003)(8936002)(189998001)(561944003)(6916009)(66066001)(4326008)(76176999)(3280700002)(6506006)(3660700001)(6436002)(110136004)(25786009)(53546009)(54356999)(2900100001)(7696004)(77096006)(122556002)(6116002)(7736002)(102836003)(3846002)(53936002)(38730400002)(74316002)(2906002)(50986999)(305945005)(93886004)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2461; H:VI1PR0401MB2464.eurprd04.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 25 May 2017 13:19:39.6959 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2461 Subject: Re: [dpdk-dev] [PATCH v1 2/2] mk: add sensible default target with defconfig X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 May 2017 13:19:42 -0000 Hi David, > -----Original Message----- > From: Hunt, David [mailto:david.hunt@intel.com] > Sent: Thursday, May 25, 2017 6:34 PM > To: Shreyansh Jain > Cc: dev@dpdk.org; thomas@monjalon.net > Subject: Re: [PATCH v1 2/2] mk: add sensible default target with defconfi= g >=20 > Hi Shreyansh, >=20 > Thanks for your comments. More thoughts below. >=20 > On 24/5/2017 7:10 AM, Shreyansh Jain wrote: > > Hello David, > > > > On Tuesday 23 May 2017 03:58 PM, David Hunt wrote: > >> Users can now use 'make defconfig' to generate a configuration using > >> the most appropriate defaults for the current machine. > >> > >> > >> arch taken from uname -m > >> machine defaults to native > >> execenv is taken from uname, Linux=3Dlinuxapp, otherwise bsdapp > >> toolchain is taken from $CC -v to see which compiler to use > >> > >> Signed-off-by: David Hunt > >> --- > >> mk/rte.sdkconfig.mk | 15 ++++++++++++--- > >> mk/rte.sdkroot.mk | 4 ++-- > >> 2 files changed, 14 insertions(+), 5 deletions(-) > >> > >> diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk > >> index 1f2d6bd..4f30d56 100644 > >> --- a/mk/rte.sdkconfig.mk > >> +++ b/mk/rte.sdkconfig.mk > >> @@ -60,16 +60,25 @@ showconfigs: > >> > >> .PHONY: notemplate > >> notemplate: > >> - @printf "No template specified. " > >> - @echo "Use T=3Dtemplate among the following list:" > >> + @printf "No template specified. Use 'make defconfig' or " > >> + @echo "use T=3Dtemplate from the following list:" > >> @$(MAKE) -rR showconfigs | sed 's,^, ,' > >> > >> + > >> +.PHONY: defconfig > >> +defconfig: > >> + @$(MAKE) config T=3D$(shell uname -m)-native-$(shell uname | \ > > > > The idea to have 'make defconfig' do the works looks great to me. > > I am just worried about the above line - it wouldn't allow > > configurations like > > arm64-dpaa2-linuxapp-gcc or arm64-armv8a-linuxapp-gcc > > Basically, having the MACHINE default to 'native' would not be right > > in all cases. > > > > But, I don't have a better idea about how to detect this automatically. > > Or, we might use RTE_MACHINE someway. > > >=20 > Might I suggest that we default to armv8a for the defconfig in this > case? Would that be good enough? If you need something more specific, > then use the normal make config T=3D > Also, if you're using an unknown variant, you can always set your > RTE_TARGET, as per the other changes in the patch. Yes. It is futile to find a way to accommodate all types of MACHINEs. This change is targeted for generalizing the config detection, and generic it should remain. >=20 > A possible proposal for a v2 patch could be: >=20 > uname -m Output Target > -------- ------------------ > aarch64 arm64-armv8a-... > armv7l arm-armv7a-... > ppc64 ppc_64-power8-... (from wikipedia uname page, could ppc user > confirm this for me?) > x86_64 x86_64-native-... > i686 i686-native-... >=20 > Something along the lines of: >=20 > .PHONY: defconfig > defconfig: > @$(MAKE) config T=3D$(shell \ > uname -m | awk '{ \ > if ($$0 =3D=3D "aarch64") { \ > print "arm64-armv8a"} \ > else if ($$0 =3D=3D "armv7l") { \ > print "arm-armv7a"} \ > else if ($$0 =3D=3D "ppc64") { \ > print "ppc_64-power8"} \ > else { \ > printf "%s-native", $$0} }')-$(shell \ > uname | awk '{ \ > if ($$0 =3D=3D "Linux") { \ > print "linuxapp"} \ > else { \ > print "bsdapp"} }')-$(shell \ > ${CC} -v 2>&1 | \ > grep " version " | cut -d ' ' -f 1) >=20 > That might make a reasonable start in the absence of a reliable method > of detecting Xgene/ThunderX/DPAA2 variants. =20 Sounds reasonable to me. We can probably improve the above check in future as and more definitive way of detecting machine are identified. I can ack the series if you can push the above change. >=20 > Regards, > Dave. >=20 >=20 >=20 - Shreyansh