Date   

Re: Some questions about UEFI

Elena WILLIS
 

Hi Leif and Pete,



My answers in blue.



Best regards,



Elena

-----Original Message-----
From: Leif Lindholm <leif.lindholm@linaro.org>
Sent: vendredi 19 juillet 2019 11:11
To: discuss@edk2.groups.io; Elena WILLIS <elena.willis@st.com>
Cc: Pete Batard <pete@akeo.ie>
Subject: Re: [edk2-discuss] Some questions about UEFI



Hi Elena, (+cc Pete)



On Thu, Jul 18, 2019 at 11:54:38AM +0000, Elena WILLIS wrote:

I am using EDK2 https://github.com/tianocore/edk2 on a Raspberry PI 3B model.
Installation went fine and I can access the UEFI Shell interface, where the commands work.
But I'm now stuck and have a few questions :
- Do you have a simple .efi script that I could use to test
- my setup ?


.efi indicated an application (or driver), as opposed to a script.

My go-to test case is a standalone GRUB executable.

Generated with grub-mkstandalone -O arm64-efi -o grubstand.efi



Ok I will try this, thank you !



- Once I am on the UEFI interface, I can't seem to boot
- back onto my OS (Raspbian). Could you please explain how
- to do this?


Does 'exit' bring you back to a "BIOS" menu system where you can select boot options?



Yes, it does, but from there I can't get back onto my OS either. :(



Best Regards,



Leif


Re: Some questions about UEFI

Leif Lindholm
 

Hi Elena, (+cc Pete)

On Thu, Jul 18, 2019 at 11:54:38AM +0000, Elena WILLIS wrote:
I am using EDK2 https://github.com/tianocore/edk2 on a Raspberry PI 3B model.
Installation went fine and I can access the UEFI Shell interface, where the commands work.

But I'm now stuck and have a few questions :

- Do you have a simple .efi script that I could use to test
- my setup ?
.efi indicated an application (or driver), as opposed to a script.
My go-to test case is a standalone GRUB executable.
Generated with grub-mkstandalone -O arm64-efi -o grubstand.efi

- Once I am on the UEFI interface, I can't seem to boot
- back onto my OS (Raspbian). Could you please explain how
- to do this?
Does 'exit' bring you back to a "BIOS" menu system where you can
select boot options?

Best Regards,

Leif


Some questions about UEFI

Elena WILLIS <elena.willis@...>
 

Hello,

 

I am using EDK2 https://github.com/tianocore/edk2 on a Raspberry PI 3B model.

Installation went fine and I can access the UEFI Shell interface, where the commands work.

 

But I’m now stuck and have a few questions :

-          Do you have a simple .efi script that I could use to test my setup ?

-          Once I am on the UEFI interface, I can’t seem to boot back onto my OS (Raspbian). Could you please explain how to do this?

 

Thank you for your help,

 

Cordialement,

Best regards,

 

 

Elena WILLIS  | TINA : 147 0641 | Tel: +33223470641

Microcontrollers and Digital ICs Group | TPM Applications Apprentice

 


Re: [edk2-devel] [edk2-discuss] WriteSections64()

Russell Peterson
 

Hi, Ard.

I compared this output to my previous edk2 build (uses gcc 7.3) and noticed that the .eh_frame sections seem to be new with the gcc 8.3 compiler. I added -fno-exceptions and -fno-unwind-tables to the aarch64 compiler options and everything builds. I'll need to run it and see if things work but seems better (at least it builds). I assume edk2 doesn't much care about stack unwinding?

Regards,

Russell

-----Original Message-----
From: Russell Peterson
Sent: Sunday, June 16, 2019 10:12 AM
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: discuss@edk2.groups.io; edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>
Subject: RE: [edk2-devel] [edk2-discuss] WriteSections64()

Hi, Ard.

