-
Notifications
You must be signed in to change notification settings - Fork 0
08 CREATE CUSTOM SDFUSE IMAGE (TO BURN YOUR APPLICATION INTO OTHER BOARDS)
- Host Linux PC (tested on Ubuntu 16.04 LTS)
Create and run the following script on your host linux PC:
#!/bin/sh
echo "Copy ROOTFS to local disk...\n"
ssh root@<BOARD_IP> "dd if=/dev/mmcblk0p7" | dd of=bk_rootfs.raw
echo "Getting tar...\n"
sudo guestfish << _EOF_
add bk_rootfs.raw
run
mount /dev/sda /
tar-out / rootfs.tar
_EOF_
echo "Gzipping...\n"
gzip rootfs.tar
rm -rf bk_rootfs.raw
This script will backup the whole root partition, if you did not modify kernel and modules, that's the only thing you need.
Download from rushup.tech/KitraGTI the lastest image and flash it on an SDCARD.
Plug your sdcard into your PC, if you are using Ubuntu it will mount the sdcard automatically and you will see three partitions (boot, modules and rootfs).
Go into rootfs and replace rootfs.tar.gz with the one generated by your script.
Run:
sync
To be sure the file was copied fully, if you get an error due to insufficient memory, resize your rootfs partition of the sdcard with gparted.
- Replace custom kernel and modules
- For KitraGTI
- In the /boot partition replace the following with the one you created:
- Image
- s5p6818-artik710-raptor-rev03.dtb
- In the /modules partition delete the folder and replace it with the one contained in the modules.img generated by your kernel building. You can obtain it by mounting modules.img.
- Generate boot.img
- Check the boot partition with lsblk
- Run dd if=/dev/<partition> of=/home/boot.img
- In the rootfs partition replace the following:
- modules.img
- boot.img
- In the /boot partition replace the following with the one you created:
- For KitraGTI
Check the /dev/ name of your sdcard, to do it run:
lsblk
if its /dev/sdb go ahead, if not you need to change the script below with your dev name.
Run:
SIZEIMG=$(sudo /sbin/fdisk -l /dev/sdb | grep sdb[3] | awk '{print $3}')
echo "Sectors: $SIZEIMG"
sudo dd if=/dev/sdb of=./sd_fuse.img count=$SIZEIMG
This will create an sd_fuse.img file that can be used to flash other boards (program emmc).
This is the simplest way to do it, for more andvanced operations check the following repositries: