[PATCH v5 3/3] board: qemu-riscv: enable semihosting

Sean Anderson sean.anderson at seco.com
Tue Dec 6 16:16:02 CET 2022


On 12/6/22 00:42, Kautuk Consul wrote:
> Hi,
> 
> On Mon, Dec 5, 2022 at 8:46 PM Sean Anderson <sean.anderson at seco.com> wrote:
>>
>> On 12/5/22 00:51, Kautuk Consul wrote:
>> > Hi,
>> >
>> > On Sat, Dec 3, 2022 at 9:44 AM Bin Meng <bmeng.cn at gmail.com> wrote:
>> >>
>> >> On Fri, Sep 23, 2022 at 3:03 PM Kautuk Consul <kconsul at ventanamicro.com> wrote:
>> >> >
>> >> > To enable semihosting we also need to enable the following
>> >> > configs in defconfigs:
>> >> > CONFIG_SEMIHOSTING
>> >> > CONFIG_SPL_SEMIHOSTING
>> >> > CONFIG_SEMIHOSTING_SERIAL
>> >> > CONFIG_SERIAL_PROBE_ALL
>> >> > CONFIG_SPL_FS_EXT4
>> >> > CONFIG_SPL_FS_FAT
>> >>
>> >> Why should these _SPL_FS_xxx be required? If it's required by
>> >> SEMIHOSTING, could the dependency be fixed there?
>> >
>> > The build dependencies require that these options be there.
>>
>> What error do you get?
> 
> If I disable both the _SPL_FS_* config options then I get the
> following compilation error:
> common/spl/spl_semihosting.c: In function 'spl_smh_load_image':
> common/spl/spl_semihosting.c:27:32: error:
> 'CONFIG_SPL_FS_LOAD_PAYLOAD_NAME' undeclared (first use in this
> function)
>    27 |         const char *filename = CONFIG_SPL_FS_LOAD_PAYLOAD_NAME;
>       |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> common/spl/spl_semihosting.c:27:32: note: each undeclared identifier
> is reported only once for each function it appears in
> 
> Bin/Sean: This error is not really related to the semihosting feature
> but is related to COFIG_SPL in general.
> Can you please accept this patch-set and then I'll try and find time
> in the future maybe to rectify this build dependency
> problem ?

config SPL_FS_LOAD_PAYLOAD_NAME
        string "File to load for U-Boot from the filesystem"
        depends on SPL_FS_EXT4 || SPL_FS_FAT || SPL_FS_SQUASHFS
        default "tispl.bin" if SYS_K3_SPL_ATF
        default "u-boot.itb" if SPL_LOAD_FIT
        default "u-boot.img"
        help
          Filename to read to load U-Boot when reading from filesystem.

Add CONFIG_SPL_SEMIHOSTING to the depends.

--Sean

>>
>> --Sean
>>
>> >>
>> >> >
>> >> > Signed-off-by: Kautuk Consul <kconsul at ventanamicro.com>
>> >> > ---
>> >> >  configs/qemu-riscv32_defconfig       | 4 ++++
>> >> >  configs/qemu-riscv32_smode_defconfig | 4 ++++
>> >> >  configs/qemu-riscv32_spl_defconfig   | 7 +++++++
>> >> >  configs/qemu-riscv64_defconfig       | 4 ++++
>> >> >  configs/qemu-riscv64_smode_defconfig | 4 ++++
>> >> >  configs/qemu-riscv64_spl_defconfig   | 7 +++++++
>> >> >  6 files changed, 30 insertions(+)
>> >> >
>> >>
>> >> Regards,
>> >> Bin
>>



More information about the U-Boot mailing list