-bash-4.2$ readelf -S /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
There are 25 section headers, starting at offset 0x2a940:

Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .text PROGBITS 0000000000000240 00000240
0000000000000320 0000000000000008 AX 0 0 32
[ 2] .rela.text RELA 0000000000000000 000175f8
00000000000002d0 0000000000000018 I 22 1 8
[ 3] .data PROGBITS 0000000000000560 00000560
0000000000000258 0000000000000000 WA 0 0 32
[ 4] .rela.data RELA 0000000000000000 000178c8
0000000000000060 0000000000000018 I 22 3 8
[ 5] .eh_frame PROGBITS 00000000000007c0 000007c0
0000000000000108 0000000000000000 A 0 0 8
[ 6] .rela.eh_frame RELA 0000000000000000 00017928
0000000000000120 0000000000000018 I 22 5 8
[ 7] .eh_frame_hdr PROGBITS 00000000000008c8 000008c8
000000000000004c 0000000000000000 A 0 0 4
[ 8] .rela RELA 0000000000000918 00000918
0000000000000060 0000000000000018 0 0 8
[ 9] .build-id PROGBITS 0000000000000978 00000978
0000000000000024 0000000000000000 0 0 4
[10] .debug_info PROGBITS 0000000000000000 0000099c
000000000000bc4c 0000000000000000 0 0 1
[11] .rela.debug_info RELA 0000000000000000 00017a48
0000000000011220 0000000000000018 I 22 10 8
[12] .debug_abbrev PROGBITS 0000000000000000 0000c5e8
00000000000017d3 0000000000000000 0 0 1
[13] .debug_line PROGBITS 0000000000000000 0000ddbb
00000000000031ed 0000000000000000 0 0 1
[14] .rela.debug_line RELA 0000000000000000 00028c68
0000000000000120 0000000000000018 I 22 13 8
[15] .debug_str PROGBITS 0000000000000000 00010fa8
0000000000002cd3 0000000000000001 MS 0 0 1
[16] .debug_loc PROGBITS 0000000000000000 00013c7b
0000000000000ba1 0000000000000000 0 0 1
[17] .rela.debug_loc RELA 0000000000000000 00028d88
00000000000013e0 0000000000000018 I 22 16 8
[18] .debug_aranges PROGBITS 0000000000000000 0001481c
00000000000000e0 0000000000000000 0 0 1
[19] .rela.debug_arang RELA 0000000000000000 0002a168
0000000000000138 0000000000000018 I 22 18 8
[20] .debug_ranges PROGBITS 0000000000000000 000148fc
0000000000000270 0000000000000000 0 0 1
[21] .rela.debug_range RELA 0000000000000000 0002a2a0
00000000000005d0 0000000000000018 I 22 20 8
[22] .symtab SYMTAB 0000000000000000 00014b70
00000000000027a8 0000000000000018 23 402 8
[23] .strtab STRTAB 0000000000000000 00017318
00000000000002da 0000000000000000 0 0 1
[24] .shstrtab STRTAB 0000000000000000 0002a870
00000000000000d0 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
p (processor specific)

-----Original Message-----
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Sent: Saturday, June 15, 2019 4:29 AM
To: Russell Peterson <russell@mellanox.com>
Cc: discuss@edk2.groups.io; edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()

On Sat, 15 Jun 2019 at 02:17, Russell Peterson <russell@mellanox.com> wrote:

Here is a sample of the gcc command line:

"/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
-I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g
-fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror
-Wno-array-bounds -ffunction-sections -fdata-sections -incl\ ude
AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os
-fshort-wchar -fno-builtin -fno-stri\ ct-aliasing -Wall -Werror
-Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian
-fno-short-enums -\ fverbose-asm -funsigned-char -ffunction-sections
-fdata-sections -Wno-address -fno-asynchronous-unwind-tables\ -fno-pic
-fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable
-Wno-unused-const-variable -mcmodel=tiny -n\ ostdinc -nostdlib
-DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o
/x/RELEASE_GCC5/AARCH64/CryptoPkg/Library/
BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files
left out> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c

echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\
H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
--strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\
deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
echo /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\
twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
Could you dump the section headers of such a .dll using readelf -S please?


Re: [edk2-devel] [edk2-discuss] WriteSections64()

Ard Biesheuvel <ard.biesheuvel@...>
 

On Sat, 15 Jun 2019 at 02:17, Russell Peterson <russell@mellanox.com> wrote:

