安装 toolchains 主要是gcc 和 make 其他的缺什么安什么
sudo apt install gcc binutils
aarch64-linux-gnu-gcc --version
gcc --version
下载源码: https://git.kernel.org/pub/scm/linux/kernel/git/
cd /usr/src
git clone https://kernel.googlesource.com/pub/scm/linux/kernel/git/mmind/linux-rockchip 没开梯子 访问不了。。。。
git clone https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git 很慢,100多k每秒。。。。
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git/snapshot/linux-rockchip-6.5-rc1.tar.gz 直接浏览器下载,几M每秒
然后ftp linux , put过去 ,然后 tar -zxvf .......
ssh -2 yang@192.168.0.105
you can use make menuconfig for a ncurses-based interface or make xconfig for an X-based interface
The kernel configuration command, given a default configuration file, is as follows:
make <foo_defconfig>
This will generate a new .config file in the main (root) directory, while the
old .config will be renamed .config.old. This can be useful to revert the
previous configuration changes. Then, to customize the configuration, you can use the
following command:
make menuconfig
16 Introduction to Kernel Development
Saving your changes will update your .config file. While you could share this config
with your teammates, you are better off creating a default configuration file in the same
minimal format as those shipped with the Linux kernel sources. To do that, you can use
the following command:
make savedefconfig
This command will create a minimal (since it won't store non-default settings)
configuration file. The generated default configuration file will be called defconfig
and stored at the root of the source tree. You can store it in another location using the
following command:
mv defconfig arch/<arch>/configs/myown_defconfig
This way, you can share a reference configuration inside the kernel sources and
other developers can now get the same .config file as you by running the
following command:
make myown_defconfig
获取本机配置文件 cp /boot/config-`uname -r` .config 或者 zcat /proc/config.gz
cp /boot/config-`uname -r` .config #在本机配置的基础上修改配置文件
make menuconfig
make -j8 #8核心一起工作
apt install libssl-dev
安装内核,本地安装 make install
报错 找不到6.5的头文件。。。。
make headers_install #error: rsync , apt install rsync ,继续 headers_install 成功;
make install #机子直接重启。。。。。。apt update ,apt upgrade ,在升级了一个initramfs 什么的 可能,再来就不崩溃重启 还是报错,好像是无线网卡驱动不支持?
make modules
make modules_install #没报错。。