video/vnc: add vnc_fb_register
Summary
Optimize the initialization of vnc, change it to vnc_fb_register.
Impact
Nuttx vnc
Testing
run nuttx with vnc
I successfully compiled sim:vncserver in the docker [ https://github.com/apache/nuttx/pkgs/container/nuttx%2Fapache-nuttx-ci-linux], Proceed as follows:
- sudo docker run -it -v $PWD:/home/nuttx ghcr.io/apache/nuttx/apache-nuttx-ci-linux:latest@sha256:324c3660ddcc78fd7efcee52b80bc8060f007da44a3f51b7551bb27ba16ab34a /bin/bash
- cd /home/nuttx/nuttx
- rm Make.defs
- ln -s /home/nuttx/nuttx/tools/../boards/sim/sim/sim/scripts/Make.defs Make.defs
- make distclean
- ./tools/configure.sh -l sim:vncserver
- make clean;make
I guess the error is due to linker doesn't move the unused fb_register from final image. It could be fixed by changing fb_register to macro or inline function.
@jianglianfang before we merge it, could you please confirm that this tutorial still working after your modifications: https://nuttx.apache.org/docs/latest/platforms/sim/sim/index.html#running-vnc-server ?
Could you please verify the compilation error?