Here is a sample of the gcc command line:

"/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
-I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g -fshort-wchar
-fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -incl\
ude AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os -fshort-wchar -fno-builtin -fno-stri\
ct-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -\
fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables\
-fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny -n\
ostdinc -nostdlib -DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o /x/RELEASE_GCC5/AARCH64/CryptoPkg/Library/
BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files left out> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c
You are missing the -fno-unwind-tables option. Please make sure that
you apply commit cbf00651eda6818ca3c76115b8a18e3f6b23eef4 to your
tree.
echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\
H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
--strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\
deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
echo /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\
twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Russell Peterson via Groups.Io
Sent: Friday, June 14, 2019 5:19 PM
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>; discuss@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()

Hello, Ard.

The tools_def.txt was updated and both the -fno-pie and -fno-pic are specified when executing gcc. I don’t have access to the code at the moment but I will post the exact gcc command line as soon as I can.

Regards,

Russell


On Jun 14, 2019, at 3:43 PM, Ard Biesheuvel <ard.biesheuvel@linaro.org<mailto:ard.biesheuvel@linaro.org>> wrote:

On Fri, 14 Jun 2019 at 21:17, Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>> wrote:

+Ard, +devel

On 06/13/19 17:29, Russell Peterson wrote:
Hello,

We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.3). In the process of doing that we have hit an error building edk2:

make[2]: *** [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi] Error 1
WriteSections64(): /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll AARCH64 relative relocations require identical ELF and PE/COFF section offsets

There are multiple errors similar to this issued by GenFw. Our edk2 version is fairly recent (UDK2018 upstream branch as of commit 10318063b) but all this did build fine with gcc 7.3. Any clues?


Your Conf/tools_def.txt is probably stale, and does not contain the -fno-pie option we added a while ago.




Re: [edk2-devel] [edk2-discuss] WriteSections64()

Russell Peterson
 

Hi, Ard.

-bash-4.2$ readelf -S /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
There are 25 section headers, starting at offset 0x2a940:

Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .text PROGBITS 0000000000000240 00000240
0000000000000320 0000000000000008 AX 0 0 32
[ 2] .rela.text RELA 0000000000000000 000175f8
00000000000002d0 0000000000000018 I 22 1 8
[ 3] .data PROGBITS 0000000000000560 00000560
0000000000000258 0000000000000000 WA 0 0 32
[ 4] .rela.data RELA 0000000000000000 000178c8
0000000000000060 0000000000000018 I 22 3 8
[ 5] .eh_frame PROGBITS 00000000000007c0 000007c0
0000000000000108 0000000000000000 A 0 0 8
[ 6] .rela.eh_frame RELA 0000000000000000 00017928
0000000000000120 0000000000000018 I 22 5 8
[ 7] .eh_frame_hdr PROGBITS 00000000000008c8 000008c8
000000000000004c 0000000000000000 A 0 0 4
[ 8] .rela RELA 0000000000000918 00000918
0000000000000060 0000000000000018 0 0 8
[ 9] .build-id PROGBITS 0000000000000978 00000978
0000000000000024 0000000000000000 0 0 4
[10] .debug_info PROGBITS 0000000000000000 0000099c
000000000000bc4c 0000000000000000 0 0 1
[11] .rela.debug_info RELA 0000000000000000 00017a48
0000000000011220 0000000000000018 I 22 10 8
[12] .debug_abbrev PROGBITS 0000000000000000 0000c5e8
00000000000017d3 0000000000000000 0 0 1
[13] .debug_line PROGBITS 0000000000000000 0000ddbb
00000000000031ed 0000000000000000 0 0 1
[14] .rela.debug_line RELA 0000000000000000 00028c68
0000000000000120 0000000000000018 I 22 13 8
[15] .debug_str PROGBITS 0000000000000000 00010fa8
0000000000002cd3 0000000000000001 MS 0 0 1
[16] .debug_loc PROGBITS 0000000000000000 00013c7b
0000000000000ba1 0000000000000000 0 0 1
[17] .rela.debug_loc RELA 0000000000000000 00028d88
00000000000013e0 0000000000000018 I 22 16 8
[18] .debug_aranges PROGBITS 0000000000000000 0001481c
00000000000000e0 0000000000000000 0 0 1
[19] .rela.debug_arang RELA 0000000000000000 0002a168
0000000000000138 0000000000000018 I 22 18 8
[20] .debug_ranges PROGBITS 0000000000000000 000148fc
0000000000000270 0000000000000000 0 0 1
[21] .rela.debug_range RELA 0000000000000000 0002a2a0
00000000000005d0 0000000000000018 I 22 20 8
[22] .symtab SYMTAB 0000000000000000 00014b70
00000000000027a8 0000000000000018 23 402 8
[23] .strtab STRTAB 0000000000000000 00017318
00000000000002da 0000000000000000 0 0 1
[24] .shstrtab STRTAB 0000000000000000 0002a870
00000000000000d0 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), I (info),
L (link order), O (extra OS processing required), G (group), T (TLS),
C (compressed), x (unknown), o (OS specific), E (exclude),
p (processor specific)

-----Original Message-----
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Sent: Saturday, June 15, 2019 4:29 AM
To: Russell Peterson <russell@mellanox.com>
Cc: discuss@edk2.groups.io; edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()

On Sat, 15 Jun 2019 at 02:17, Russell Peterson <russell@mellanox.com> wrote:

Here is a sample of the gcc command line:

"/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
-I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g
-fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror
-Wno-array-bounds -ffunction-sections -fdata-sections -incl\ ude
AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os
-fshort-wchar -fno-builtin -fno-stri\ ct-aliasing -Wall -Werror
-Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian
-fno-short-enums -\ fverbose-asm -funsigned-char -ffunction-sections
-fdata-sections -Wno-address -fno-asynchronous-unwind-tables\
-fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable
-Wno-unused-const-variable -mcmodel=tiny -n\ ostdinc -nostdlib
-DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o
/x/RELEASE_GCC5/AARCH64/CryptoPkg/Library/
BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files
left out> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c

echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\
H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
--strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\
deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
echo /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\
twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
Could you dump the section headers of such a .dll using readelf -S please?


Re: [edk2-devel] [edk2-discuss] WriteSections64()

Ard Biesheuvel <ard.biesheuvel@...>
 

On Sat, 15 Jun 2019 at 02:17, Russell Peterson <russell@mellanox.com> wrote:

Here is a sample of the gcc command line:

"/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
-I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g -fshort-wchar
-fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -incl\
ude AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os -fshort-wchar -fno-builtin -fno-stri\
ct-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -\
fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables\
-fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny -n\
ostdinc -nostdlib -DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o /x/RELEASE_GCC5/AARCH64/CryptoPkg/Library/
BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files left out> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c

echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\
H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
--strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\
deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
echo /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\
twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
Could you dump the section headers of such a .dll using readelf -S please?


Re: [edk2-devel] [edk2-discuss] WriteSections64()

Ard Biesheuvel <ard.biesheuvel@...>
 

On Fri, 14 Jun 2019 at 21:17, Laszlo Ersek <lersek@redhat.com> wrote:

+Ard, +devel

On 06/13/19 17:29, Russell Peterson wrote:
Hello,

We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.3). In the process of doing that we have hit an error building edk2:

make[2]: *** [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi] Error 1
WriteSections64(): /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll AARCH64 relative relocations require identical ELF and PE/COFF section offsets

There are multiple errors similar to this issued by GenFw. Our edk2 version is fairly recent (UDK2018 upstream branch as of commit 10318063b) but all this did build fine with gcc 7.3. Any clues?
Your Conf/tools_def.txt is probably stale, and does not contain the
-fno-pie option we added a while ago.


Re: [edk2-devel] [edk2-discuss] WriteSections64()

Russell Peterson
 

Here is a sample of the gcc command line:

