Changes between Version 1 and Version 2 of ventana/openwrt


Ignore:
Timestamp:
11/02/2017 03:05:21 PM (7 years ago)
Author:
Tim Harvey
Comment:

updated blockdev installation

Legend:

Unmodified
Added
Removed
Modified
  • ventana/openwrt

    v1 v2  
    148148}}}
    149149
    150 
     150[=#blockdev]
    151151= Installing OpenWrt on a removable block storage device: MicroSD card / USB drive / mSATA device =
     152Installing OpenWrt on a removable block storage device: MicroSD card / USB drive / mSATA device
    152153The latest OpenWrt package and kernel configuration in the trunk BSP supports the necessary configuration for booting to a USB/micro-SD/mSATA based root filesystem (static kernel support for chipidea USB host controller, EHCI, and MXS phy) therefore all you need to do is create the storage device using the tarball of the root filesystem.
    153154
    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
     155Starting 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
     159usage: mkimage_blkdev file1.tar[.gz|.bz2] [file2.tar[.gz|.bz2] ...] /dev/sdX
     160
     161The following block devices were found:
     162 /dev/sdc: JetFlash Transcend 32GB 29.4219GB
     163 /dev/sdd: Kingston DataTraveler SE9 7.26727GB
    160164}}}
    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
     166An example execution of this may look as follows:
     167{{{#!bash
     168sudo ./gateworks/scripts/mkimage_blkdev bin/imx6/gateworks-imx6-ventana-*.tar.gz /dev/sdc
     169}}}
     170
     171In 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
     173To flash an msata device, you may have to do the following:
     174{{{#!bash
     175sudo FORCE=1 ./gateworks/scripts/mkimage_blkdev bin/imx6/gateworks-imx6-ventana-*.tar.gz /dev/sde
     176The 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
     179To see information on the manual steps for creating a bootable tarball, please visit the [wiki:linux/blockdev linux/blockdev] page.