Changes between Version 20 and Version 21 of OpenWrt/building
- Timestamp:
- 06/05/2019 09:59:08 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OpenWrt/building
v20 v21 224 224 * The resulting flash firmware image will be {{{gateworks/images/}}}. 225 225 226 If you wish to create an MMC 'disk image' for Ventana boards that boot from eMMC: 227 {{{#!bash 228 # create an ext4 filesystem image (using mkfs from Newport BSP) 229 OUT=owrt.ext4 230 SIZEMB=256M # adjust this larger if bootfs.tar.gz and rootfs.tar.gz don't fit 231 wget https://raw.githubusercontent.com/Gateworks/bsp-newport/master/mkfs 232 chmod +x mkfs 233 sudo mkfs ext4 $OUT $SIZEMB bin/imx6/gateworks-imx6-ventana-bootfs.tar.gz bin/imx6/gateworks-imx6-ventana-rootfs.tar.gz 234 226 If you wish to create an MMC 'disk image' for Ventana boards that boot from eMMC or microSD: 227 {{{#!bash 235 228 # create a filesystem image 236 229 OUTFS=owrt.ext4 237 SIZE MB=256M230 SIZEFSMB=256M 238 231 MNT=$(mktemp -d -p/tmp) 239 truncate -s $SIZE MB $OUTFS232 truncate -s $SIZEFSMB $OUTFS 240 233 sudo mkfs.ext4 -q -F -O ^64bit -L rootfs $OUTFS 241 234 sudo mount $OUTFS $MNT … … 245 238 246 239 # create a disk image 247 OUTIMG=ventana_emmc.img 248 truncate -s 1M $OUTIMG 240 SIZEMB=7248M 241 OUTIMG=ventana.img 242 truncate -s $SIZEMB $OUTIMG 249 243 # partition disk - single ext partition 250 printf " ,,L,,\n" | sudo sfdisk -uS $OUTIMG244 printf "2048,,L,,\n" | sudo sfdisk -uS $OUTIMG 251 245 sudo dd if=ventana/images/SPL of=$OUTIMG bs=512 seek=2 252 246 sudo dd if=ventana/images/u-boot.img of=$OUTIMG bs=512 seek=138 253 247 sudo dd if=$OUTFS of=$OUTIMG bs=1M seek=1 248 # create a compressed disk image that can be installed via U-Boot's gzwrite 249 gzip -f -k $OUTIMG && ls -lh $OUTIMG* 254 250 255 251 # create a jtag binary image 256 252 mkimage_jtag --emmc -e --partconf=user $OUTIMG@user:erase_all:0x0- > $OUTIMG.bin 257 258 # create a compressed disk image that can be installed via U-Boot's gzwrite 259 gzip -f -k $OUTIMG && ls -lh $OUTIMG* 260 }}} 261 * ventana_emmc.img is a non-compressed disk image containing SPL, U-Boot and the ext4 partition which can be copied directly to a microSD or eMMC 262 * ventana_emmc.bin is a JTAG'able binary image containing SPL, U-Boot and the ext4 partition 263 * ventana_emmc.img.gz is a compressed disk image which can be updated via U-Boot for example with a 'gzwrite mmc $dev $loadaddr $filesize' 253 }}} 254 * SIZEFSMB above is the size of the filesystem to create in MB - this needs to be large enough to accommodate the files you are putting there... a good rule of thumb is to keep it as small as possible and use {{{resize2fs}}} on it to grow it to the size of the partition you place it in after first boot 255 * SIZEMB above is the size of the disk image to create in MB which needs to be large enough to fit the filesystem + the 1MB offset of the partition table yet small enough to fit the actual device you will copy this to in the future (such as microSD or eMMC). Note that 7248M is the appropriate size for the 8GiB eMMC's that Gateworks uses 256 * ventana.img is a non-compressed disk image containing SPL, U-Boot and the ext4 partition which can be copied directly to a microSD or eMMC via: 257 - U-Boot with a 'mmc write' 258 - Linux with a 'dd if=ventana.img.gz of=$blockdev' 259 * ventana.img.gz is a compressed disk image which can be flashed onto an MMC device via: 260 - U-Boot for example with a 'gzwrite mmc $dev $loadaddr $filesize' 261 - Linux for example with a 'zcat ventana.img.gz | sudo dd of=$blockdev' 262 * ventana.bin is a JTAG'able binary image containing SPL, U-Boot and the ext4 partition 264 263 265 264 To flash the file to the board, please see this link: [wiki:jtag_instructions#Instructions JTAG Programming Instructions]