Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Added build variant for 8Gb RAM model
Browse files Browse the repository at this point in the history
  • Loading branch information
map220v committed Feb 12, 2022
1 parent 4388acb commit e57eaab
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Build Script
/uefi.img
/boot-a72q.img
/boot-a72q*.img
/ramdisk
/workspace

Expand Down
16 changes: 0 additions & 16 deletions GalaxyA72/GalaxyA72.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,6 @@
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#

################################################################################
#
# Defines Section - statements that will be processed to create a Makefile.
#
################################################################################
[Defines]
PLATFORM_NAME = GalaxyA72
PLATFORM_GUID = 28f1a3bf-193a-47e3-a7b9-5a435eaab2ee
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010019
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = GalaxyA72/GalaxyA72.fdf

!include GalaxyA72/CommonDsc.dsc.inc

[LibraryClasses.common]
Expand Down
16 changes: 16 additions & 0 deletions GalaxyA72/GalaxyA72_6G.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Defines]
PLATFORM_NAME = GalaxyA72
PLATFORM_GUID = 28f1a3bf-193a-47e3-a7b9-5a435eaab2ee
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010019
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = GalaxyA72/GalaxyA72.fdf

!include GalaxyA72/GalaxyA72.dsc

[PcdsFixedAtBuild.common]
# System Memory (6GB)
gArmTokenSpaceGuid.PcdSystemMemorySize|0x180000000
19 changes: 19 additions & 0 deletions GalaxyA72/GalaxyA72_8G.dsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[Defines]
PLATFORM_NAME = GalaxyA72_8G
PLATFORM_GUID = 28f1a3bf-193a-47e3-a7b9-5a435eaab2ee
PLATFORM_VERSION = 0.1
DSC_SPECIFICATION = 0x00010019
OUTPUT_DIRECTORY = Build/$(PLATFORM_NAME)
SUPPORTED_ARCHITECTURES = AARCH64
BUILD_TARGETS = DEBUG|RELEASE
SKUID_IDENTIFIER = DEFAULT
FLASH_DEFINITION = GalaxyA72/GalaxyA72.fdf

!include GalaxyA72/GalaxyA72.dsc

[BuildOptions.common]
GCC:*_*_AARCH64_CC_FLAGS = -DMEMORY_8G

[PcdsFixedAtBuild.common]
# System Memory (8GB)
gArmTokenSpaceGuid.PcdSystemMemorySize|0x200000000
6 changes: 6 additions & 0 deletions GalaxyA72/Include/Configuration/DeviceMemoryMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,15 @@ static ARM_MEMORY_REGION_DESCRIPTOR_EX gDeviceMemoryDescriptorEx[] = {
/* Address, Length, ResourceType, Resource Attribute, ARM MMU
Attribute, HobOption, EFI Memory Type */

#ifdef MEMORY_8G
{0xC0000000, 0x1C0000000, EFI_RESOURCE_SYSTEM_MEMORY,
SYSTEM_MEMORY_RESOURCE_ATTR_CAPABILITIES, ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK,
AddMem, EfiConventionalMemory},
#else
{0xC0000000, 0x140000000, EFI_RESOURCE_SYSTEM_MEMORY,
SYSTEM_MEMORY_RESOURCE_ATTR_CAPABILITIES, ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK,
AddMem, EfiConventionalMemory},
#endif

/* HYP */
{0x80000000, 0x00600000, EFI_RESOURCE_MEMORY_RESERVED,
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ Build
```
./build.sh
```
Or this for 8Gb RAM model
```
./build_8G.sh
```
Flash
```
heimdall flash --BOOT boot-a72q.img
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e
. build_common.sh
# not actually GCC5; it's GCC7 on Ubuntu 18.04.
GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -s -n 0 -a AARCH64 -t GCC5 -p GalaxyA72/GalaxyA72.dsc -b RELEASE
GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -s -n 0 -a AARCH64 -t GCC5 -p GalaxyA72/GalaxyA72_6G.dsc -b RELEASE
gzip -c < workspace/Build/GalaxyA72/RELEASE_GCC5/FV/GALAXYA72_UEFI.fd >uefi.img
cat a72q.dtb >>uefi.img
echo > ramdisk
Expand Down
10 changes: 10 additions & 0 deletions build_8G.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
# based on the instructions from edk2-platform
set -e
. build_common.sh
# not actually GCC5; it's GCC7 on Ubuntu 18.04.
GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -s -n 0 -a AARCH64 -t GCC5 -p GalaxyA72/GalaxyA72_8G.dsc -b RELEASE
gzip -c < workspace/Build/GalaxyA72_8G/RELEASE_GCC5/FV/GALAXYA72_UEFI.fd >uefi.img
cat a72q.dtb >>uefi.img
echo > ramdisk
abootimg --create boot-a72q_8G.img -k uefi.img -r ramdisk
4 changes: 2 additions & 2 deletions build_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set -e
. build_common.sh
# not actually GCC5; it's GCC7 on Ubuntu 18.04.
GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -s -n 0 -a AARCH64 -t GCC5 -p GalaxyA72/GalaxyA72.dsc
GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -s -n 0 -a AARCH64 -t GCC5 -p GalaxyA72/GalaxyA72_6G.dsc
gzip -c < workspace/Build/GalaxyA72/DEBUG_GCC5/FV/GALAXYA72_UEFI.fd >uefi.img
cat a72q.dtb >>uefi.img
echo > ramdisk
abootimg --create boot-a72q.img -k uefi.img -r ramdisk
abootimg --create boot-a72q_DEBUG.img -k uefi.img -r ramdisk

0 comments on commit e57eaab

Please sign in to comment.