提交 f9961a5a 编写于 作者: C Caspar Zhang

Refresh doc

Signed-off-by: NCaspar Zhang <caspar@linux.alibaba.com>
上级 ee56913f
......@@ -57,21 +57,21 @@ Alternatively, you can use Git to clone from our git repo.
```shell
git clone git@github.com:alibaba/cloud-kernel.git
cd cloud-kernel
```
> You may have noticed that `master` is not the default branch, instead, you would get a branch named like `ck-4.19.y`. This is due to our 'rebase' approach, every time we rebase from an LTS version, a new branch will be created and then be used as the default branch.
Cloud Kernel is developed based on upstream LTS kernel v4.19.91, with `master` branch as the release branch and `linux-next` as the development branch. It is recommended to develop based on `linux-next` branch.
### 2.2 Build kernel
Before building the kernel, you will need a kernel config file. Here we provide a [default kernel config](config-4.19.y-x86_64) in `master` branch, just fetch it and rename to `.config`, then copy it to the top of kernel source directory.
```bash
wget https://raw.githubusercontent.com/alibaba/cloud-kernel/master/config-4.19.y-x86_64
cp config-4.19.y-x86_64 cloud-kernel/.config
cd cloud-kernel/
wget https://raw.githubusercontent.com/alibaba/cloud-kernel/configs/config-4.19.y-x86_64 -O .config
```
> The default kernel config is a simplified and customized version, which cuts numerous driver modules, like storage drivers, network drivers, etc. Hence, you should not run the kernel directly on a physical machine, otherwise the system would probably fail to boot. It is recommended that you run the kernel in KVM guests only, unless you are pretty sure required kernel drivers have enabled in your config.
> If you want to run Cloud Kernel on a physical machine anyway, you may use the [alternative config](https://raw.githubusercontent.com/alibaba/cloud-kernel/configs/kernel-4.19-x86_64-alios7.config)
Now you can start your build, presuming you have already installed all required toolchains, then execute:
......@@ -147,3 +147,10 @@ Other rules include:
<snip>
ICX: intel_rapl: Fix module autoloading issue
```
#### 2.3.4 How to submit
Once your patches are ready, you can submit your patches in the follow ways:
+ Send your patch to the [mailing list: aliyunlinux2-dev@linux.alibaba.com](mailto:aliyunlinux2-dev@linux.alibaba.com) for review, which is a traditional way, or:
+ Send us a pull request in [GitHub pages](https://github.com/alibaba/cloud-kernel/pulls).
......@@ -9,6 +9,5 @@ Mailing Lists
## Alibaba Cloud OS & Kernel Developers Group
+ Click to [Subscribe](mailto:alibabacloud-linux-dev+subscribe@googlegroups.com?subject=subscribe);
+ Click to [Unsubscribe](mailto:alibabacloud-linux-dev+unsubscribe@googlegroups.com?subject=subscribe);
+ Start a thread in the mailing list by writing an E-mail to: [alibabacloud-linux-dev@googlegroups.com](mailto:alibabacloud-linux-dev@googlegroups.com)
+ Feel free to send your patches to [aliyunlinux2-dev@linux.alibaba.com](mailto:aliyunlinux2-dev@linux.alibaba.com);
+ Subscription is not available for now.
......@@ -64,7 +64,7 @@ sudo yum install -y kernel kernel-devel kernel-headers
+ Download from [Releases](https://github.com/alibaba/cloud-kernel/releases) page for a stable release and extract the source;
+ Or clone from the project repo: `git clone git@github.com:alibaba/cloud-kernel.git`.
+ Step 2: Fetch a [default kernel config](config-4.19.y-x86_64) from `master` branch and rename it to `.config`, then copy it to the top of kernel source directory;
+ Step 2: Fetch a [default kernel config](https://github.com/alibaba/cloud-kernel/blob/configs/config-4.19.y-x86_64) from `configs` branch and rename it to `.config`, then copy it to the top of kernel source directory;
+ Step 3: Compile and install kernel via the following commands:
......
......@@ -57,22 +57,21 @@ tar xzf ck-release-7.tar.gz
```shell
git clone git@github.com:alibaba/cloud-kernel.git
cd cloud-kernel
```
> 您或许已经注意到项目的默认分支并非 `master` 分支而是形如 `ck-4.19.y` 格式的分支。这是由于我们采用了 "rebase" 策略来更新我们的代码,每次从 Upstream LTS 版本同步代码后,我们都会 rebase 到新的代码分支,并将此分支作为新的默认分支。
Cloud Kernel 是基于 Upstream LTS v4.19.91 版本进行开发的,正式发布分支为 `master` 分支,开发分支为 `linux-next` 分支。建议您基于开发分支进行开发。
### 2.2 构建内核
构建内核之前,您需要一个内核配置文件。我们在 `master` 分支提供了一个[默认内核配置文件](config-4.19.y-x86_64),您只需下载并将其重命名为 `.config`,然后保存到内核源码树的顶层目录下。
构建内核之前,您需要一个内核配置文件。我们在 `configs` 分支提供了一个[默认内核配置文件](https://github.com/alibaba/cloud-kernel/blob/configs/config-4.19.y-x86_64),您只需下载并将其重命名为 `.config`,然后保存到内核源码树的顶层目录下。
```bash
wget https://raw.githubusercontent.com/alibaba/cloud-kernel/master/config-4.19.y-x86_64
cp config-4.19.y-x86_64 cloud-kernel/.config
cd cloud-kernel/
wget https://raw.githubusercontent.com/alibaba/cloud-kernel/configs/config-4.19.y-x86_64 -O .config
```
> 请注意,默认内核配置文件是一个精简定制版本,删掉了众多驱动模块,其中就包括存储设备驱动和网卡驱动等。因此您不应该直接将此内核运行于物理机上,否则物理机可能因缺少驱动而无法启动。我们推荐您只在 KVM 虚拟机中运行该内核,或者您确认已自行在非 KVM 平台中启用所需的驱动模块。
> 如需在物理机上运行,可以使用我们提供的[备用配置文件](https://raw.githubusercontent.com/alibaba/cloud-kernel/configs/kernel-4.19-x86_64-alios7.config)
假设您已事先安装好所需的工具链,此时您可以开始构建内核了:
......@@ -148,3 +147,10 @@ Cloud Kernel 的开发和 Linux 内核社区开发模式基本一致,您可以
```
此条规则既适用于回合补丁,也适用于自己制作的补丁。
#### 2.3.4 提交补丁的方式
当您的补丁完成后,可以提交给我们审核。当前我们接受下列两种方式进行审核:
+ 使用传统的内核开发者的方式,发送补丁到[开发者邮件列表: aliyunlinux2-dev@linux.alibaba.com](mailto:aliyunlinux2-dev@linux.alibaba.com),或者:
+[GitHub 页面](https://github.com/alibaba/cloud-kernel/pulls) 上给我们发送 pull request.
......@@ -9,6 +9,5 @@
## Alibaba Cloud Linux 操作系统 & 内核开发者列表
+ 点击[订阅](mailto:alibabacloud-linux-dev+subscribe@googlegroups.com?subject=subscribe)列表;
+ 点击[退订](mailto:alibabacloud-linux-dev+unsubscribe@googlegroups.com?subject=subscribe)列表;
+ 发送邮件至 [alibabacloud-linux-dev@googlegroups.com](mailto:alibabacloud-linux-dev@googlegroups.com) 参与讨论。
+ 请发送补丁到 [aliyunlinux2-dev@linux.alibaba.com](mailto:aliyunlinux2-dev@linux.alibaba.com) 邮件列表;
+ 该邮件列表暂时不接受自主订阅。
......@@ -64,7 +64,7 @@ sudo yum install -y kernel kernel-devel kernel-headers
+[Releases](https://github.com/alibaba/cloud-kernel/releases) 页面获取最新的稳定版内核代码压缩包,并解压到当前目录;
+ 或者从项目 Git 树 Clone 代码: `git clone git@github.com:alibaba/cloud-kernel.git`.
+ 第二步,从 `master` 分支获取[默认内核配置文件](config-4.19.y-x86_64),重命名为 `.config`, 并复制到源码树的顶层目录下;
+ 第二步,从 `configs` 分支获取[默认内核配置文件](https://github.com/alibaba/cloud-kernel/blob/configs/config-4.19.y-x86_64),重命名为 `.config`, 并复制到源码树的顶层目录下;
+ 第三步,通过下列命令编译并安装内核:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册