Hi,
I just cut and pasted part of my notes as what I had kinda done to date.
Tftpboot and other junk not included.
This is based on the installation of the 12.04 variant of LMCE.
My notes (so far) for investigation of Cubox ARM support on LMCE.
Log in as root.
apt-get update
apt-get upgrade
apt-get dist-upgrade
Preparing to build from sources.
We need to have gcc-arm-linux-gnueabi installed.
apt-get install gcc-arm-linux-gnueabi
We also need to have u-boot-tools installed (for mkimage).
apt-get install u-boot-tools
Plus, we need to have lzop installed (for "make zImage").
apt-get install lzop
Finally, we need git installed
apt-get install git
If logged in as root when we check our directory tree...
ls
... we have 'Desktop' and 'new-installer' as directories.
Step 1. - u-boot for cu-box with pxe patches
To build the bootloader...
git clone https://github.com/SolidRun/u-boot-imx6.git
Now when we check our directory tree...
ls
... we now have 'Desktop', 'new-installer' and 'u-boot-imx6' as directories.
Then,
cd u-boot-imx6
Set up our environment variables.
export ARCH=arm
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
Then we build the bootloader.
make mx6_cubox-i_config
make
A successful build will create u-boot-* files (including u-boot-img) plus a SPL file.
The SPL file is used for the actual machine detection and initialization.
This file must be flashed on offset 1KByte of the boot micro SD.
The u-boot.img is the second stage bootloader.
It can be flashed at offset 42KByte from the start of the boot micro SD.
Or it can alternatively be put as-is on the first partition of the micro SD.
The general bootloader flashing procedure is...
dd if=SPL of=/dev/sdX bs=1K seek=1
...where /dev/sdX is the location of your microSD card.
For flashing u-boot.img as raw to the micro SD -
dd if=u-boot.img of=/dev/sdX bs=1K seek=42
WARNING: Make sure you are flashing u-boot to the proper target device. Putting the wrong device identifier could wipe your hard drive.
You can boot from the microSD at this point without booting a Linux system (only the u-boot).
Step 2. - Kernel build (with appropriate patches)
Compiling the kernel.
Change directory to /u-boot-imx6/arch/arm in order to edit the file config.mk
modify the line
CROSS_COMPILE ?= arm-linux-
to
CROSS_COMPILE ?= arm-linux-gnueabi-
cd back to the 'Desktop', 'new-installer' and 'u-boot-imx6' directories
The 3.10 LTS kernel is the main kernel to be used for end users and general availability.
It is based on Linaro kernel 3.10 LTS, i.MX6 Freescale patches and patches from Russell King, Jon Nettleton and various other developers.
The kernel can be built using the following commands.
git clone https://github.com/SolidRun/linux-linaro-stable-mx6.git
Upon completion when we now check our directory tree...
ls
... we now have 'Desktop', 'new-installer', 'u-boot-imx6' and 'linux-linaro-stable-mx6' as directories.
Then,
cd linux-linaro-stable-mx6
Set up our environment variables.
export ARCH=arm
export CROSS_COMPILE=/usr/bin/arm-linux-gnueabi-
make imx_v7_cbi_hb_defconfig
make zImage imx6q-cubox-i.dtb imx6dl-cubox-i.dtb imx6dl-hummingboard.dtb
make modules
The generated files are -
arch/arm/boot/zImage
arch/arm/boot/dts/imx6q-cubox-i.dtb
arch/arm/boot/dts/imx6dl-cubox-i.dtb
arch/arm/boot/dts/imx6dl-hummingboard.dtb
The first file is the actual kernel. The other three are device tree files loaded by the boot loader.
So from what I looked at in DisklessCreate - yeah this approach was 'different'.
Don't know if I can use "trusty image" because of the patches.
I was going to create a menuconfig for pxelinux.cfg and chose the package I wanted to install something like...
DISPLAY message
DEFAULT cubox blah blah
PROMPT 1
TIMEOUT 0
LABEL cubox blah blah
kernel /where the heck my vmlinux is
append root=/dev/nfs boot=casper netboot=nfs nfsroot=IP.OF.YOUR.SERVER:/srv/tftpboot/cubox blah blah initrd= cubox/blah blah/initrd.lz --
kinda thing. You know. HACKABILLY.
I also need those .dtb files to support the different variants of the cubox-hummimgboard I believe. (I don't know for sure. Suppose to automatically load the proper .dtb depending upon hardware).
Anyway I'll poke around at this end.
Cheers.