public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [riscv/riscv-edk2-platforms] U540 Platform UEFI building failed (#10)
       [not found] ` <riscv/riscv-edk2-platforms/issues/10/709958189@github.com>
@ 2020-10-19  4:34   ` Tony McKnight
  0 siblings, 0 replies; only message in thread
From: Tony McKnight @ 2020-10-19  4:34 UTC (permalink / raw)
  To: riscv/riscv-edk2-platforms, devel

[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]

Hi,


Due to Daniel Schaefer's suggestion, I describe my case in details.
My case reproduction steps:
ENV:
Host: Ubuntu 20.04 but local $LANG is zh_CN.utf8
VM: Fedora RISCV Kernel 5.5 and local $LANG is en_US.UTF-8
Steps:
1) Boot up Fedora RISCV VM:
qemu-system-riscv64 \
>   -nographic \
>   -machine virt \
>   -smp 8 \
>   -m 2G \
>   -kernel
Fedora-Developer-Rawhide-20200108.n.0-fw_payload-uboot-qemu-virt-smode.elf \
>   -object rng-random,filename=/dev/urandom,id=rng0 \
>   -device virtio-rng-device,rng=rng0 \
>   -device virtio-blk-device,drive=hd0 \
>   -drive
file=Fedora-Developer-Rawhide-20200108.n.0-sda.raw,format=raw,id=hd0 \
>   -device virtio-net-device,netdev=usernet \
>   -netdev user,id=usernet,hostfwd=tcp::10000-:22
2) SSH to Fedora RISCV VM from Host:
ssh -p 10000 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o
PreferredAuthentications=password -o PubkeyAuthentication=no root@localhost
3) Login Fedora RISCV VM:
Inherit Host env variable $LANG "zh_CN.utf8", although the VM's local $LANG
var in /etc/locale.conf is "en_US.UTF-8".
4) Build the EDK2 binary:
build -a RISCV64 -t GCC5 -p
Platform/SiFive/U5SeriesPkg/FreedomU540HiFiveUnleashedBoard/U540.dsc
When building, UiApp.offset file not created is due to the offset variable
cannot be fetched from UiApp.map file, and it causes the building failed.
The root cause of UiApp.offset file not created is "Archive member
included" does not appears in the head of UiApp.map.
But instead, "Archive member included" is written in Chinese words in
UiApp.map in my case. So offset var cannot be fetched because
GetVariableOffset doesn't handle Chinese words in its code logic.

So it's probably edk2 prioritizes or only handles env var $LANG, but not
check $LANG difference between env var and /etc/locale.conf.
My case workaround: Just re-source the VM local "/etc/locale.conf" to
change the $LANG to "en_US.UTF-8" and re-build the binary, then succeed.


Best Regards


Daniel Schaefer <notifications@github.com> 于2020年10月16日周五 下午6:15写道:

> Hmm, that sounds like a general EDK2 problem. In what language are those
> words written?
> How did you fix it?
> The people on the official EDK2 development mailing list would probably be
> interested to hear about your case: devel@edk2.groups.io
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/riscv/riscv-edk2-platforms/issues/10#issuecomment-709958189>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABZF42J7MK2CSB6NNXITCVLSLAMNLANCNFSM4SRRJFUQ>
> .
>

[-- Attachment #2: Type: text/html, Size: 4782 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-19  4:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <riscv/riscv-edk2-platforms/issues/10@github.com>
     [not found] ` <riscv/riscv-edk2-platforms/issues/10/709958189@github.com>
2020-10-19  4:34   ` [riscv/riscv-edk2-platforms] U540 Platform UEFI building failed (#10) Tony McKnight

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox