Linux-Intel-Galileo-Gen2-QuarkX1000
https://github.com/slavaim/Linux-Intel-Galileo-Gen2-QuarkX1000
https://slavaim.blogspot.com/2016/03/building-linux-kernel-for-intel-galileo.html
Building Linux kernel for Intel Galileo QuarkX1000
Intel Galileo board features Intel Quark X1000 SoC with a single core single threaded x86 CPU similar to Pentium.
Intel Galileo with OLIMEX JTAG and FTDI USB-to-Serial
I will show how to build a 3.8.7 version of the Linux kernel for a Linux image iot-devkit-201510010757-mmcblkp0-galileo.direct.xz that can be downloaded from Intel® Galileo Board Downloads under Intel® Galileo Board microSD Card Linux* Operating System Image caption, at the time of writing this was the latest stable OS image build for the board.
Below are the steps to build a kernel and modules
1. Get BSPv1.1.0 package from Intel® Quark™ BSP Release Archive or from my GitHub BSPv1.1.0 where it is stored for convinience, you need v1.1.0. Its file name is Board_Support_Package_Sources_for_Intel_Quark_v1.1.0.7z . The newer BSP versions contain bugs and I believe were never used by Intel to build any kernel, for example patch list in BSPv1.2.1.7 doesn't match with the kernel version 3.14 used in upstream.cfg file and gitsetup.py script is missing, though it can be borrowed from an older BSP package it shows that BSPv1.2.1.7 was released without any sanity check.
2. Extract BSPv1.1.0 . Below BSP_DIR must be replaced with a full path to the directory where BSP package was extracted, for example /work/IntelGalileo/BSPv1.1.0/ .
3. Build the tools for cross compilation. Replace BSP_DIR with a path to extracted BSP package. This could take a couple of hours depending on Internet connection and CPUs power. Replace BSP_DIR with a path to extracted BSP package.
$ cd BSP_DIR
$ tar zxf meta-clanton_v1.1.0-dirty.tar.gz
$ cd meta-clanton_v1.1.0-dirty
$ ./setup.sh -e meta-clanton-bsp
$ source iot-devkit-init-build-env build
$ bitbake image-full
4. Build the kernel. To build the kernel you need a .config file. Intel documents will direct you to use meta/cfg/kernel-cache/bsp/quark/quark.cfg from the kernel sources downloaded and patched by running gitsetup.py but a kernel built with this config file doesn't contain modules for memory card interface so the kernel unable to mount file system from the card. The better way is to borrow a .config file from a running system created from iot-devkit-201510010757-mmcblkp0-galileo.direct.xz image by executing
$ zcat /proc/config.gz > .config
and copying the file to a building machine. Alternatively the file can be downloaded from my GitHub repository by this link .config .
Extract the kernel package. It contains a script to obtain the source code and patches.
$ cd BSP_DIR
$ tar zxf quark_linux_v3.8.7+v1.1.0.tar.gz
$ mv quark_linux_v3.8.7+v1.1.0 linux_v3.8.7
$ cd linux_v3.8.7
The following two steps can be skipped if you already have set git user name and email, if a user and email are not defined there will be errors while executing gitsetup.py, note that a user and email are not required to be genuine
$ git config –-global user.name "user"
$ git config –-glob al user.email "user@hotmail.com"
Execute gitsetup.py, this will clone and patch the required kernel version from the kernel repository.
$ ./gitsetup.py
Change a directory to ./work that contains the source code and copy a config file
$ cd work
$ cp <A .config file obtained as described above> .config
Set a path for cross-compiler. Replace BSP_DIR with a path to extracted BSP package.
$ export PATH=BSP_DIR/meta-clanton_v1.1.0-dirty/build/tmp/sysroots/x86_64-linux/usr/bin/i586-poky-linux:$PATH
The following command will build a kernel and modules.
$ ARCH=i386 CROSS_COMPILE=i586-poky-linux- make -j4
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· Ollama——大语言模型本地部署的极速利器
· DeepSeek如何颠覆传统软件测试?测试工程师会被淘汰吗?