sifive / meta-sifive

SiFive OpenEmbedded / Yocto BSP Layer
50 stars 39 forks source link

bitbake `unparsed line` error while building #53

Closed amitch1999 closed 1 year ago

amitch1999 commented 1 year ago

Hi, I'm new to the yocto project and trying to build and boot a simple linux distro on qemu emulating the unleashed board.

I followed the readme, cloned bitbake, oe-core and meta-sifive, and ran kas build --update ./meta-sifive/scripts/kas/freedom-u540.yml --target core-image-minimal and then got the error ERROR: ParseError at /home/amit/qemu_stuff/yocto-u54/build/../openembedded-core/meta/conf/layer.conf:132: unparsed line: 'addpylib ${LAYERDIR}/lib oe'

Am I missing something or doing something wrong?

tprrt commented 1 year ago

Hello @amitch1999,

What branch did you use?

Kind regards, Thomas

amitch1999 commented 1 year ago

Hi Thomas, The branches I use are oe-core -> master meta-sifive -> 2023.06 bitbake -> 2.4

But I noticed that the bitbake that was run was a one from the oe-core repo, I switched that bitbake to the one I cloned and the build completed fine, but now I get an error when trying to run on qemu. The command I used kas shell ./meta-sifive/scripts/kas/freedom-u540.yml -E -c "runqemu slirp nographic core-image-minimal" the error I get: runqemu - INFO - Running bitbake -e core-image-minimal... runqemu - ERROR - Failed to find /home/amit/qemu_stuff/yocto-u54/build/tmp-glibc/deploy/images/freedom-u540/core-image-minimal-freedom-u540.qemuboot.conf (wrong image name or BSP does not support running under qemu?).

tprrt commented 1 year ago

Hello @amitch1999

Hi Thomas, The branches I use are oe-core -> master meta-sifive -> 2023.06 bitbake -> 2.4

But I noticed that the bitbake that was run was a one from the oe-core repo, I switched that bitbake to the one I cloned and the build completed fine, but now I get an error when trying to run on qemu. The command I used kas shell ./meta-sifive/scripts/kas/freedom-u540.yml -E -c "runqemu slirp nographic core-image-minimal" the error I get: runqemu - INFO - Running bitbake -e core-image-minimal... runqemu - ERROR - Failed to find /home/amit/qemu_stuff/yocto-u54/build/tmp-glibc/deploy/images/freedom-u540/core-image-minimal-freedom-u540.qemuboot.conf (wrong image name or BSP does not support running under qemu?).

The release uses reference commit-ids if you modify them this may not work because the master branch is not stable, it may contain api changes...

Moreover, to build and run a Qemu image you should use ./meta-sifive/scripts/kas/qemuriscv64.yml instead of ./meta-sifive/scripts/kas/freedom-u540.yml, because ./meta-sifive/scripts/kas/freedom-u540.yml is to build an image for the SiFive HiFive Unleashed board.

Kind regards, Thomas

amitch1999 commented 1 year ago

Hi Thomas, Is it possible to build an image for the Unleashed board and then use qemu to emulate that board and boot that image? Or the Unleashed image that is being built is only for flashing an SD card and is not bootable by qemu

Thanks, Amit

tprrt commented 1 year ago

Hello @amitch1999,

Hi Thomas, Is it possible to build an image for the Unleashed board and then use qemu to emulate that board and boot that image? Or the Unleashed image that is being built is only for flashing an SD card and is not bootable by qemu

Thanks, Amit

It isn't possible because Unleashed devices are different from devices emulated by Qemu.

The Unleashed BSP does not allow booting the image with Qemu.

Kind regards, Thomas Perrot

amitch1999 commented 1 year ago

Ok, I see. Thanks you Thomas!