Difference between revisions of "Building VIBE2 Boot Image"
(→Linux Kernel) |
|||
Line 55: | Line 55: | ||
== Linux Kernel == | == Linux Kernel == | ||
=== TI BSP === | === TI BSP === | ||
− | Download: | + | ---- |
− | ~/ | + | '''Download:''' |
− | + | '''~/''' | |
− | + | ||
− | For TI v4.4.x: | + | git clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git |
− | ~/ti-linux-kernel-dev | + | cd ti-linux-kernel-dev/ |
− | git checkout origin/ti-linux-4.4.y -b ti-linux-4.4.y | + | |
+ | '''For TI v4.4.x:''' | ||
+ | '''~/ti-linux-kernel-dev''' | ||
+ | |||
+ | git checkout origin/ti-linux-4.4.y -b ti-linux-4.4.y | ||
Update GCC cross compiler path in system.sh | Update GCC cross compiler path in system.sh | ||
− | cp system.sh.sample system.sh | + | cp system.sh.sample system.sh |
Update CC variable with path with GCC compiler path set above | Update CC variable with path with GCC compiler path set above | ||
− | nano system.sh | + | nano system.sh |
− | CC=/home/yantrr/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- | + | CC=/home/yantrr/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- |
− | Build: | + | '''Build:''' |
− | ~/ti-linux-kernel-dev/ | + | '''~/ti-linux-kernel-dev/''' |
− | ./build_kernel.sh | + | |
+ | ./build_kernel.sh | ||
Update LINUX_GIT variable in system.sh | Update LINUX_GIT variable in system.sh | ||
− | nano system.sh | + | nano system.sh |
− | LINUX_GIT=/home/yantrr/ti-linux-kernel-dev/ignore/linux-src/ | + | LINUX_GIT=/home/yantrr/ti-linux-kernel-dev/ignore/linux-src/ |
+ | |||
+ | '''Change USB0 Mode : ''' | ||
+ | For VIBE/VIBE2, very first you need to change the USB0 dr_mode from <span style="color:#FF0000"> peripheral </span> to <span style="color:green"> host </span> in Beaglebone Black kernel source file KERNEL/arch/arm/boot/dts/am335x-bone-common.dtsi while rebuilding the kernel | ||
− | + | &usb0 { | |
− | + | ||
− | &usb0 { | + | |
status = "okay"; | status = "okay"; | ||
dr_mode = "host"; | dr_mode = "host"; | ||
− | }; | + | }; |
− | ZTE and Telit modems driver are already in | + | ZTE and Telit modems driver are already in Beaglebone Black kernel source version 4.4, so no need of any patch for it. |
− | USB Driver configuration for SEW modems: | + | '''USB Driver configuration for SEW modems:''' |
− | nano KERNEL/drivers/usb/serial/option.c | + | {{Box-Info|text=only needed for SEW modems.}} |
− | /* Yantrr Strongrising products */ | + | nano KERNEL/drivers/usb/serial/option.c |
− | #define YANTRR_VENDOR_ID 0x21f5 | + | /* Yantrr Strongrising products */ |
− | #define YANTRR_PRODUCT_VAYU3GH 0x2012 | + | #define YANTRR_VENDOR_ID 0x21f5 |
− | #define YANTRR_PRODUCT_VAYU3GC 0x2009 | + | #define YANTRR_PRODUCT_VAYU3GH 0x2012 |
− | #define YANTRR_DONGLE_ID 0x20a6 | + | #define YANTRR_PRODUCT_VAYU3GC 0x2009 |
− | #define YANTRR_DONGLE_PRODUCT 0x1105 | + | #define YANTRR_DONGLE_ID 0x20a6 |
+ | #define YANTRR_DONGLE_PRODUCT 0x1105 | ||
− | /*Also, add entries in struct usb_device_id option_ids[]*/ | + | /*Also, add entries in struct usb_device_id option_ids[]*/ |
− | { USB_DEVICE(YANTRR_VENDOR_ID, YANTRR_PRODUCT_VAYU3GH) }, | + | { USB_DEVICE(YANTRR_VENDOR_ID, YANTRR_PRODUCT_VAYU3GH) }, |
− | { USB_DEVICE(YANTRR_VENDOR_ID, YANTRR_PRODUCT_VAYU3GC) }, | + | { USB_DEVICE(YANTRR_VENDOR_ID, YANTRR_PRODUCT_VAYU3GC) }, |
− | { USB_DEVICE(YANTRR_DONGLE_ID, YANTRR_DONGLE_PRODUCT) }, | + | { USB_DEVICE(YANTRR_DONGLE_ID, YANTRR_DONGLE_PRODUCT) }, |
Revision as of 07:18, 10 May 2017
Note : All steps are executed on the Ubuntu 16.04.2 LTS and as a root user. Most of the steps are similar Robert C Nelson BBB Wiki.
Contents
Basic Requirements
- Running a recent release of Debian, Fedora or Ubuntu; without OS Virtualization Software.
- ARM Cross Compiler – Linaro: http://www.linaro.org
- Linaro Toolchain Binaries: http://www.linaro.org/downloads/
- Bootloader
- Das U-Boot – the Universal Boot Loader: http://www.denx.de/wiki/U-Boot
- Source: http://git.denx.de/?p=u-boot.git;a=summary
- Linux Kernel
- Linus's Mainline tree: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
- ARM based rootfs
- Debian : http://www.debian.org/
- Ubuntu: http://www.ubuntu.com
ARM Cross Compiler: GCC
Download and extract the ARM Cross compiler linaro gcc.
~/
wget -c https://releases.linaro.org/components/toolchain/binaries/5.4-2017.01/arm-linux-gnueabihf/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz tar xf gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf.tar.xz export CC=`pwd`/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
Test:
~/
${CC}gcc --version arm-linux-gnueabihf-gcc (Linaro GCC 5.4-2017.01) 5.4.1 20161213 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Bootloader: U-Boot
Download :
~/
git clone https://github.com/u-boot/u-boot cd u-boot/ git checkout v2017.03 -b tmp
Patches :
wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.03/0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch wget -c https://rcn-ee.com/repos/git/u-boot-patches/v2017.03/0002-U-Boot-BeagleBone-Cape-Manager.patch patch -p1 < 0001-am335x_evm-uEnv.txt-bootz-n-fixes.patch patch -p1 < 0002-U-Boot-BeagleBone-Cape-Manager.patch
Configure and Build :
~/u-boot
make ARCH=arm CROSS_COMPILE=${CC} distclean make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_defconfig make ARCH=arm CROSS_COMPILE=${CC}
Linux Kernel
TI BSP
Download:
~/
git clone https://github.com/RobertCNelson/ti-linux-kernel-dev.git cd ti-linux-kernel-dev/
For TI v4.4.x:
~/ti-linux-kernel-dev
git checkout origin/ti-linux-4.4.y -b ti-linux-4.4.y
Update GCC cross compiler path in system.sh
cp system.sh.sample system.sh
Update CC variable with path with GCC compiler path set above
nano system.sh CC=/home/yantrr/gcc-linaro-5.4.1-2017.01-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
Build:
~/ti-linux-kernel-dev/
./build_kernel.sh
Update LINUX_GIT variable in system.sh
nano system.sh LINUX_GIT=/home/yantrr/ti-linux-kernel-dev/ignore/linux-src/
Change USB0 Mode :
For VIBE/VIBE2, very first you need to change the USB0 dr_mode from peripheral to host in Beaglebone Black kernel source file KERNEL/arch/arm/boot/dts/am335x-bone-common.dtsi while rebuilding the kernel
&usb0 { status = "okay"; dr_mode = "host"; };
ZTE and Telit modems driver are already in Beaglebone Black kernel source version 4.4, so no need of any patch for it.
USB Driver configuration for SEW modems:
|
only needed for SEW modems. |
nano KERNEL/drivers/usb/serial/option.c /* Yantrr Strongrising products */ #define YANTRR_VENDOR_ID 0x21f5 #define YANTRR_PRODUCT_VAYU3GH 0x2012 #define YANTRR_PRODUCT_VAYU3GC 0x2009 #define YANTRR_DONGLE_ID 0x20a6 #define YANTRR_DONGLE_PRODUCT 0x1105
/*Also, add entries in struct usb_device_id option_ids[]*/ { USB_DEVICE(YANTRR_VENDOR_ID, YANTRR_PRODUCT_VAYU3GH) }, { USB_DEVICE(YANTRR_VENDOR_ID, YANTRR_PRODUCT_VAYU3GC) }, { USB_DEVICE(YANTRR_DONGLE_ID, YANTRR_DONGLE_PRODUCT) },