"/x/sdk/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-linux/aarch64-poky-linux-gcc"
-I/x/edk2/edk2/MlxPlatformPkg/Include -march=armv8-a+crc -g -fshort-wchar
-fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -incl\
ude AutoGen.h -fno-common -DSTRING_ARRAY_NAME=BaseCryptLibStrings -g -Os -fshort-wchar -fno-builtin -fno-stri\
ct-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian -fno-short-enums -\
fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables\
-fno-pic -fno-pie -ffixed-x18 -flto -Wno-unused-but-set-variable -Wno-unused-const-variable -mcmodel=tiny -n\
ostdinc -nostdlib -DUEFI_C_SOURCE -DMDEPKG_NDEBUG -c -o /x/RELEASE_GCC5/AARCH64/CryptoPkg/Library/
BaseCryptLib/BaseCryptLib/OUTPUT/Pk/CryptX509.obj <-I include files left out> /x/edk2/CryptoPkg/Library/BaseCryptLib/Pk/CryptX509.c

echo --strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARC\
H64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
--strip-unneeded -R .eh_frame /x/edk2/Build/RELEASE_GCC5/AARCH64/M\
deModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll
echo /x/edk2/Build/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Ne\
twork/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Russell Peterson via Groups.Io
Sent: Friday, June 14, 2019 5:19 PM
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>; Laszlo Ersek <lersek@redhat.com>; discuss@edk2.groups.io
Subject: Re: [edk2-devel] [edk2-discuss] WriteSections64()

Hello, Ard.

The tools_def.txt was updated and both the -fno-pie and -fno-pic are specified when executing gcc. I don’t have access to the code at the moment but I will post the exact gcc command line as soon as I can.

Regards,

Russell


On Jun 14, 2019, at 3:43 PM, Ard Biesheuvel <ard.biesheuvel@linaro.org<mailto:ard.biesheuvel@linaro.org>> wrote:

On Fri, 14 Jun 2019 at 21:17, Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>> wrote:

+Ard, +devel

On 06/13/19 17:29, Russell Peterson wrote:
Hello,

We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.3). In the process of doing that we have hit an error building edk2:

make[2]: *** [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi] Error 1
WriteSections64(): /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll AARCH64 relative relocations require identical ELF and PE/COFF section offsets

There are multiple errors similar to this issued by GenFw. Our edk2 version is fairly recent (UDK2018 upstream branch as of commit 10318063b) but all this did build fine with gcc 7.3. Any clues?


Your Conf/tools_def.txt is probably stale, and does not contain the -fno-pie option we added a while ago.


Re: [edk2-devel] [edk2-discuss] WriteSections64()

Russell Peterson
 

Hello, Ard.

The tools_def.txt was updated and both the -fno-pie and -fno-pic are specified when executing gcc. I don’t have access to the code at the moment but I will post the exact gcc command line as soon as I can.

Regards,

Russell

On Jun 14, 2019, at 3:43 PM, Ard Biesheuvel <ard.biesheuvel@linaro.org<mailto:ard.biesheuvel@linaro.org>> wrote:

On Fri, 14 Jun 2019 at 21:17, Laszlo Ersek <lersek@redhat.com<mailto:lersek@redhat.com>> wrote:

+Ard, +devel

On 06/13/19 17:29, Russell Peterson wrote:
Hello,

We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.3). In the process of doing that we have hit an error building edk2:

make[2]: *** [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi] Error 1
WriteSections64(): /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll AARCH64 relative relocations require identical ELF and PE/COFF section offsets

There are multiple errors similar to this issued by GenFw. Our edk2 version is fairly recent (UDK2018 upstream branch as of commit 10318063b) but all this did build fine with gcc 7.3. Any clues?


Your Conf/tools_def.txt is probably stale, and does not contain the
-fno-pie option we added a while ago.


Re: WriteSections64()

Laszlo Ersek
 

+Ard, +devel

On 06/13/19 17:29, Russell Peterson wrote:
Hello,

We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.3). In the process of doing that we have hit an error building edk2:

make[2]: *** [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi] Error 1
WriteSections64(): /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll AARCH64 relative relocations require identical ELF and PE/COFF section offsets

There are multiple errors similar to this issued by GenFw. Our edk2 version is fairly recent (UDK2018 upstream branch as of commit 10318063b) but all this did build fine with gcc 7.3. Any clues?

