34 lines
600 B
Markdown
34 lines
600 B
Markdown
# Linux 下搭建驱动开发环境
|
|
|
|
## 升级
|
|
|
|
```bash
|
|
# Ubuntu
|
|
apt-get update
|
|
apt-get upgrade
|
|
# Manjaro
|
|
pacman -Syu
|
|
```
|
|
|
|
## 安装基础软件包
|
|
|
|
```bash
|
|
# Ubuntu
|
|
apt-get install build-essential kernel-package kernek-source libncurses5-dev libssl-dev libelf-dev
|
|
```
|
|
|
|
## 安装内核源码
|
|
|
|
```bash
|
|
# Ubuntu
|
|
apt-get install linux-source-$(uname -r)
|
|
# Manjaro
|
|
uname -r
|
|
pacman -Ss linux-headers
|
|
pacman -S linux<kernel version>-headers
|
|
```
|
|
|
|
## 重启
|
|
|
|
由于升级时可能升级了内核,需要重启一次才能生效,否则 uname 返回值会与实际不符,以及导致其他奇怪问题。
|