openbouffalo / meta-openbouffalo

OpenBouffalo Distro Layer for BL808 Based Boards
MIT License
7 stars 2 forks source link

Explain how to flash the build artifacts to the ox64 #3

Open KorribanMaster opened 1 year ago

KorribanMaster commented 1 year ago

I have created a basic manifests repository to checkout all relevant repositories. Afterwards I sourced pokies oe-init-env and added the layers to the bblayers.conf. Note that this step should be automated soon. Afterwards i build the image for machine bl808 and distro OpenBouffalo

MACHINE=bl808 DISTRO=OpenBouffalo bitbake openbouffalo-image-dev

build went through successfully and the generated artifacts look like this

# cd <project source dir>/build/tmp/deploy/images/bl808
tree tmp/deploy/images/bl808
tmp/deploy/images/bl808
├── bl808-firmware.bin
├── bl808-pine64-ox64-bl808.dtb -> bl808-pine64-ox64--v6.2-r1-bl808-20230428164251.dtb
├── bl808-pine64-ox64.dtb -> bl808-pine64-ox64--v6.2-r1-bl808-20230428164251.dtb
├── bl808-pine64-ox64--v6.2-r1-bl808-20230428164251.dtb
├── bl808-sipeed-m1s-bl808.dtb -> bl808-sipeed-m1s--v6.2-r1-bl808-20230428164251.dtb
├── bl808-sipeed-m1s.dtb -> bl808-sipeed-m1s--v6.2-r1-bl808-20230428164251.dtb
├── bl808-sipeed-m1s--v6.2-r1-bl808-20230428164251.dtb
├── boot-m1s.scr
├── boot-pine64.scr
├── boot.scr
├── downloads
│   └── openbouffalo-image-dev-bl808-1.0.0.zip
├── extlinux.conf -> extlinux.conf-bl808-r0
├── extlinux.conf-bl808 -> extlinux.conf-bl808-r0
├── extlinux.conf-bl808-r0
├── fw_jump.bin
├── Image -> Image--v6.2-r1-bl808-20230428164251.bin
├── Image-bl808.bin -> Image--v6.2-r1-bl808-20230428164251.bin
├── Image--v6.2-r1-bl808-20230428164251.bin
├── modules-bl808.tgz -> modules--v6.2-r1-bl808-20230428164251.tgz
├── modules--v6.2-r1-bl808-20230428164251.tgz
├── openbouffalo-image-dev-bl808-1.0.0.rootfs.manifest
├── openbouffalo-image-dev-bl808-1.0.0.rootfs.wic.bz2
├── openbouffalo-image-dev-bl808-1.0.0.testdata.json
├── openbouffalo-image-dev-bl808.manifest -> openbouffalo-image-dev-bl808-1.0.0.rootfs.manifest
├── openbouffalo-image-dev-bl808.testdata.json -> openbouffalo-image-dev-bl808-1.0.0.testdata.json
├── openbouffalo-image-dev-bl808.wic.bz2 -> openbouffalo-image-dev-bl808-1.0.0.rootfs.wic.bz2
├── openbouffalo-image-dev.env
├── u-boot.bin -> u-boot-bl808-2023-02-19-r0.bin
├── u-boot-bl808-2023-02-19-r0.bin
├── u-boot-bl808.bin -> u-boot-bl808-2023-02-19-r0.bin
├── u-boot.dtb
├── u-boot-initial-env -> u-boot-initial-env-bl808-2023-02-19-r0
├── u-boot-initial-env-bl808 -> u-boot-initial-env-bl808-2023-02-19-r0
└── u-boot-initial-env-bl808-2023-02-19-r0

What do I have to do to flash the resulting image on an ox64 board?

Fishwaldo commented 1 year ago

This just builds the SD card image - openbouffalo-image-dev-bl808.wic.bz2. Flash that to a SD card.

For OpenSBI/UBoot etc you need to flash m0/d0 lowload and bl808-firmware.bin from the buildroot_OpenBouffalo repository

KorribanMaster commented 1 year ago

Are there any plans to provide Opensbi m0/d0 lowload? u-bbot seems to be built already here and i have found recipes in meta-bl808 for opensbi.

Fishwaldo commented 1 year ago

Probably not. It requires Yocto to build a multilib version of GCC (newlib for bare metal and glibc for Linux) and the xuantie toolchain we build is "hard" to get building a multilib version in yocto. (Patches welcome if you figure it out).

KorribanMaster commented 6 months ago

I am currently working on the ox64 again and would actually like to give it a shot to get a complete yocto build to work. I would appreciate if you could elaborate a little on what is the problem/required work missing to get m0/do lowload and how to integrate opensbi

From comparing with the buildroot repository i have found the oblfr recipe that seems to be missing. This seems to be the key to build both m0/d0 lowload. However i do not see a reason for a multilib here?

For obensbi the recipe is there and builds so should be good?