Regards,

Russell





WriteSections64()

Russell Peterson
 

Hello,

We are in the process of upgrading our gcc toolchain to gcc 8.3 (from 7.3). In the process of doing that we have hit an error building edk2:

make[2]: *** [/home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.efi] Error 1
WriteSections64(): /home/x/RELEASE_GCC5/AARCH64/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe/DEBUG/DpcDxe.dll AARCH64 relative relocations require identical ELF and PE/COFF section offsets

There are multiple errors similar to this issued by GenFw. Our edk2 version is fairly recent (UDK2018 upstream branch as of commit 10318063b) but all this did build fine with gcc 7.3. Any clues?

Regards,

Russell


Re: Looking for help to enable eDP1 port on Minnowboard derivative board

Stephano Cetola
 

A couple of questions:

1. Have you updated the Video BIOS Table (VBT) adding the LVDS details
(dot clock, EDID support, etc)?
2. If so, have you followed the DDI1_XXX lines (at the bridge and LVDS
display), and are the signals present?

Cheers,
Stephano

On Mon, Jun 3, 2019 at 6:03 PM <rksaripalli@hotmail.com> wrote:

To all,
I have a board designed on the e3800 SoC. We are reusing the Minnowboard UEFI FW (with some minor changes for the memory controller) and are able to boot this board with the UEFI FW that we are building with these patches.

The board has eDP1 enabled. On this port, we have an integrated LVDS panel using a eDP to LVDS bridge.
a)So essentially, we have DDI1_XXX signals connected to the eDP to LVDS bridge. The bridge translates from eDP to LVDS.
b) The DDI1_DDCDATA and DDI1_DDCCLK are connected directly to i2c on the LVDS panel (for EDID/EEPROM access)
c) On the Minnowboard the eDP1 graphics output port is removed (In the Minnowboard schematics refer to the CPU-DDI/VGA sheet and on the right you will see BayTrail-M remove eDP port)
d) On the DDI0 signals, we have HDMI output.

But with the Minnowboard FW, we are only able to see the display output on HDMI connected through eDP0.
We do not see see any output on eDP1.

Thinking this could be a backlight issue, I even wrote some code to program the DDI_BKLTEN / DDI_BKLTVDD signals (that are tied to GPIO signals in the NC) and that does not work either.

What are the steps/tools I need to do to enable LVDS panel on eDP1?.

Ideally, we would like to have the output be sent to both HDMI and LVDS panel.
I am familiar with UEFI code and I can make any changes needed in the UEFI FW code.
The HDMI is purely for developer support at this point.

Thanks,
Ram



Looking for help to enable eDP1 port on Minnowboard derivative board

rksaripalli@...
 

To all,
I have a board designed on the e3800 SoC. We are reusing the Minnowboard UEFI FW (with some minor changes for the memory controller) and are able to boot this board with the UEFI FW that we are building with these patches.

The board has eDP1 enabled. On this port, we have an integrated LVDS panel using a eDP to LVDS bridge.
a)So essentially, we have DDI1_XXX signals connected to the eDP to LVDS bridge. The bridge translates from eDP to LVDS.
b) The DDI1_DDCDATA and DDI1_DDCCLK are connected directly to i2c on the LVDS panel (for EDID/EEPROM access)
c) On the Minnowboard the eDP1 graphics output port is removed (In the Minnowboard schematics refer to the CPU-DDI/VGA sheet and on the right you will see BayTrail-M remove eDP port)
d) On the DDI0 signals, we have HDMI output.

But with the Minnowboard FW, we are only able to see the display output on HDMI connected through eDP0.
We do not see see any output on eDP1.

Thinking this could be a backlight issue, I even wrote some code to program the DDI_BKLTEN / DDI_BKLTVDD signals (that are tied to GPIO signals in the NC) and that does not work either.

What are the steps/tools I need to do to enable LVDS panel on eDP1?.

Ideally, we would like to have the output be sent to both HDMI and LVDS panel.
I am familiar with UEFI code and I can make any changes needed in the UEFI FW code.
The HDMI is purely for developer support at this point.

Thanks,
Ram

821 - 834 of 834