From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f45.google.com (mail-vs1-f45.google.com [209.85.217.45]) by mx.groups.io with SMTP id smtpd.web09.7349.1603082093987051456 for ; Sun, 18 Oct 2020 21:34:54 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=i2ydGgrz; spf=pass (domain: gmail.com, ip: 209.85.217.45, mailfrom: tony.mcknight22@gmail.com) Received: by mail-vs1-f45.google.com with SMTP id w25so4937392vsk.9 for ; Sun, 18 Oct 2020 21:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=uoBusG0CLOpR0+GjBwEN11jFsEqc/U8diL1PFhXEPck=; b=i2ydGgrzYO89g2uLfgcScGYvtMkelRA3Bta/MQV/0Pu8W01tZG12gRFBQexvn2bTd5 +N3eXNYxvixGZUuccFIU0fvOfWsA2ao/nS8H+YcFWuefrrKFnlcq4+3pLucbaSDmAxhR EJsXyop56xpicAMdcmHbu0sEtIRpL5VlPyQVMOkQRtIyTyCkjBLF+oxYVeKeA7Tn0Boc ND+ImyAE+aW94QxV0n3PJn7Ib57d0pJZCoNmAcNE5Nmq7mYo1TC3Dy8aYE23AhXT+FLg 6G+p158abYPC+7vvSrs/fahVTajBmCNvj90uKyMSguLlikNju7koA2FBct18Mt3m1ORV Sc/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=uoBusG0CLOpR0+GjBwEN11jFsEqc/U8diL1PFhXEPck=; b=c9Yznx2GmoAngI/4juVXqoFrnHN/inOLgA87s61a1kIFiT+YCkYxCIEulb/3kFip/p 1OyOeb+tJfmRhPQ52bWOebx1zfHsN1QyKu8BdntNUi+K6QoulG97I0Cnvuqw8BpIkrBC oYQtrxZuOP9tO9Lghn3k/iVAWs7wlH5QoRQNQAsrpqM369wH12uC3Xq0ItmblFWUnT5i Nfm3OKdrzK3YjxALznReMPyLR2ZXh0nJz1wxylMI9/kzJ7pY7i87DHA2ngjQqbgdUw90 NyaPIOvLswsvjfviri32IqHU+5CtwgPRFMqQmSHN4Uf2epZLtC5wysuPlfHQfyQkKrA9 JRmQ== X-Gm-Message-State: AOAM533Ba6BjxLY2GyVFak5DHrvU6F2mBbgEgLY+hOXIa8lWuiduDnz+ wTLL9VYzCNrlWFT0EyDhQAfAYPDMNfo473uE16E= X-Google-Smtp-Source: ABdhPJwTIfGrcPV4VT7A9AtvWdx4JML6Pah1ec7mpneZqMNDFnx0bMk9Hfu4V8QdNXQFayR9uiM+8fEav5sLFVPNuM8= X-Received: by 2002:a67:ec9a:: with SMTP id h26mr7689148vsp.34.1603082093030; Sun, 18 Oct 2020 21:34:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tony McKnight Date: Mon, 19 Oct 2020 12:34:41 +0800 Message-ID: Subject: Re: [riscv/riscv-edk2-platforms] U540 Platform UEFI building failed (#10) To: "riscv/riscv-edk2-platforms" , devel@edk2.groups.io Content-Type: multipart/alternative; boundary="000000000000b370a605b1fea226" --000000000000b370a605b1fea226 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=3D/dev/urandom,id=3Drng0 \ > -device virtio-rng-device,rng=3Drng0 \ > -device virtio-blk-device,drive=3Dhd0 \ > -drive file=3DFedora-Developer-Rawhide-20200108.n.0-sda.raw,format=3Draw,id=3Dhd0 = \ > -device virtio-net-device,netdev=3Dusernet \ > -netdev user,id=3Dusernet,hostfwd=3Dtcp::10000-:22 2) SSH to Fedora RISCV VM from Host: ssh -p 10000 -o UserKnownHostsFile=3D/dev/null -o StrictHostKeyChecking=3Dn= o -o PreferredAuthentications=3Dpassword -o PubkeyAuthentication=3Dno root@local= host 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 =E4=BA=8E2020=E5=B9=B410=E6=9C= =8816=E6=97=A5=E5=91=A8=E4=BA=94 =E4=B8=8B=E5=8D=886:15=E5=86=99=E9=81=93= =EF=BC=9A > 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 b= e > interested to hear about your case: devel@edk2.groups.io > > =E2=80=94 > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > --000000000000b370a605b1fea226 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,=C2=A0


Due= to Daniel Schaefer's suggestion, I describe my case in details.
<= div>My case reproduction steps:
ENV:
Host: Ubuntu 20.04= but local $LANG is zh_CN.utf8
VM: Fedora RISCV Kernel 5.5 and=C2= =A0local $LANG is=C2=A0en_US.UTF-8
Steps:=C2=A0
1) Boot= up Fedora RISCV VM:
qemu-system-riscv64 \
> =C2=A0 -nograp= hic \
> =C2=A0 -machine virt \
> =C2=A0 -smp 8 \
> =C2=A0= -m 2G \
> =C2=A0 -kernel Fedora-Developer-Rawhide-20200108.n.0-fw_pa= yload-uboot-qemu-virt-smode.elf \
> =C2=A0 -object rng-random,filenam= e=3D/dev/urandom,id=3Drng0 \
> =C2=A0 -device virtio-rng-device,rng= =3Drng0 \
> =C2=A0 -device virtio-blk-device,drive=3Dhd0 \
> = =C2=A0 -drive file=3DFedora-Developer-Rawhide-20200108.n.0-sda.raw,format= =3Draw,id=3Dhd0 \
> =C2=A0 -device virtio-net-device,netdev=3Dusernet= \
> =C2=A0 -netdev user,id=3Dusernet,hostfwd=3Dtcp::10000-:22
2) SSH to=C2=A0Fedora RISCV VM from Host:
ssh -p 10000 -o= UserKnownHostsFile=3D/dev/null -o StrictHostKeyChecking=3Dno -o PreferredA= uthentications=3Dpassword -o PubkeyAuthentication=3Dno root@localhost
3) Login=C2=A0Fedora RISCV VM:=C2=A0
Inherit Host env va= riable $LANG "zh_CN.utf8", although the VM's local $LANG var = in=C2=A0/etc/locale.conf is "en_US.UTF-8".
4) Build the= EDK2 binary:
build -a RISCV64 -t GCC5 -p Platform/SiFive/U5SeriesPkg/Fr= eedomU540HiFiveUnleashedBoard/U540.dsc
When building,=C2=A0UiApp.offset file not created = is due to the offset variable cannot be fetched from UiApp.map file<= span style=3D"color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemF= ont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji= ","Segoe UI Emoji";font-size:14px">, and it causes the build= ing failed.
The root cause of UiApp.offset file not created is=C2=A0"A= rchive member included" does not appears in the head of UiApp.map.
But instead,=C2= =A0"Archive member included" is written in Chinese words i= n UiApp.map in my case. So offset var cannot be fetched because=C2=A0GetVariableOffset=C2=A0= 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=C2=A0/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 bina= ry, then succeed.


Best Regards


Daniel Schaefer <notifications@github.com> =E4=BA=8E2020=E5=B9=B410=E6=9C= =8816=E6=97=A5=E5=91=A8=E4=BA=94 =E4=B8=8B=E5=8D=886:15=E5=86=99=E9=81=93= =EF=BC=9A

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

=E2=80=94
You are re= ceiving this because you authored the thread.
Reply to this email direct= ly, view it on GitHub, or unsubscribe.3D""

--000000000000b370a605b1fea226--