Step 6 : Flash SD Card

  • In this program, you are going to learn

  • How to ?

  • Go to main directory

$ cd $HOME
$ mkdir Zephyr_flash
$ cd Zephyr_flash
$ wget https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/bcm2711-rpi-4-b.dtb
$ wget https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/bootcode.bin
$ wget https://raw.githubusercontent.com/raspberrypi/firmware/master/boot/start4.elf
  • Create the config.txt file and copy the below lines and save the file

$ vi config.txt
  • Place the following contents in config.txt file.

kernel=zephyr.bin
arm_64bit=1
enable_uart=1
uart_2ndstage=1
  • Copy the zephyr.bin file to Zephyr_flash directory

$ cp /home/test/zephyrproject/zephyr/build/zephyr/zephyr.bin /home/Zephyr_flash
  • Copy all the below files to TF card(SD card)

bcm2711-rpi-4-b.dtb
bootcode.bin
start4.elf
config.txt
zephyr.bin
  • Copy using cp command,

$ cp Zephyr_flash/bcm2711-rpi-4-b.dtb /mnt/boot/
$ cp Zephyr_flash/bootcode.bin /mnt/boot/
$ cp Zephyr_flash/start4.elf /mnt/boot/
$ cp Zephyr_flash/config.txt /mnt/boot/
$ cp Zephyr_flash/zephyr.bin /mnt/boot/