Skip to content

Commit 458ba4c

Browse files
committed
Platforms: add support for HTC 7 PRO
1 parent d97c16f commit 458ba4c

File tree

5 files changed

+90
-2
lines changed

5 files changed

+90
-2
lines changed
1.26 KB
Binary file not shown.

Platforms/HtcGold/HtcGoldPkg.dsc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#
2+
# Copyright (c) 2018, Linaro Limited. All rights reserved.
3+
#
4+
# This program and the accompanying materials
5+
# are licensed and made available under the terms and conditions of the BSD License
6+
# which accompanies this distribution. The full text of the license may be found at
7+
# http://opensource.org/licenses/bsd-license.php
8+
#
9+
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11+
#
12+
13+
################################################################################
14+
#
15+
# Defines Section - statements that will be processed to create a Makefile.
16+
#
17+
################################################################################
18+
[Defines]
19+
PLATFORM_NAME = HtcGold
20+
PLATFORM_GUID = 28f1a3bf-193a-47e3-a7b9-5a435eaab2ee
21+
PLATFORM_VERSION = 0.1
22+
DSC_SPECIFICATION = 0x00010019
23+
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
24+
SUPPORTED_ARCHITECTURES = ARM
25+
BUILD_TARGETS = DEBUG|RELEASE
26+
SKUID_IDENTIFIER = DEFAULT
27+
FLASH_DEFINITION = Platforms/$(PLATFORM_NAME)/$(PLATFORM_NAME)Pkg.fdf
28+
29+
DEFINE USE_SCREEN_FOR_SERIAL_OUTPUT = TRUE
30+
31+
!include QSD8250Pkg/CommonDsc.dsc.inc
32+
33+
[BuildOptions.common]
34+
GCC:*_*_ARM_CC_FLAGS = -DKP_LED_ENABLE_METHOD=3 -DDEVICETYPE=2 # Gpio
35+
36+
[PcdsFixedAtBuild.common]
37+
# System Memory (243MB for now)
38+
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x20000000
39+
gArmTokenSpaceGuid.PcdSystemMemorySize|0x0E800000
40+
41+
gQSD8250PkgTokenSpaceGuid.PcdMipiFrameBufferAddress|0x02A00000
42+
43+
# SMBIOS
44+
gQSD8250PkgTokenSpaceGuid.PcdSmbiosSystemModel|"HTC 7 PRO"
45+
gQSD8250PkgTokenSpaceGuid.PcdSmbiosSystemRetailModel|"HTC GOLD"

Platforms/HtcGold/HtcGoldPkg.fdf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[FD.QSD8250_UEFI]
2+
BaseAddress = 0x2C000000|gArmTokenSpaceGuid.PcdFdBaseAddress # The base address of the Firmware in NOR Flash.
3+
Size = 0x00100000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
4+
ErasePolarity = 1
5+
6+
# This one is tricky, it must be: BlockSize * NumBlocks = Size
7+
BlockSize = 0x00001000
8+
NumBlocks = 0x100
9+
10+
################################################################################
11+
#
12+
# Following are lists of FD Region layout which correspond to the locations of different
13+
# images within the flash device.
14+
#
15+
# Regions must be defined in ascending order and may not overlap.
16+
#
17+
# A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
18+
# the pipe "|" character, followed by the size of the region, also in hex with the leading
19+
# "0x" characters. Like:
20+
# Offset|Size
21+
# PcdOffsetCName|PcdSizeCName
22+
# RegionType <FV, DATA, or FILE>
23+
#
24+
################################################################################
25+
26+
# 512 bytes of configuration header & 8 bytes of image header
27+
0x00000000|0x00100000
28+
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
29+
FV = FVMAIN_COMPACT
30+
31+
!include QSD8250Pkg/QSD8250Pkg.fdf
32+
33+
// Mainline device tree blob
34+
FILE FREEFORM = 25462CDA-221F-47DF-AC1D-259CFAA4E326 {
35+
SECTION RAW = Platforms/HtcGold/FdtBlob/qcom-qsd8250-htc-gold.dtb
36+
}
37+
38+
!include QSD8250Pkg/CommonFv.fdf.inc
39+
!include QSD8250Pkg/CommonFdf.fdf.inc

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
export PACKAGES_PATH=$PWD/../edk2:$PWD/../edk2-platforms:$PWD
55
export WORKSPACE=$PWD/workspace
66

7-
AvailablePlatforms=("Leo" "Schubert" "All")
7+
AvailablePlatforms=("Leo" "Schubert" "Gold" "All")
88
IsValid=0
99

1010
while getopts d: flag
@@ -71,7 +71,7 @@ if [ $DEVICE == 'All' ]; then
7171
else
7272
echo "Building uefi for $DEVICE"
7373
GCC_ARM_PREFIX=arm-none-eabi- build -s -n 0 -a ARM -t GCC -p Platforms/Htc${DEVICE}/Htc${DEVICE}Pkg.dsc
74-
74+
mkdir "ImageResources/$DEVICE"
7575
./build_boot_shim.sh
7676
./build_boot_images.sh $DEVICE
7777
fi

build_boot_images.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ if [ $1 == 'Leo' ]; then
2020
elif [ $1 == 'Schubert' ]; then
2121
cat BootShim/BootShim.bin workspace/Build/HtcSchubert/DEBUG_GCC/FV/QSD8250_UEFI.fd >>ImageResources/$1/bootpayload.bin
2222

23+
mkbootimg --kernel ImageResources/$1/bootpayload.bin --base 0x20000000 --kernel_offset 0x00008000 -o ImageResources/$1/uefi.img
24+
elif [ $1 == 'Gold' ]; then
25+
cat BootShim/BootShim.bin workspace/Build/HtcGold/DEBUG_GCC/FV/QSD8250_UEFI.fd >>ImageResources/$1/bootpayload.bin
26+
2327
mkbootimg --kernel ImageResources/$1/bootpayload.bin --base 0x20000000 --kernel_offset 0x00008000 -o ImageResources/$1/uefi.img
2428
else
2529
echo "Bootimages: Invalid platform"

0 commit comments

Comments
 (0)