From ec666d14bca1abccb220427dc4aa1b3155f3a4b9 Mon Sep 17 00:00:00 2001 From: Signor Pellegrino <68112357+flyrouter@users.noreply.github.com> Date: Sat, 29 Mar 2025 21:54:01 +0300 Subject: [PATCH] Update faq.md --- en/faq.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/en/faq.md b/en/faq.md index 49dede4..fe9ecce 100644 --- a/en/faq.md +++ b/en/faq.md @@ -198,6 +198,32 @@ Make sure to use your own IP address and path to the NFS share! strings dumpfile.bin | grep ^ethaddr ``` +### How to build an image and firmware components ? + +To build an image to upload via TFTP or a programmer, you will need several components: +- U-Boot bootloader for your device type +- Linux kernel taken from the firmware archive +- root file system in squashfs format taken from the firmware archive + +You can use either the full build script from the Firmware archive: +https://raw.githubusercontent.com/OpenIPC/firmware/refs/heads/master/general/scripts/repack_firmware.sh + +Or its simplified copy with an example here: + +```bash +#!/bin/sh + +uboot=u-boot-ssc338q-nor.bin # Get from https://github.com/OpenIPC/firmware/releases/download/latest/u-boot-ssc338q-nor.bin +kernel=uImage.ssc338q # Get from https://github.com/OpenIPC/builder/releases/download/latest/ssc338q_fpv_openipc-urllc-aio-nor.tgz +rootfs=rootfs.squashfs.ssc338q # Get from https://github.com/OpenIPC/builder/releases/download/latest/ssc338q_fpv_openipc-urllc-aio-nor.tgz +output=fullflash-openipc-ssc338q-openipc-fpv-nor.bin + +dd if=/dev/zero bs=1K count=5000 status=none | tr '\000' '\377' > ${output} +dd if=${uboot} of=${output} bs=1K seek=0 conv=notrunc status=none +dd if=${kernel} of=${output} bs=1K seek=320 conv=notrunc status=none +dd if=${rootfs} of=${output} bs=1K seek=2368 conv=notrunc status=none +``` + ### Majestic #### How to get a memory dump for debugging?