154 | | Requirements: |
155 | | 1. Get a microsd card / usb drive / mSATA device |
156 | | 2. Build OpenWrt |
157 | | 3. Run the makedisk script from the OpenWrt BSP on a linux computer **making sure to correctly point to your removable media** |
158 | | {{{ |
159 | | ./scripts/makedisk /dev/sdc trunk/bin/imx6/openwrt-imx6-ventana-rootfs.tar.gz |
| 155 | Starting with the OpenWrt 16.02 branch, we have decided to include a script ({{{mkimage_blkdev}}}) to make creating bootable block storage devices with various tarballs's easier. The usage is as follows: |
| 156 | {{{#!bash |
| 157 | # The system has 2x block devices currently connected |
| 158 | > ./gateworks/scripts/mkimage_blkdev |
| 159 | usage: mkimage_blkdev file1.tar[.gz|.bz2] [file2.tar[.gz|.bz2] ...] /dev/sdX |
| 160 | |
| 161 | The following block devices were found: |
| 162 | /dev/sdc: JetFlash Transcend 32GB 29.4219GB |
| 163 | /dev/sdd: Kingston DataTraveler SE9 7.26727GB |
161 | | 4. Place the uSD in your ventana board and power up - by default the ventana bootloader env scripts will boot from mmc if present and a kernel is found, otherwise it will fallback to its on-board flash. This can be verified by booting into the bootloader and running the command 'print' which will show all the environment variables. bootcmd will indicate if it is trying to reach the mmc. If there is no indication of this, the bootloader may need to be updated via instructions here: [wiki:ventana/bootloader#BuildingfromSource] |
| 165 | |
| 166 | An example execution of this may look as follows: |
| 167 | {{{#!bash |
| 168 | sudo ./gateworks/scripts/mkimage_blkdev bin/imx6/gateworks-imx6-ventana-*.tar.gz /dev/sdc |
| 169 | }}} |
| 170 | |
| 171 | In the above example, we pass in several tarballs that match the gateworks-imx6-ventana-*.tar.gz expansion and flash it onto /dev/sdc. In the process, we re-partition /dev/sdc with a single ext4 partition where the contents of the tarballs are placed. |
| 172 | |
| 173 | To flash an msata device, you may have to do the following: |
| 174 | {{{#!bash |
| 175 | sudo FORCE=1 ./gateworks/scripts/mkimage_blkdev bin/imx6/gateworks-imx6-ventana-*.tar.gz /dev/sde |
| 176 | The reason for this is that msata devices often don't look like a 'block storage device' to linux, but instead as a hard drive. There are protections built into the mkimage_blkdev script in order to avoid user error and accidentally wipe out their own hard disks, which is the reason for the FORCE=1 override. Please use this flag only while exercising extreme caution. |
| 177 | }}} |
| 178 | |
| 179 | To see information on the manual steps for creating a bootable tarball, please visit the [wiki:linux/blockdev linux/blockdev] page. |