Skip to content

Instantly share code, notes, and snippets.

@jordemort
Created July 9, 2021 17:02
Show Gist options
  • Save jordemort/584840fa042d410ede7dc18f232bc873 to your computer and use it in GitHub Desktop.
Save jordemort/584840fa042d410ede7dc18f232bc873 to your computer and use it in GitHub Desktop.
uuu_version 1.2.39
# This command will be run when i.MX6/7 i.MX8MM, i.MX8MQ
SDP: boot -f u-boot.imx
# Burn the bootloader
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f u-boot.imx
FB: ucmd nandbcb init ${fastboot_buffer} boot ${fastboot_bytes}
# Boot the mfgtools kernel
FB: ucmd setenv fastboot_buffer ${loadaddr}
FB: download -f mfgtool/zImage
FB: ucmd setenv fastboot_buffer ${fdt_addr}
FB: download -f mfgtool/imx7d-sdb-gpmi-weim.dtb
FB: ucmd setenv fastboot_buffer ${initrd_addr}
FB: download -f fsl-image-mfgtool-initramfs-sercomm-na503s.cpio.gz.u-boot
FB: ucmd setenv bootargs ${bootargs} ${mtdparts}
FB: ucmd echo ${bootargs}
FB: acmd bootz ${loadaddr} ${initrd_addr} ${fdt_addr}
# Read the MTD partitions
FBK: ucmd cat /proc/mtd
FBK: ucmd cat /proc/mtd | while read dev size erase name; do mtd=${dev:3}; mtd=${mtd%:}; name=${name%\"}; name=${name#\"}; echo export $name=$mtd >> /tmp/mtd.sh; done;
FBK: ucmd chmod 777 /tmp/mtd.sh
FBK: ucmd mount -t debugfs debugfs /sys/kernel/debug
# burn rootfs
FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${rootfs} 0 0
FBK: ucmd source /tmp/mtd.sh; flash_erase /dev/mtd${sc_default} 0 0
FBK: ucmd source /tmp/mtd.sh; ubiattach /dev/ubi_ctrl -m ${rootfs}
FBK: ucmd source /tmp/mtd.sh; ubimkvol /dev/ubi0 -Nrootfs -m
FBK: ucmd source /tmp/mtd.sh; mkfs.ubifs -x zlib /dev/ubi0_0
FBK: ucmd source /tmp/mtd.sh; mkdir -p /mnt/mtd
FBK: ucmd source /tmp/mtd.sh; mount -t ubifs ubi0:rootfs /mnt/mtd
FBK: acmd export EXTRACT_UNSAFE_SYMLINKS=1; tar -Jx -C /mnt/mtd
FBK: ucp bantha-sercomm-na503s-bundle.tar.xz t:-
FBK: ucmd sync
FBK: ucmd umount /mnt/mtd
FBK: ucmd sync
FBK: done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment