############################################################################## # In this document, we outline the steps required to make a standalone flash # image for the Ox64 that boots NuttX. We will be using the OpenBouffalo # buildroot overlay to help us with this, but we will not be building the # Linux kernel or rootfs. ############################################################################## # We are using a patched OpenBouffalo overlay so that NuttX is loaded at # 0x50200000 instead of 0x50000000. If you wish, you can build your own # NuttX image whose memory map starts at 0x50000000, and then continue following # these instructions using the upstream OpenBouffalo overlay instead. git clone -b nuttx_poc https://github.com/Pavlos1/buildroot_bouffalo git clone https://github.com/buildroot/buildroot export BR_BOUFFALO_OVERLAY_PATH=$(pwd)/buildroot_bouffalo cd buildroot make BR2_EXTERNAL=$BR_BOUFFALO_OVERLAY_PATH pine64_ox64_defconfig # Note: These are the same settings as you would set when building a regular # OpenBouffalo linux image. make menuconfig # * Navigate to Target Options # * Enable Integer Multiplication and Division (M) # * Enable Atomic Instructions (A) # * Enable Single-precision Floating-point (F) # * Enable Double-precision Floating-point (D) # * Set Target ABI to lp64d # * Under Toolchain, enable Fortran support and OpenMP support # Avoid building the whole system... make opensbi uboot oblfr cd output/images # Download the NuttX image. You may replace it with your own if you wish, but # make sure it still ends up at output/images/ImageNuttx wget -O ImageNuttx https://github.com/lupyuen2/wip-pinephone-nuttx/releases/download/bl808d-1/Image # Compress the NuttX image lz4 ImageNuttx ImageNuttx.lz4 # Generate our equivalent of `bl808-firmware.bin`. # Note: I don't think `u-boot.dtb` gets picked up by NuttX at all. It's just # here so that mergebin.py has something vaguely sensible to process. $BR_BOUFFALO_OVERLAY_PATH/board/pine64/ox64/mergebin.py \ -o bl808-nuttx.bin -k ImageNuttx.lz4 -d u-boot.dtb -s fw_jump.bin ############################################################################## # File checklist (in output/images): # * m0_lowload_bl808_m0.bin # * d0_lowload_bl808_d0.bin # * bl808-nuttx.bin # # Flash these the same way you would flash normal OpenBouffalo images. ##############################################################################