VAR-SOM-MX6 Ubuntu Create Ubuntu Alip SDCARD: Difference between revisions

From Variscite Wiki
 
(17 intermediate revisions by the same user not shown)
Line 46: Line 46:
<enter to select default last sector>
<enter to select default last sector>
t
t
2
83
83
w
w
$ sync
</pre>
</pre>
Check:
<pre>
$ sudo fdisk /dev/sdxxx
p
q
   Device Boot      Start        End      Blocks  Id  System
   Device Boot      Start        End      Blocks  Id  System
/dev/sde1            8192      24575        8192    c W95 FAT32 (LBA)
/dev/sde1            8192      24575        8192    b W95 FAT32
/dev/sde2          24576    7421875     3698650   83  Linux
/dev/sde2          24576    7862271     3918848   83  Linux
</pre>
if you do "ls /dev/sdxxx*" you will get 2 /dev/sdxxx1 and /dev/sdxxx2. Use them in the following commands.
Format:
<pre>
$ mkfs.vfat /dev/sdxxx1 -nBOT-VARSOM
$ mkfs.ext4 /dev/sdxxx2 -Lrootfs
$ sync
</pre>
Remove/Insert the SCDARD or just push the media icons to mount the new empty partitions.


= Install U-Boot images =
= Install U-Boot images =
{{note|Note:<br/>Make sure you built U-Boot for SD.|info}}
<pre>$ ~/var-som-mx6-alip/uboot-imx
$ sudo dd if=SPL of=/dev/sdxxx bs=1K seek=1; sync
$ sudo dd if=u-boot.img of=/dev/sdxxx bs=1K seek=69; sync
</pre>
= Copy the kernel image and device tree files =
= Copy the kernel image and device tree files =
<pre>
$ cd ~/var-som-mx6-alip/linux-2.6-imx
$ sudo cp arch/arm/boot/uImage /media/BOT-VARSOM/
$ sudo cp arch/arm/boot/dts/*var*.dtb /media/BOT-VARSOM/
</pre>
= Install the root file system =
= Install the root file system =
<pre>$ mkdir ~/var-som-mx6-alip
<pre>$ sudo tar xvf ~/Downloads/linaro-alip-20151215-v3.tar.bz2 -C /media/rootfs
$ cd ~/var-som-mx6-alip
$ sudo mkdir rootfs
$ cd rootfs
$ sudo tar xvf ~/Downloads/linaro-alip-20151215-v1.tar.bz2
</pre>
</pre>


= Deploy the kernel modules =
= Deploy the kernel modules =
<pre>
$ cd ~/var-som-mx6-alip/linux-2.6-imx
$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/media/rootfs/
</pre>
= Deploy the Wi-Fi modules and firmware =
= Deploy the Wi-Fi modules and firmware =
<pre>
$ cd ~/var-som-mx6-alip/build-utilites
$ gedit setup-env
set:
export ROOTFS=/media/rootfs
</pre>
<pre>
$ ./sudo_build_wl18xx.sh modules
$ ./sudo_build_wl18xx.sh firmware
$ ./sudo_build_wl18xx.sh bt-firmware
$ sudo umount /dev/sdxxx*
</pre>

Latest revision as of 06:46, 19 January 2016

VAR-SOM-MX6 - Ubuntu Linaro Alip-20151215 Create Bootable SDCARD


Note:
Under construction!!! Under construction!!! Under construction!!!


Overview

Ubuntu Linaro Alip is pre built file system. For more information Ubuntu based Rootfs provided by Linaro. Variscite used linaro-vivid-alip-20151215-714 image added Vivante Graphic acceleration and compile the GStreamer with i.MX6 support.

Build Ubuntu Alip NFS is prerequisite step. Please make sure you run it and have a complete NFS build directory as described in the linked WIKI.

The steps require to build an Bootable SDCARD:

  1. Build Ubuntu Alip NFS.
  2. Format and partition the SCDARD
  3. Install U-Boot images
  4. Copy the kernel image and device tree files.
  5. Install the root file system
  6. Deploy the kernel modules
  7. Deploy the Wi-Fi modules and firmware

Format and partition the SCDARD

Use to find oout your SDCARD device.

$ dmesg 

change /dev/sdxxx with your real device in the following commands.
Delete the MBR on your SDCARD

$ cd ~/var-som-mx6-alip
$ sudo umount /dev/sdxxx*
$ sudo dd if=/dev/zero of=/dev/sdxxx bs=1K count=10
$ sync

Use fdisk to partition the SDCARD

$ sudo fdisk /dev/sdxxx
n
p
1
8192
24575
t
b
n
p
2
24576
<enter to select default last sector>
t
2
83
w
$ sync

Check:

$ sudo fdisk /dev/sdxxx
p
q
   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            8192       24575        8192    b  W95 FAT32
/dev/sde2           24576     7862271     3918848   83  Linux

if you do "ls /dev/sdxxx*" you will get 2 /dev/sdxxx1 and /dev/sdxxx2. Use them in the following commands. Format:

$ mkfs.vfat /dev/sdxxx1 -nBOT-VARSOM
$ mkfs.ext4 /dev/sdxxx2 -Lrootfs
$ sync

Remove/Insert the SCDARD or just push the media icons to mount the new empty partitions.

Install U-Boot images

Note:
Make sure you built U-Boot for SD.
$ ~/var-som-mx6-alip/uboot-imx
$ sudo dd if=SPL of=/dev/sdxxx bs=1K seek=1; sync
$ sudo dd if=u-boot.img of=/dev/sdxxx bs=1K seek=69; sync

Copy the kernel image and device tree files

$ cd ~/var-som-mx6-alip/linux-2.6-imx
$ sudo cp arch/arm/boot/uImage /media/BOT-VARSOM/
$ sudo cp arch/arm/boot/dts/*var*.dtb /media/BOT-VARSOM/

Install the root file system

$ sudo tar xvf ~/Downloads/linaro-alip-20151215-v3.tar.bz2 -C /media/rootfs

Deploy the kernel modules

$ cd ~/var-som-mx6-alip/linux-2.6-imx
$ sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules_install INSTALL_MOD_PATH=/media/rootfs/

Deploy the Wi-Fi modules and firmware

$ cd ~/var-som-mx6-alip/build-utilites
$ gedit setup-env
set:
export ROOTFS=/media/rootfs
$ ./sudo_build_wl18xx.sh modules
$ ./sudo_build_wl18xx.sh firmware
$ ./sudo_build_wl18xx.sh bt-firmware
$ sudo umount /dev/sdxxx*