Step 6 : Flash SD Card ====================== .. tab-set:: .. tab-item:: Flash SD Card * In this program, you are going to learn .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow * How to ? .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Create a directory inside Main directory ` .. _zephyr_rpi_step6_0: .. tab-set:: .. tab-item:: Create a directory inside Main directory * Go to main directory .. code-block:: c $ cd $HOME $ mkdir Zephyr_flash $ cd Zephyr_flash * Download and place these files using web link: * `bcm2711-rpi-4-b.dtb `_ * `bootcode.bin `_ * `start4.elf `_ * Alternatively download using wget command, .. code-block:: c $ 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 .. code-block:: c $ vi config.txt * Place the following contents in ``config.txt`` file. .. code-block:: c kernel=zephyr.bin arm_64bit=1 enable_uart=1 uart_2ndstage=1 * Copy the zephyr.bin file to Zephyr_flash directory .. code-block:: c $ cp /home/test/zephyrproject/zephyr/build/zephyr/zephyr.bin /home/Zephyr_flash * Copy all the below files to TF card(SD card) .. code-block:: c bcm2711-rpi-4-b.dtb bootcode.bin start4.elf config.txt zephyr.bin * Copy using ``cp`` command, .. code-block:: c $ 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/