-
Notifications
You must be signed in to change notification settings - Fork 2
Build
If you just want to build Linux without Yocto.
- Add the tool chain to your PATH.
- Set CROSS_COMPILE to the prefix of the tools added above.
- Set SYSROOT to the sysroot directory in the tool chain.
- Set ARCH to arm64 for X9 or XLF or arm for 5500.
$ git clone https://github.com/axxia/linux-yocto.git
$ cd linux-yocto
To list the available tags,
$ git tag | grep axxia
To create the branch.
$ git checkout -b build\_branch $TAG
- For 5500, use arch/arm/configs/axxia_5500_defconfig.
- For 5600, use arch/arm64/configs/axxia_x9_defconfig.
- For Lionfish, use arch/arm64/configs/axxia_xlf_defconfig.
For builds on the /preempt-rt/ branches, add _rt_ before defconfig.
To configure Linux use just the config name, for example axxia_x9_defconfig, as a make target. Don't include the path (arch/arm64/configs).
$ make <config name>
$ make -j
Note that in some cases, you may have to limit the number of cores used by adding an integre argument to -j, for example, "make -j8".
To add a version string, include LOCALVERSION= when
building. Use the output of "git describe --dirty | sed -e 's/axxia_linux_preempt\-rt_//' | sed -e 's/axxia\_linux\_//'" to match
the Intel builds.
Two things are required to boot Linux.
- A Linux Kernel
- A Device Tree
With U-Boot as the boot loader, the above need to be put into a format that U-Boot understands. The following describes using the FIT format (see doc/uImage.FIT/howto.txt in the U-Boot source tree). The device tree compiler (avaiable at https://git.kernel.org/pub/scm/utils/dtc/dtc.git) must be installed; it is called by mkimage. This format allows the image to be verified before it is used. It is possible to put more than one object in a FIT image. The following describes creating three images,
- Just the Linux kernel.
- Linux and the device tree.
- Linux, the device tree, and a root file system.
The simulator only supports using separate images for Linux and the device tree. In this case, simply used the device tree binary (.dtb) created during the Linux build process.
$ ${CROSS\_COMPILE}objcopy -O binary -R .note -R .comment -S vmlinux vmlinux.bin
$ gzip -f -9 vmlinux.bin
To get a list of available device trees for X9 or XLF, do the following.
ls arch/arm64/boot/dts/intel/ax*dtb
For 5500,
ls arch/arm/boot/dts/ax*dtb
- Copy the following device tree to linux.its.
- Replace DESCRIPTION with a string, "Axxia Linux" for example.
- Replace ARCH with arm64 for X9 or XLF or arm for 5500.
- Replace LOAD and ENTRY with 0x80000 for X9 or XLF or 0x408000 for 5500.
- Replace KERNEL with the full path to the compressed binary Linux kernel created above.
- mkimage -f linux.its linux.fit
/dts-v1/;
/ {
description = DESCRIPTION;
#address-cells = <1>;
images {
kernel {
description = "Linux Kernel";
data = /incbin/("KERNEL");
type = "kernel";
arch = "ARCH";
os = "linux";
compression = "gzip";
load = <LOAD>;
entry = <ENTRY>;
hash1 {
algo = "crc32";
};
hash2 {
algo = "sha1";
};
};
};
configurations {
default = "conf";
conf {
description = DESCRIPTION;
kernel = "kernel";
};
};
};
- Copy the following device tree to multi.its.
- Replace DESCRIPTION with a string, "Axxia Linux" for example.
- Replace ARCH with arm64 for X9 or XLF and arm for 5500.
- Replace KERNEL with the full path to the compressed binary Linux kernel created above.
- Replace DEVICETREE with the full path to the device tree binary from the Linux build.
- mkimage -f multi.its multi.fit
/dts-v1/;
/ {
description = DESCRIPTION;
#address-cells = <1>;
images {
kernel {
description = "Linux Kernel";
data = /incbin/("KERNEL");
type = "kernel";
arch = "ARCH";
os = "linux";
compression = "gzip";
load = <LOAD>;
entry = <ENTRY>;
hash1 {
algo = "crc32";
};
hash2 {
algo = "sha1";
};
};
fdt {
description = "Flattened Device Tree blob";
data = /incbin/("DEVICETREE");
type = "flat\_dt";
arch = "ARCH";
compression = "none";
hash1 {
algo = "crc32";
};
hash2 {
algo = "sha1";
};
};
};
configurations {
default = "conf";
conf {
description = DESCRIPTION;
kernel = "kernel";
fdt = "fdt";
};
};
};
As the root file system will reside in memory, it should be small. To create the file system image, start with an ext2 image and compress it gzip -f -9.
- Copy the following device tree to complete.its.
- Replace DESCRIPTION with a string, "Axxia Linux" for example.
- Replace ARCH with arm64 for X9 or XLF and arm for 5500.
- Replace KERNEL with the full path to the compressed binary Linux kernel created above.
- Replace DEVICETREE with the full path to the device tree binary from the Linux build.
- Replace RAMDISK with the full path to the compressed disk image created above.
- mkimage -f multi.its multi.fit
/dts-v1/;
/ {
description = DESCRIPTION;
#address-cells = <1>;
images {
kernel {
description = "Linux Kernel";
data = /incbin/("KERNEL");
type = "kernel";
arch = "ARCH";
os = "linux";
compression = "gzip";
load = <LOAD>;
entry = <ENTRY>;
hash1 {
algo = "crc32";
};
hash2 {
algo = "sha1";
};
};
fdt {
description = "Flattened Device Tree blob";
data = /incbin/("DEVICETREE");
type = "flat\_dt";
arch = "ARCH";
compression = "none";
hash1 {
algo = "crc32";
};
hash2 {
algo = "sha1";
};
};
ramdisk {
description = "Ramdisk Image";
data = /incbin/("RAMDISK");
type = "ramdisk";
arch = "ARCH";
os = "linux";
compression = "gzip";
hash1 {
algo = "crc32";
};
hash2 {
algo = "sha1";
};
};
};
configurations {
default = "conf";
conf {
description = DESCRIPTION;
kernel = "kernel";
fdt = "fdt";
ramdisk = "ramdisk";
};
};
};