I made a custom os for the raspberry pi CM4 with IO board using buildroot.
make raspberrypicm4io_64_defconfig
make menuconfig
make all
Buildroot OS boots with no errors.
However, when i flash the OS image to the CM4 the USB ports do not work, on the IO board.
I edited the boot partition and added dtoverlay=dwc2,dr_mode=host
and removed all unnecessary cables connected to the IO board like the micro-USB cable, but the USB ports still don't work.
I can confirm the the USB ports work, because i tested them with the official rasbian os.