1*4882a593Smuzhiyun***************** 2*4882a593SmuzhiyunWarp i.MX7S board 3*4882a593Smuzhiyun***************** 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThis file documents the Buildroot support for the Warp i.MX7S board. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunBuild 8*4882a593Smuzhiyun===== 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunFirst, configure Buildroot for the Warp i.MX7S board: 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun make warp7_defconfig 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunBuild all components: 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun make 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunYou will find in output/images/ the following files: 19*4882a593Smuzhiyun - imx7s-warp.dtb 20*4882a593Smuzhiyun - rootfs.ext4 21*4882a593Smuzhiyun - rootfs.tar 22*4882a593Smuzhiyun - sdcard.img 23*4882a593Smuzhiyun - u-boot-dtb.imx 24*4882a593Smuzhiyun - zImage 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunFlash the eMMC image 27*4882a593Smuzhiyun==================== 28*4882a593Smuzhiyun 29*4882a593SmuzhiyunIn the U-Boot prompt lauch: 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun=> ums 0 mmc 0 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunThis will mount the eMMC content in the host PC as a mass storage device. 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunTo determine the device associated to the eMMC have a look in the 36*4882a593Smuzhiyun/proc/partitions file: 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun cat /proc/partitions 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunBuildroot prepares a bootable "sdcard.img" image in the output/images/ 41*4882a593Smuzhiyundirectory, ready to be dumped into the eMMC. Launch the following 42*4882a593Smuzhiyuncommand: 43*4882a593Smuzhiyun 44*4882a593Smuzhiyunsudo dd if=output/images/sdcard.img of=/dev/<your-emmc-device> 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun*** WARNING! This will destroy all the eMMC content. Use it with care! *** 47*4882a593Smuzhiyun 48*4882a593SmuzhiyunFor details about the medium image layout, see the definition in 49*4882a593Smuzhiyunboard/warp7/genimage.cfg. 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunHow to recover from a bad eMMC image 52*4882a593Smuzhiyun==================================== 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunIn case a bad U-Boot has been flashed to the eMMC and the board no 55*4882a593Smuzhiyunlonger boots, it is possible to recover using the imx_usb_loader utility. 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunPut the warp7 board in USB download mode by removing the CPU board 58*4882a593Smuzhiyunfrom the base board then putting switch 2 in the upper position. 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunConnect a USB to serial adapter between the host PC and warp7 serial 61*4882a593SmuzhiyunUSB port, and also a USB cable between the OTG warp7 port and the host 62*4882a593SmuzhiyunPC. 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunCopy u-boot-dtb.imx to the imx_usb_loader folder. 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunLoad u-boot-dtb.imx via USB: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun$ sudo ./imx_usb u-boot-dtb.imx 69*4882a593Smuzhiyun 70*4882a593SmuzhiyunThen U-Boot should start and its messages will appear in the console program. 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunOpen a terminal program such as minicom. 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunUse the default environment variables: 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun=> env default -f -a 77*4882a593Smuzhiyun=> saveenv 78*4882a593Smuzhiyun 79*4882a593SmuzhiyunRun the DFU command: 80*4882a593Smuzhiyun=> dfu 0 mmc 0 81*4882a593Smuzhiyun 82*4882a593SmuzhiyunTransfer u-boot-dtb.imx that will be flashed into the eMMC: 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun$ sudo dfu-util -D u-boot-dtb.imx -a boot 85*4882a593Smuzhiyun 86*4882a593SmuzhiyunThen on the U-Boot prompt the following message should be seen after a 87*4882a593Smuzhiyunsuccessful upgrade: 88*4882a593Smuzhiyun 89*4882a593Smuzhiyun#DOWNLOAD ... OK 90*4882a593SmuzhiyunCtrl+C to exit ... 91*4882a593Smuzhiyun 92*4882a593Smuzhiyun=> ums 0 mmc 0 93*4882a593Smuzhiyun 94*4882a593Smuzhiyunsudo dd if=output/images/sdcard.img of=/dev/<your-emmc-device> 95*4882a593Smuzhiyun 96*4882a593SmuzhiyunPut warp7 back in eMMC boot mode by placing switch 2 in the lower position 97*4882a593Smuzhiyunand reboot the board. 98*4882a593Smuzhiyun 99*4882a593SmuzhiyunBoot the Warp i.MX7S board 100*4882a593Smuzhiyun========================== 101*4882a593Smuzhiyun 102*4882a593SmuzhiyunTo boot your newly created system: 103*4882a593Smuzhiyun- put a micro USB cable into the Debug USB Port and connect using a terminal 104*4882a593Smuzhiyun emulator at 115200 bps, 8n1; 105*4882a593Smuzhiyun- power on the board. 106*4882a593Smuzhiyun 107*4882a593SmuzhiyunUsing Wifi 108*4882a593Smuzhiyun========== 109*4882a593Smuzhiyun 110*4882a593Smuzhiyun# modprobe brcmfmac 111*4882a593Smuzhiyun# iwconfig wlan0 essid ACCESSPOINTNAME 112*4882a593Smuzhiyun# wpa_passphrase ACCESSPOINTNAME > /etc/wpa.conf 113*4882a593Smuzhiyun(enter the wifi password and press enter) 114*4882a593Smuzhiyun# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa.conf & 115*4882a593Smuzhiyun# udhcpc -i wlan0 116*4882a593Smuzhiyun# ping buildroot.org 117*4882a593Smuzhiyun 118*4882a593SmuzhiyunEnjoy! 119