## @file\r
# This file is used to create a database used by build tool\r
#\r
-# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>\r
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
EdkLogger.error('build', FORMAT_INVALID, 'No Sku ID name',\r
File=self.MetaFile, Line=Record[-1])\r
Pattern = re.compile('^[1-9]\d*|0$')\r
- if Pattern.match(Record[0]) == None:\r
- EdkLogger.error('build', FORMAT_INVALID, "The format of the Sku ID number is invalid. The correct format is '{(0-9)} {(1-9)(0-9)+}'",\r
+ HexPattern = re.compile(r'0[xX][0-9a-fA-F]+$')\r
+ if Pattern.match(Record[0]) == None and HexPattern.match(Record[0]) == None:\r
+ EdkLogger.error('build', FORMAT_INVALID, "The format of the Sku ID number is invalid. It only support Integer and HexNumber",\r
File=self.MetaFile, Line=Record[-1])\r
if not IsValidWord(Record[1]):\r
EdkLogger.error('build', FORMAT_INVALID, "The format of the Sku ID name is invalid. The correct format is '(a-zA-Z0-9_)(a-zA-Z0-9_-.)*'",\r
File=self.MetaFile, Line=Record[-1])\r
- self._SkuIds[Record[1].upper()] = (Record[0], Record[1].upper(), Record[2].upper())\r
+ self._SkuIds[Record[1].upper()] = (str(self.ToInt(Record[0])), Record[1].upper(), Record[2].upper())\r
if 'DEFAULT' not in self._SkuIds:\r
self._SkuIds['DEFAULT'] = ("0","DEFAULT","DEFAULT")\r
if 'COMMON' not in self._SkuIds:\r