Revisions
Revisions | Description | Details |
V1.0 | Initial version |
|
V1.2 | Make a little update | 1. Modify the path of the toolchain 2. Remove the command: make menuconfig 3. Modify the path of folder "out" in some commands |
Hardware Requirement
Overview
Ubuntu uses the same packaging management system (deb and apt) and with each development cycle pulls in the latest packages from Debian and then adapts them to Ubuntu specifics and adds more features and patches where necessary. They also push changes back to Debian and often developers are Ubuntu and Debian developers. Both of them have a nice UI and can install softwares easier than Yocto. The purpose of this doc is to install the Debian 8 Jessie Rootfs on NXP i.MX6ULL EVK Board.
The doc contains several steps as following:
1. Download and compile the u-boot, kernel and dtb.
2. Get and modify the linaro rootfs.
3. Download all things to the SD card via MfgTool.
4. Run the Debian 8 Jessie in the board.
a. Download the toolchain
cd ~/
mkdir toolchain
tar xvf gcc-linaro-6.3.1-2017.02-i686_arm-linux-gnueabihf.tar.xz -C toolchain/ --strip-components 1
export ARCH=arm
export CROSS_COMPILE=../toolchain/bin/arm-linux-gnueabihf-
mkdir out
b. Download and make the u-boot
cd ~/
mkdir uboot-imx
tar jxvf uboot-imx-imx_v2016.03_4.1.15_2.0.0_ga.tar.bz2 -C uboot-imx/ --strip-components 1
cd uboot-imx
make mx6ull_14x14_evk_defconfig
make
c. Download and make the kernel and dtb
cd ~/
mkdir linux-imx
tar jxvf linux-imx-imx_4.1.15_2.0.0_ga.tar.bz2 -C linux-imx/ --strip-components 1
cd linux-imx
vi arch/arm/configs/imx_v7_defconfig
Add a line “CONFIG_FHANDLE=y” in the file to prevent the error when boot into rootfs.
******************************************************************************
Note: If you want to use the HDMI port instead of LCD to output the screen,
you should modify the file /arch/arm/boot/dts/imx6ull-14x14-evk.dts to add a child node in &i2c2 :
sii902x: sii902x@39 {
compatible = "SiI,sii902x";
pinctrl-names = "default";
interrupt-parent = <&gpio2>;
interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
mode_str ="1280x720M@60";
bits-per-pixel = <16>;
reg = <0x39>;
status = "okay";
};
******************************************************************************
make imx_v7_defconfig
make -j4 zImage dtbs
d. Copy the u-boot, kernel and dtb to a folder
cd ~/
sudo cp uboot-imx/u-boot.imx out/
sudo cp linux-imx/arch/arm/boot/zImage out/
sudo cp linux-imx/arch/arm/boot/dts/imx6ull-14x14-evk.dtb out/
cd ~/
wget -c https://releases.linaro.org/debian/images/alip-armhf/16.04/linaro-jessie-alip-20160428-22.tar.gz
mkdir rootfs
tar xvf linaro-jessie-alip-20160428-22.tar.gz -C rootfs/ --strip-components 1
cd rootfs
tar jcvf linaro-jessie-alip-20160428-22.tar.bz2 ./*
sudo mv linaro-jessie-alip-20160428-22.tar.bz2 ../out
Now the uboot, kernel, dtb and rootfs are ready in folder ~/out/!
Download the MfgTool in:
Select the “IMX6_L4.1.15_2.0.0_MFG-TOOL” and download.
Extract “L4.1.15_2.0.0-ga_mfg-tools.tar.gz” to Windows, and then extract again the “mfgtools-with-rootfs.tar.gz” to <your path>/mfgtools/.
You should rename the files in the folder ~/out/ and copy to the path <your path>/mfgtools/Profiles/Linux/OS Firmware/files/ to replace the original files:
u-boot.imx -> u-boot-imx6ull14x14evk_sd.imx
zImage -> zImage
imx6ull-14x14-evk.dtb -> zImage-imx6ull-14x14-evk.dtb
linaro-jessie-alip-20160428-22.tar.bz2 -> rootfs_nogpu.tar.bz2
Switch the SW602 in i.MX6ULL EVK board to D1: off, D2: on, insert the TF card in slot SD2 and power on the board.
Connect the board with PC by two micro-USB to USB cables(one is for downloading and another is for watching log)
Finally, open the script “mfgtool2-yocto-mx-evk-sdcard-sd2.vbs” in the <your path>/mfgtools/.
When the “HID-compliant device” shows then click “Start”.
If the processing is done, all things have been download to the board and you can go to the next step.
The following table shows the DIP switch settings for booting from the TF slot.
Switch | D1 | D2 | D3 | D4 |
SW601 | OFF | OFF | ON | OFF |
SW602 | ON | OFF | - | - |
Then power on the board and the logs will show in the serial console. Debian 8 will automatic login to root.
******************************************************************************
Note: If you want to use the HDMI port instead of LCD to output the screen,
you should press any key when the log: Hit any key to stop autoboot shows and change the bootargs like following example:
setenv bootargs console=ttymxc0,115200 init=/init video=mxcfb0:dev=hdmi,1280x720M@60,if=RGB24,bpp=32 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off vmalloc=256M androidboot.console=ttymxc0 consoleblank=0 androidboot.hardware=freescale cma=384M
saveenv
******************************************************************************
When inputting “startx &” in serial console, the alip GUI will appear in the screen.
You can also use command ”apt-get” to install softwares(E.g. Firefox as following).
******************************************************************************
Note: If you have issues with “sudo” on user UID, need to execute the following commands:
root@linaro-alip:~# chown root:root /usr/bin/sudo
root@linaro-alip:~# chmod 4755 /usr/bin/sudo
root@linaro-alip:~# chown root:root /usr/lib/sudo/sudoers.so
root@linaro-alip:~# chown root:root /etc/sudoers
root@linaro-alip:~# chown root:root /etc/sudoers.d/
root@linaro-alip:~# chown root:root /etc/sudoers.d/README
Note: If you have issues with “su” from user to root, need to execute the following commands:
root@linaro-alip:~# chown root:root /bin/su
root@linaro-alip:~# chmod 4755 /bin/su
Note: If you want to disable the warning window “Failed to apply network settings” after executing command “startx &”, you should deactive the Bluetooth:
root@linaro-alip:~# sudo systemctl stop bluetooth.service
root@linaro-alip:~# sudo systemctl disable bluetooth.service
******************************************************************************