From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web11.65379.1680511898932716049 for ; Mon, 03 Apr 2023 01:51:40 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: maobibo@loongson.cn) Received: from loongson.cn (unknown [10.20.42.170]) by gateway (Coremail) with SMTP id _____8BxfdqWkypkj_oVAA--.22571S3; Mon, 03 Apr 2023 16:51:35 +0800 (CST) Received: from [10.20.42.170] (unknown [10.20.42.170]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxsOSWkypkk1QUAA--.54706S3; Mon, 03 Apr 2023 16:51:34 +0800 (CST) Message-ID: Date: Mon, 3 Apr 2023 16:51:34 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: On integrating LoongArch EDK2 firmware into QEMU build process From: "maobibo" To: Chao Li Cc: WANG Xuerui , qemu-devel , Song Gao , =?UTF-8?B?5p2o5bCP5aif?= , devel@edk2.groups.io, Gerd Hoffmann References: <1f1d3d9f-c3df-4f29-df66-886410994cc3@xen0n.name> <67517424-0f32-09f8-6446-53f71ebd59b5@loongson.cn> <317e3008-e2bd-8af6-2cf5-dad49d98cb8d@loongson.cn> In-Reply-To: <317e3008-e2bd-8af6-2cf5-dad49d98cb8d@loongson.cn> X-CM-TRANSID: AQAAf8CxsOSWkypkk1QUAA--.54706S3 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBjvJXoW7urWUKw4xuw13Ar1rCw17Jrb_yoW8CF4UpF y7ZasrtrWvqr9Ygryvg3sxXrs0vr97Gry5GF90q34kAr43urySqr10gr4Y9FyDZw4fC3yj vr48Ja4kK3WfZaDanT9S1TB71UUUUUJqnTZGkaVYY2UrUUUUj1kv1TuYvTs0mT0YCTnIWj qI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUIcSsGvfJTRUUU bfAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xvaj40_Wr0E3s 1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28EF7xv wVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26r4UJVWxJr1l n4kS14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12xvs2x26I8E6x ACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1Y6r17McIj6I8E 87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lc7I2V7IY0V AS07AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km 07C267AKxVWUXVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r 1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWU JVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6r 1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Jr0_GrUv cSsGvfC2KfnxnUUI43ZEXa7IU88Ma5UUUUU== Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc to Chao Li who is maintainer of edk2 about LoongArch support. Hi Chao, Fedora38 is used to build edk2 binary in qemu CI, cross gcc-12 is integrated on Fedora38. There is one issue when gcc-12 is used to build edk2 loongarch like this: > ... but when trying to use them to compile the loongarch firmware gcc > throws errors: > > loongarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-explicit-reloc what is your option about this issue? Regards Bibo, Mao 在 2023/4/1 13:11, maobibo 写道: > > > On 2023/3/31 20:12, Gerd Hoffmann wrote: >> On Fri, Mar 31, 2023 at 08:54:16AM +0800, maobibo wrote: >>> Xuerui, >>> >>> Thanks for your mail, it is a good suggestion. Now we are planing to >>> move LoongArch uefi bios from edk2-platform to edk2 repo, so that uefi >>> bios supporting LoongArch can be auto compiled and uploaded to qemu >>> repo. Only that process is somwhat slow since lacking of hands, >>> however we are doing this. >> >> Good, so I think it makes sense for qemu to just wait for that to >> happen. >> >> Related question:  What are the requirements to build the firmware? >> Fedora 38 ships cross compiler packages ... >> >>    binutils-loongarch64-linux-gnu-2.39-3.fc38.x86_64 >>    gcc-loongarch64-linux-gnu-12.2.1-5.fc38.x86_64 >> >> ... but when trying to use them to compile the loongarch firmware gcc >> throws errors: >> >> loongarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mno-explicit-relocs’ >> >> I suspect gcc-12 is just too old? > There is a little different about relocation between gcc-12 and gcc-13 on LoongArch, gcc-13 is required for edk2 compiler now. > > However I think it is actually is one issue if gcc-12 can not be used and gcc-12 is popular latest compiler for all architectures. We will solve this problem. > > Regards > Bibo, Mao > > >> >> take care, >>    Gerd >> >