Buildroot packages

Hi,

how does one add the target packages to buildroot rootfs in this SDK? I am trying to add lighthttpd package.
in the buildroot-2021.05 folder

make milkv-duo_musl_riscv64_defconfig
make menuconfig

Then build the image as specified in the docs. But the build script seems to be overwriting the changes to the milkv-duo_musl_riscv64_defconfig buildroot config.

Thank you.

just use
mv ./configs/milkv-duo_musl_riscv64_defconfig ./configs/milkv-duo_musl_riscv64_defconfig_old
mv ./.config ./configs/milkv-duo_musl_riscv64_defconfig

Is the package included in the available packages in the buildroot? If it is it’s pretty easy to add it your image. You need to edit the config file for the busybox build. Just edit the file and add BR2_PACKAGE_PACKAGE_NAME=Y in the file duo-buildroot-sdk/buildroot-2021.05/configs/milkv-duo_musl_riscv64_defconfig. If it’s not part of the packages available as part of the buildroot I know there is a way to add a custom package but I havn’t done it.

menuconfig is ok,just overwrite the config file,and after added packages to the package folder,you can see your packages

Thank you, I got it to work, and successfully compiled and added light to the rootfs. But some packages, such as modem manager, require glibc and not musl toolchane. is it possible to change the toolchain to either ulibc or glibc?

Thanks,
Daniel

there is no way to use glibc via official toolchain,because of the issue is from thead(the soc’s source CPU IP manufacturer).
But you can try rv64imafdc instead, it can compile glibc softwares,however, maybe have some bugs?
the best way is discard glibc use musl

How do I use “rv64imafdc” in buildroot?

Thanks.

riscv64-unknown-elf-gcc test.c -march=rv64imafdc -mabi=lp64d
like the line,you can [make (package)] individually,the detail you can search online

I don’t know whether it works, but you can have a try:

SDK_DIR = /home/kilo/Downloads/duo-buildroot-sdk #your dir

TEMP_PATH=${SDK_DIR}/host-tools/gcc/riscv64-elf-x86_64/bin

TEMP_TOOL=${TEMP_PATH}/riscv64-elf-

export CFLAGS= -march=rv64imafdc -mabi=lp64d -mcmodel=medany

export CC=${TEMP_TOOL}gcc

export CXX=${TEMP_TOOL}g++

make ARCH=riscv CROSS_COMPILE=$(TEMP_TOOL) {your package}