How to build the NOR flash image?

Since the vendor provided image doesn’t enable U-boot serial output, it’s almost impossible to debug boot problems, and impossible to have an elegant way to switch kernels.

Is there any procedure to rebuild the U-boot part of the SPI flash?

I think you use ROCK 5B, you can follow this guide to build u-boot:

https://wiki.radxa.com/Rock5/guide/build-u-boot-on-5b

You can refer to how armbian build its u-boot spi flash: https://github.com/armbian/build/blob/master/config/sources/families/include/rockchip64_common.inc#L199, which will add GPT partition table.