forked from openkylin/docs
Merge branch 'master' into dev-moshengren
This commit is contained in:
commit
b4ef57ed56
|
@ -9,19 +9,26 @@ dateCreated: 2022-03-11T03:16:28.968Z
|
|||
---
|
||||
|
||||
# 加入SIG组的申请流程
|
||||
**申请**:
|
||||
**参与SIG组贡献**:
|
||||
1. 签署CLA https://cla.openkylin.top/
|
||||
2. 通过SIG列表查看感兴趣的SIG https://www.openkylin.top/join/sig-cn.html ,直接进入该SIG项目链接进行代码贡献,或通过订阅邮件列表 https://mailweb.openkylin.top 、参与SIG会议 https://www.openkylin.top/sig/meeting-cn.html 等形式,参与对应SIG项目的技术讨论、社区维护等。
|
||||
3. 加入开发者交流群(CLA后台管理人员主动拉您入群)
|
||||
3. 加入各SIG组开发者交流群(加小K微信发送SIG组名称邀请入群)
|
||||
|
||||
**成为维护者条件(推荐向)**:
|
||||
权益:当开发者满足以下2个及以上条件,可以申请SIG组,成为组维护者:
|
||||
![openKylin社区小K](./assets/openKylin社区小K.jpg)
|
||||
|
||||
**申请SIG组核心成员**:
|
||||
前置条件:当开发者参与SIG组贡献满足以下2个及以上条件,可以申请SIG组核心成员:
|
||||
|
||||
1. 提交5个及以上有效commit。
|
||||
2. 提出5个及以上有效issue。
|
||||
3. 修复5个及以上issue。
|
||||
4. 积极参与SIG会议,并在会议中多次提出建设性建议。
|
||||
|
||||
提交申请(主动申请或组内核心成员邀请加入):
|
||||
1. 由申请人 Fork 项目 [openKylin / community](https://gitee.com/openkylin/community) 到您的 Gitee 下。
|
||||
2. 在您的 Gitee 项目下的 sig 目录下找到相应的SIG 名称,修改该SIG组的README.md和sig.yaml 文件,把自己的作为核心成员(Contributer或Maintainer)加入。
|
||||
3. 提交PR申请,等待原SIG组核心成员审核通过,则加入成功并获得相应的仓库权限。
|
||||
|
||||
# 创建SIG组的申请与撤销流程
|
||||
|
||||
## 个人/团队申请
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
|
@ -1,14 +1,22 @@
|
|||
# 个人开发者加入SIG组流程
|
||||
|
||||
1. 请先签署CLA https://cla.openkylin.top/
|
||||
2. 通过SIG列表查看感兴趣的SIG,直接进入该SIG项目链接进行代码贡献,或通过订阅邮件列表、参与SIG会议等形式,参与对应SIG项目的技术讨论、社区维护等。
|
||||
3. 加入开发者交流群(CLA后台管理人员主动加您微信)
|
||||
|
||||
## 成为维护者条件(推荐向)
|
||||
**参与SIG组贡献**:
|
||||
1. 签署CLA https://cla.openkylin.top/
|
||||
2. 通过SIG列表查看感兴趣的SIG https://www.openkylin.top/join/sig-cn.html ,直接进入该SIG项目链接进行代码贡献,或通过订阅邮件列表 https://mailweb.openkylin.top 、参与SIG会议 https://www.openkylin.top/sig/meeting-cn.html 等形式,参与对应SIG项目的技术讨论、社区维护等。
|
||||
3. 加入各SIG组开发者交流群(加小K微信发送SIG组名称邀请入群)
|
||||
|
||||
权益:当开发者满足以下2个及以上条件,可以申请SIG组,成为组维护者:
|
||||
![openKylin社区小K](./assets/openKylin社区小K.jpg)
|
||||
|
||||
1. 提交5个及以上有效commit
|
||||
2. 提出5个及以上有效issue
|
||||
3. 修复5个及以上issue
|
||||
4. 积极参与SIG会议,并在会议中多次提出建设性建议
|
||||
**申请SIG组核心成员**:
|
||||
前置条件:当开发者参与SIG组贡献满足以下2个及以上条件,可以申请SIG组核心成员:
|
||||
|
||||
1. 提交5个及以上有效commit。
|
||||
2. 提出5个及以上有效issue。
|
||||
3. 修复5个及以上issue。
|
||||
4. 积极参与SIG会议,并在会议中多次提出建设性建议。
|
||||
|
||||
提交申请(主动申请或组内核心成员邀请加入):
|
||||
1. 由申请人 Fork 项目 [openKylin / community](https://gitee.com/openkylin/community) 到您的 Gitee 下。
|
||||
2. 在您的 Gitee 项目下的 sig 目录下找到相应的SIG 名称,修改该SIG组的README.md和sig.yaml 文件,把自己的作为核心成员(Contributer或Maintainer)加入。
|
||||
3. 提交PR申请,等待原SIG组核心成员审核通过,则加入成功并获得相应的仓库权限。
|
|
@ -0,0 +1,333 @@
|
|||
### 本地编译Pytorch
|
||||
### **获取源代码**
|
||||
链接:https://pan.baidu.com/s/1-kaWPzqAb6g7l4Bdhh-KPw?pwd=843d
|
||||
|
||||
提取码:843d
|
||||
|
||||
源码包为原始pytorch仓库的完整克隆,克隆日期为2月20日,需要最新版本的请自行拉取
|
||||
### **修改源代码**
|
||||
##### **荔枝派和算能开发板**
|
||||
对于荔枝派和算能的硬件环境,需要将源代码目录中的 pytorch/third_party/cpuinfo目录替换为算能的cpuinfo目录,具体如下
|
||||
```
|
||||
cd pytorch/third_party
|
||||
# 删除原有cpuinfo目录
|
||||
sudo rm -r cpuinfo
|
||||
# 克隆算能的cpuinfo目录
|
||||
sudo git clone https://github.com/sophgo/cpuinfo.git
|
||||
|
||||
```
|
||||
##### **其他硬件环境**
|
||||
对于其他硬件环境,可以暂时不替换cpuinfo目录,建议替换
|
||||
##### **修改代码文件**
|
||||
**1.aten/src/ATen/CMakeLists.txt**
|
||||
|
||||
将语句:
|
||||
```
|
||||
if(NOT MSVC AND NOT EMSCRIPTEN AND NOT INTERN_BUILD_MOBILE)
|
||||
|
||||
```
|
||||
替换为:
|
||||
```
|
||||
if(FALSE)
|
||||
```
|
||||
**2.caffe2/CMakeLists.txt**
|
||||
|
||||
将语句:
|
||||
```
|
||||
target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main)
|
||||
```
|
||||
|
||||
替换为:
|
||||
```
|
||||
target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 gtest_main)
|
||||
```
|
||||
**3.test/cpp/api/CMakeLists.txt**
|
||||
|
||||
在语句:
|
||||
```
|
||||
add_executable(test_api ${TORCH_API_TEST_SOURCES})
|
||||
```
|
||||
后添加:
|
||||
```
|
||||
target_compile_options(test_api PUBLIC -Wno-nonnull)
|
||||
```
|
||||
### **编译工具链安装**
|
||||
```
|
||||
apt install libopenblas-dev libblas-dev m4 cmake cython3 ccache
|
||||
|
||||
# 若执行过程中有以下报错,则杀死10198进程:Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 10198 (apt)
|
||||
kill -9 10198
|
||||
|
||||
# 安装过程中,若发现libopenblas-dev无法正常安装,则跳过其直接安装libblas-dev m4 cmake cython3 ccache
|
||||
apt install libblas-dev m4 cmake cython3 ccache
|
||||
|
||||
# libopenblas-dev无法安装的替代方案:手动安装OpenBLAS
|
||||
git clone https://github.com/xianyi/OpenBLAS.git
|
||||
cd OpenBLAS
|
||||
make -j8
|
||||
sudo make PREFIX=/usr/local/OpenBLAS install
|
||||
# 进入/etc,用vim打开profile
|
||||
[在最后一行添加]: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/OpenBLAS/lib/
|
||||
source /etc/profile
|
||||
|
||||
```
|
||||
### Python环境配置
|
||||
```
|
||||
apt install python3
|
||||
apt install python-is-python3 python-dev-is-python3
|
||||
apt autoremove
|
||||
# 下载好python3后发现没有pip、yaml等工具
|
||||
apt install python3-pip
|
||||
pip install pyyaml
|
||||
|
||||
```
|
||||
##### 编译前安装Numpy
|
||||
```
|
||||
python3 -m pip install numpy --upgrade -i
|
||||
https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
```
|
||||
### **环境变量配置**
|
||||
```
|
||||
export USE_CUDA=0 #不编译CUDA版本
|
||||
export USE_DISTRIBUTED=0 #不支持分布式
|
||||
export USE_MKLDNN=0 #不支持MKLDNN
|
||||
export MAX_J0BS=16 #最大线程数 ,按需填写
|
||||
```
|
||||
### **编译pytorch前注意事项**
|
||||
|
||||
● 一定要确认完整克隆好,如果对自己的网络没有信心,请直接从百度网盘下载源码包,注意源码包为原始pytorch仓库的完整克隆,克隆日期为2月20日,需要最新版本的请自行拉取
|
||||
|
||||
● 确认gcc版本
|
||||
|
||||
```
|
||||
gcc -v
|
||||
```
|
||||
|
||||
gcc13以下的版本会遇到undefined reference to `__atomic_exchange_1'问题,可以通过patchelf解决,或者通过patch CMakefile文件的方式解决。
|
||||
```
|
||||
# path为存放libtorch_cpu.so的路径
|
||||
patchelf --add-needed libatomic.so.1 /path/libtorch_cpu.so
|
||||
# 若提示无patchelf命令,则执行下列语句
|
||||
apt install patchelf
|
||||
```
|
||||
|
||||
patch内容详情:
|
||||
```
|
||||
From 40bae41e910c2aa0cc4d79457199152a21b99add Mon Sep 17 00:00:00 2001
|
||||
From: Bits <bigbits@hackx.cc>
|
||||
Date: Thu, 22 Feb 2024 10:09:15 +0800
|
||||
Subject: [PATCH] =?UTF-8?q?GCC13=E4=BB=A5=E4=B8=8B=E7=89=88=E6=9C=AC?=
|
||||
=?UTF-8?q?=E7=BC=96=E8=AF=91=E9=9C=80=E8=A6=81=E9=93=BE=E6=8E=A5atomic?=
|
||||
=?UTF-8?q?=E5=BA=93?=
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
---
|
||||
caffe2/CMakeLists.txt | 6 +++---
|
||||
test/cpp/api/CMakeLists.txt | 4 ++--
|
||||
test/cpp/jit/CMakeLists.txt | 2 +-
|
||||
test/cpp/lazy/CMakeLists.txt | 2 +-
|
||||
test/cpp/tensorexpr/CMakeLists.txt | 4 ++--
|
||||
test/edge/CMakeLists.txt | 2 +-
|
||||
torch/lib/libshm/CMakeLists.txt | 2 +-
|
||||
7 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
|
||||
index 17582104933..ebfd4c1c10e 100644
|
||||
--- a/caffe2/CMakeLists.txt
|
||||
+++ b/caffe2/CMakeLists.txt
|
||||
@@ -1425,7 +1425,7 @@ if($ENV{TH_BINARY_BUILD})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-target_link_libraries(torch_cpu PUBLIC c10)
|
||||
+target_link_libraries(torch_cpu PUBLIC c10 atomic)
|
||||
target_link_libraries(torch_cpu PUBLIC ${Caffe2_PUBLIC_DEPENDENCY_LIBS})
|
||||
target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_LIBS})
|
||||
target_link_libraries(torch_cpu PRIVATE ${Caffe2_DEPENDENCY_WHOLE_LINK_LIBS})
|
||||
@@ -1750,7 +1750,7 @@ if(BUILD_TEST)
|
||||
if(NOT MSVC)
|
||||
add_executable(${test_name}_${CPU_CAPABILITY} "${test_src}" ../aten/src/ATen/native/quantized/AffineQuantizerBase.cpp)
|
||||
# TODO: Get rid of c10 dependency (which is only needed for the implementation of AT_ERROR)
|
||||
- target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main)
|
||||
+ target_link_libraries(${test_name}_${CPU_CAPABILITY} c10 sleef gtest_main atomic)
|
||||
if(USE_FBGEMM)
|
||||
target_link_libraries(${test_name}_${CPU_CAPABILITY} fbgemm)
|
||||
endif()
|
||||
@@ -1781,7 +1781,7 @@ if(BUILD_TEST)
|
||||
foreach(test_src ${Caffe2_CPU_TEST_SRCS})
|
||||
get_filename_component(test_name ${test_src} NAME_WE)
|
||||
add_executable(${test_name} "${test_src}")
|
||||
- target_link_libraries(${test_name} torch_library gtest_main)
|
||||
+ target_link_libraries(${test_name} torch_library gtest_main atomic)
|
||||
target_include_directories(${test_name} PRIVATE $<INSTALL_INTERFACE:include>)
|
||||
target_include_directories(${test_name} PRIVATE $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include>)
|
||||
target_include_directories(${test_name} PRIVATE ${Caffe2_CPU_INCLUDE})
|
||||
diff --git a/test/cpp/api/CMakeLists.txt b/test/cpp/api/CMakeLists.txt
|
||||
index 42b67d8cb25..3be0b803828 100644
|
||||
--- a/test/cpp/api/CMakeLists.txt
|
||||
+++ b/test/cpp/api/CMakeLists.txt
|
||||
@@ -49,7 +49,7 @@ endif()
|
||||
|
||||
add_executable(test_api ${TORCH_API_TEST_SOURCES})
|
||||
target_include_directories(test_api PRIVATE ${ATen_CPU_INCLUDE})
|
||||
-target_link_libraries(test_api PRIVATE torch gtest)
|
||||
+target_link_libraries(test_api PRIVATE torch gtest atomic)
|
||||
if(NOT MSVC)
|
||||
target_compile_options_if_supported(test_api -Wno-unused-variable)
|
||||
endif()
|
||||
@@ -79,4 +79,4 @@ endif()
|
||||
|
||||
add_executable(parallel_benchmark ${TORCH_API_TEST_DIR}/parallel_benchmark.cpp)
|
||||
target_include_directories(parallel_benchmark PRIVATE ${ATen_CPU_INCLUDE})
|
||||
-target_link_libraries(parallel_benchmark PRIVATE torch)
|
||||
+target_link_libraries(parallel_benchmark PRIVATE torch atomic)
|
||||
diff --git a/test/cpp/jit/CMakeLists.txt b/test/cpp/jit/CMakeLists.txt
|
||||
index 2d88d3f7172..17a268b89a0 100644
|
||||
--- a/test/cpp/jit/CMakeLists.txt
|
||||
+++ b/test/cpp/jit/CMakeLists.txt
|
||||
@@ -107,7 +107,7 @@ if(USE_ASAN)
|
||||
endif()
|
||||
|
||||
target_link_libraries(
|
||||
- test_jit PRIVATE flatbuffers)
|
||||
+ test_jit PRIVATE flatbuffers atomic)
|
||||
|
||||
|
||||
# TODO temporary until we can delete the old gtest polyfills.
|
||||
diff --git a/test/cpp/lazy/CMakeLists.txt b/test/cpp/lazy/CMakeLists.txt
|
||||
index be37b47ac9b..aef985e6ea7 100644
|
||||
--- a/test/cpp/lazy/CMakeLists.txt
|
||||
+++ b/test/cpp/lazy/CMakeLists.txt
|
||||
@@ -27,7 +27,7 @@ add_executable(test_lazy
|
||||
# TODO temporary until we can delete the old gtest polyfills.
|
||||
target_compile_definitions(test_lazy PRIVATE USE_GTEST)
|
||||
|
||||
-set(LAZY_TEST_DEPENDENCIES torch gtest)
|
||||
+set(LAZY_TEST_DEPENDENCIES torch gtest atomic)
|
||||
|
||||
target_link_libraries(test_lazy PRIVATE ${LAZY_TEST_DEPENDENCIES})
|
||||
target_include_directories(test_lazy PRIVATE ${ATen_CPU_INCLUDE})
|
||||
diff --git a/test/cpp/tensorexpr/CMakeLists.txt b/test/cpp/tensorexpr/CMakeLists.txt
|
||||
index 012471d0e58..5b0a4c540f3 100644
|
||||
--- a/test/cpp/tensorexpr/CMakeLists.txt
|
||||
+++ b/test/cpp/tensorexpr/CMakeLists.txt
|
||||
@@ -39,7 +39,7 @@ add_executable(test_tensorexpr
|
||||
${TENSOREXPR_TEST_ROOT}/padded_buffer.cpp
|
||||
${TENSOREXPR_TEST_SRCS})
|
||||
|
||||
-target_link_libraries(test_tensorexpr PRIVATE torch gtest)
|
||||
+target_link_libraries(test_tensorexpr PRIVATE torch gtest atomic)
|
||||
target_include_directories(test_tensorexpr PRIVATE ${ATen_CPU_INCLUDE})
|
||||
target_compile_definitions(test_tensorexpr PRIVATE USE_GTEST)
|
||||
if(NOT MSVC)
|
||||
@@ -47,7 +47,7 @@ if(NOT MSVC)
|
||||
endif()
|
||||
|
||||
add_executable(tutorial_tensorexpr ${TENSOREXPR_TEST_ROOT}/tutorial.cpp)
|
||||
-target_link_libraries(tutorial_tensorexpr PRIVATE torch)
|
||||
+target_link_libraries(tutorial_tensorexpr PRIVATE torch atomic)
|
||||
target_include_directories(tutorial_tensorexpr PRIVATE ${ATen_CPU_INCLUDE})
|
||||
|
||||
# The test case depends on the xnnpack header which in turn depends on the
|
||||
diff --git a/test/edge/CMakeLists.txt b/test/edge/CMakeLists.txt
|
||||
index 2f29f27e0b3..311062891cf 100644
|
||||
--- a/test/edge/CMakeLists.txt
|
||||
+++ b/test/edge/CMakeLists.txt
|
||||
@@ -58,7 +58,7 @@ add_executable(test_edge_op_registration
|
||||
|
||||
target_compile_definitions(test_edge_op_registration PRIVATE USE_GTEST)
|
||||
|
||||
-set(TEST_DEPENDENCIES gtest unbox_lib)
|
||||
+set(TEST_DEPENDENCIES gtest unbox_lib atomic)
|
||||
|
||||
target_link_libraries(test_edge_op_registration PRIVATE
|
||||
${TEST_DEPENDENCIES}
|
||||
diff --git a/torch/lib/libshm/CMakeLists.txt b/torch/lib/libshm/CMakeLists.txt
|
||||
index a3b41d0a0b0..a1db648342c 100644
|
||||
--- a/torch/lib/libshm/CMakeLists.txt
|
||||
+++ b/torch/lib/libshm/CMakeLists.txt
|
||||
@@ -60,7 +60,7 @@ if(UNIX AND NOT APPLE)
|
||||
endif()
|
||||
|
||||
add_executable(torch_shm_manager manager.cpp)
|
||||
-target_link_libraries(torch_shm_manager PRIVATE shm c10)
|
||||
+target_link_libraries(torch_shm_manager PRIVATE shm c10 atomic)
|
||||
set_target_properties(torch_shm_manager PROPERTIES
|
||||
INSTALL_RPATH "${_rpath_portable_origin}/../lib")
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
||||
|
||||
```
|
||||
gcc13版本及以上没有此问题,但是可能出现软件包依赖问题,通过
|
||||
```
|
||||
export BUILD_TEST=0
|
||||
```
|
||||
可以解决。
|
||||
|
||||
● 确认安装ninja,如果系统不能执行ninja,请apt安装ninja-build包或者从源码编译安装。
|
||||
|
||||
● 编译前安装numpy
|
||||
|
||||
```
|
||||
python3 -m pip install numpy --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
```
|
||||
● 构建指令可以用`python setup.py bdist_wheel` 替代 `python setup.py develop --cmake`可以省去sudo管理员权限,构建完成后将会在dist目录下生成whl安装包。
|
||||
|
||||
● 编译开始时显示的Failed不影响编译结果。缺少apt_pkg不影响编译。
|
||||
|
||||
### **开始编译**
|
||||
```
|
||||
sudo python3 setup.py develop --cmake
|
||||
|
||||
```
|
||||
### **编译及引用过程可能会遇到的问题**
|
||||
**1.Could not find any of CMakeLists.txt, Makefile, setup.py, LICENSE, LICENSE.md, LICENSE.txt in /root/xxx/pytorch/third_party/pthreadpool**
|
||||
|
||||
问题来源:编译过程
|
||||
|
||||
问题分析:由于网络的问题,clone仓库时有部分包未成功下载,导致文件夹为空
|
||||
|
||||
解决方法:重新下载对应包
|
||||
```
|
||||
cd third_party
|
||||
rm -rf pthreadpool
|
||||
sudo git clone pthreadpool的url
|
||||
```
|
||||
**2./usr/bin/ld: /root/xxx/pytorch/build/lib/libtorch_cpu.so: undefined reference to `__atomic_exchange_1’ collect2: error: ld returned 1 exit status**
|
||||
|
||||
问题来源:编译过程
|
||||
|
||||
问题分析:对__atomic_exchange_1的未定义引用
|
||||
|
||||
解决方法:使用patchelf添加需要的动态库
|
||||
|
||||
```
|
||||
# path为存放libtorch_cpu.so的路径
|
||||
patchelf --add-needed libatomic.so.1 /path/libtorch_cpu.so
|
||||
# 若提示无patchelf命令,则执行下列语句
|
||||
apt install patchelf
|
||||
```
|
||||
**3.Error in cpuinfo: processor architecture is not supported in cpuinfo**
|
||||
|
||||
问题来源:编译完成后,使用python时“import torch”报错
|
||||
|
||||
问题分析:git clone时下载的cpuinfo不支持Risc-V架构
|
||||
|
||||
解决方法:删除当前存在的cpuinfo并重新下载最新支持Risc-V架构的cpuinfo
|
||||
cpuinfo路径为pytorch/third_party/cpuinfo,因此先进入pytorch/third_party目录
|
||||
在终端执行以下指令
|
||||
|
||||
```
|
||||
rm -rf cpuinfo
|
||||
git clone https://github.com/sophgo/cpuinfo.git
|
||||
# clone完成后需要重新编译
|
||||
sudo python3 setup.py develop --cmake
|
||||
|
||||
```
|
||||
### 原文链接:[https://blog.csdn.net/m0_49267873/article/details/135670989](https://blog.csdn.net/m0_49267873/article/details/135670989)
|
|
@ -61,7 +61,7 @@ UKUI(Ultimate Kylin User Interface) SIG小组致力于桌面环境相关软件
|
|||
|
||||
ukui-settings-daemon是UKUI桌面环境下的底层守护程序;负责设置UKUI会话的各种参数以及运行的应用程序
|
||||
|
||||
- [ukui-notification-daemon](https://gitee.com/openkylin/ukui-notification-daemon)
|
||||
- [~~ukui-notification-daemon~~(UKUI4.0及以上已废弃此库⚠️⚠️⚠️)](https://gitee.com/openkylin/ukui-notification-daemon)
|
||||
|
||||
ukui-notification-daemon是UKUI桌面环境的通知服务,它是根据freedesktop通知规范实现的一套通知框架,它将高效地为我们展示应用通知或系统通知
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ git config --global user.name "zhangsan" # 配置提交者用户名
|
|||
> 1. 在选择分支的时候需要注意不要选错了个人仓库的分支,同时openKylin社区目标仓库的的分支需要选择`openkylin/yangtze`分支;
|
||||
> 2. 如果有关联的issue可以将此Pull Request关联到issue,这样当PR接受并合并后会自动将关联的issue设置为已完成状态!
|
||||
|
||||
5. 到此,您的第一个openKylin社区的贡献就基本完成啦,之后就等着CI自动编译您所提交的代码,如果CI流程执行成功,会自动合并您所提交的PR,如果失败则仓库管理员会介入审核您的PR!
|
||||
5. 到此,您的第一个openKylin社区的贡献就基本完成啦,之后就等着CI自动编译您所提交的代码,如果CI流程执行失败,表示PR存在一些规范检查未通过,需要根据提示修改后重新打开PR;如果CI流程执行成功,表示您的PR提交成功,您只需要等待仓库管理员审核您的PR后自动合入到主线。( **注:PR审核者和PR提交者尽量不为同一个人,保证提交内容都是被检查过再合入的** )
|
||||
|
||||
#### 2.3 查看PR状态
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
![输入图片说明](assets/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85/6-ventoy%E9%80%89%E6%8B%A9%E9%95%9C%E5%83%8F.jpeg)
|
||||
|
||||
进入Grub引导界面,选择“Try with installing”,进入openKylin试用桌面
|
||||
进入Grub引导界面,选择“Try without installing”,进入openKylin试用桌面
|
||||
|
||||
![输入图片说明](assets/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85/39-%E5%AE%89%E8%A3%85grub%E5%BC%95%E5%AF%BC%E9%A1%B9.jpeg)
|
||||
|
||||
|
@ -214,7 +214,7 @@ efi分区(用于“efi”、空间分配256MB~2GB)
|
|||
|
||||
![输入图片说明](assets/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85/6-ventoy%E9%80%89%E6%8B%A9%E9%95%9C%E5%83%8F.jpeg)
|
||||
|
||||
进入Grub引导界面,选择“Try with installing”,进入openKylin试用桌面
|
||||
进入Grub引导界面,选择“Try without installing”,进入openKylin试用桌面
|
||||
|
||||
![输入图片说明](assets/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85/39-%E5%AE%89%E8%A3%85grub%E5%BC%95%E5%AF%BC%E9%A1%B9.jpeg)
|
||||
|
||||
|
@ -409,11 +409,11 @@ A:安装进度到96%时一般需要多等待一会(具体时间长短取决
|
|||
|
||||
|
||||
|
||||
Q:使用 USB 启动盘安装时,出现"try ubuntu kylin without installation"或“install ubuntu kylin”,Enter 选择“安装”后,显示器黑屏无任何显示,该怎么办?
|
||||
Q:使用 USB 启动盘安装时,出现"try openKylin without installation"或“install openKylin”,Enter 选择“安装”后,显示器黑屏无任何显示,该怎么办?
|
||||
|
||||
A:方法一:显示黑屏,可能是显卡显示的支持有问题,尝试手动修复。
|
||||
|
||||
移动光标到"install ubuntu kylin" , 按"e"进入编辑模式,进入命令行模式,
|
||||
移动光标到"install openKylin" , 按"e"进入编辑模式,进入命令行模式,
|
||||
|
||||
![输入图片说明](assets/%E7%B3%BB%E7%BB%9F%E5%AE%89%E8%A3%85/35-%E5%AE%89%E8%A3%85grub%E7%95%8C%E9%9D%A2.jpeg)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -13,7 +13,7 @@ openKylin 对待软件包版权和许可证信息的态度十分严格,在 ope
|
|||
2. 在软件包的一级目录下创建以“LICENSE”或“COPYING”为名的文件,放入整个项目的许可证信息;
|
||||
3. 在debian/copyright 文件中提供项目所有源文件版权信息的摘要;
|
||||
|
||||
**推荐新的开源项目使用[Mulan PSL v2协议](http://license.coscl.org.cn/index.html)** 。Mulan PSL v2与BSD类许可证类似,有很好的兼容性:BSD、MIT类宽松许可证兼容Mulan PSL v2协议;Mulan PSL v2协议兼容Apache License v2.0、L/GPLv2、L/GPLv3等许可证。即,许可在BSD、MIT类许可证下的代码可以贡献到使用Mulan PSL v2协议的项目中;使用Mulan PSL v2协议的代码可以贡献到Apache License V2.0、L/GPLv2或L/GPLv3等项目中。
|
||||
**推荐新的开源项目使用[Mulan PSL v2协议](http://license.coscl.org.cn/MulanPSL2)** 。Mulan PSL v2与BSD类许可证类似,有很好的兼容性:BSD、MIT类宽松许可证兼容Mulan PSL v2协议;Mulan PSL v2协议兼容Apache License v2.0、L/GPLv2、L/GPLv3等许可证。即,许可在BSD、MIT类许可证下的代码可以贡献到使用Mulan PSL v2协议的项目中;使用Mulan PSL v2协议的代码可以贡献到Apache License V2.0、L/GPLv2或L/GPLv3等项目中。
|
||||
|
||||
## 头部注释
|
||||
|
||||
|
|
|
@ -206,11 +206,53 @@ sudo minicom -s
|
|||
|
||||
|
||||
# 三、在LicheePi4A上安装openKylin
|
||||
## 烧录到emmc
|
||||
|
||||
准备好一根Type-C数据线,一般开发板包装盒会配套提供。
|
||||
|
||||
openkylin适配LicheePi4A的镜像可以通过以下链接下载:
|
||||
> https://www.openkylin.top/downloads
|
||||
|
||||
通过以下命令将文件解压:
|
||||
> tar -xvf openKylin-2.0-alpha-licheepi4a.tar.xz
|
||||
|
||||
拿出准备好的Type-C数据线,按住开发板板上BOOT键,进入fastboot模式,连接开发板Type-C口与电脑USB接口,接好红灯亮后可松开BOOT键
|
||||
|
||||
需要使用X86架构设备
|
||||
|
||||
在 Windows 下使用设备管理器查看,会出现 “USB download gadget” 设备。
|
||||
|
||||
在 Linux 下,使用 lsusb 查看设备,会显示以下设备: ID 2345:7654 T-HEAD USB download gadget
|
||||
|
||||
切换到fastboot文件所在目录:
|
||||
> cd openKylin-2.0-alpha-licheepi4a/fastboot/linux (根据自己系统选择)
|
||||
|
||||
文件夹中包含两个版本的uboot和boot文件,根据自己开发板内存大小选择
|
||||
|
||||
执行以下命令烧录:
|
||||
> sudo ./fastboot flash ram ./images/u-boot-with-spl-nonsec-noswap-16g-ddr.bin
|
||||
|
||||
> sudo ./fastboot reboot
|
||||
|
||||
> sleep 1
|
||||
|
||||
> sudo ./fastboot flash uboot ./images/u-boot-with-spl-nonsec-noswap-16g-ddr.bin
|
||||
|
||||
> sudo ./fastboot flash boot ./images/boot-default-16g-ddr.ext4
|
||||
|
||||
> sudo ./fastboot flash root ./images/openkylin-2.0-alpha-licheepi4a-riscv64.ext4
|
||||
|
||||
终端会打印烧录日志,烧录完成后拔调数据线,上电启动即可。
|
||||
|
||||
## 烧录到SD卡
|
||||
## 准备SD卡
|
||||
openkylin适配LicheePi4A的镜像可以通过以下链接下载:
|
||||
https://www.openkylin.top/downloads
|
||||
通过以下命令解压:
|
||||
> unxz openKylin-1.0-licheepi4a-riscv64.img.xz
|
||||
> tar -xvf openKylin-2.0-alpha-licheepi4a.tar.xz
|
||||
|
||||
切换到image文件所在目录:
|
||||
> cd openKylin-2.0-alpha-licheepi4a/images
|
||||
|
||||
## 制作SD卡启动盘
|
||||
首先使用磁盘工具将SD卡格式化。之后通过命令行将镜像刷入sd卡,请运行:
|
||||
|
@ -231,15 +273,22 @@ https://www.openkylin.top/downloads
|
|||
|
||||
## 第一次启动和修改开发板u-boot设置
|
||||
在计算机中启动LicheePi4A的minicom串口。将烧录好的sd卡插入LicheePi4A卡槽并连接好电源线。开发板启动到u-boot时快速按下回车使开发板停在u-boot。在u-boot中输入以下命令设置开发板从SD卡启动:
|
||||
>env set -f set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/mmcblk1 rootfstype=ext4 rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrwoptions=rw,noatime rootrwreset=${factory_reset} init=/lib/systemd/systemd'
|
||||
>env save
|
||||
> env set -f set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/mmcblk1 rootfstype=ext4 rootwait rw earlycon clk_ignore_unused loglevel=7 eth=$ethaddr rootrwoptions=rw,noatime rootrwreset=${factory_reset} init=/lib/systemd/systemd'
|
||||
> env save
|
||||
> reset
|
||||
|
||||
注:第一条是一条命令,很长,在您的显示设备可能会换行
|
||||
之后在u-boot中输入reset来重启开发板,这样开发板就可以从sd卡启动openKylin系统。
|
||||
首次启动之后,系统中会存在一个默认用户,当桌面环境启动之后,您可以通过默认用户进行LicheePi4A首次登陆,后期可以根据自己需求进行用户或密码的更改。
|
||||
默认用户名/密码是:
|
||||
>username:openkylin
|
||||
>password:openkylin
|
||||
|
||||
```
|
||||
> username:openkylin
|
||||
> password:openkylin
|
||||
```
|
||||
|
||||
注:如有其他烧录问题,如windows系统烧录可能需要安装驱动、烧录日志图片展示等可参考矽速科技相关文档
|
||||
https://wiki.sipeed.com/hardware/zh/lichee/th1520/lpi4a/4_burn_image.html
|
||||
|
||||
# 四、在 VisionFive 2上安装openKylin
|
||||
## 准备SD卡
|
||||
|
@ -247,7 +296,7 @@ openkylin适配VisionFive 2的镜像可以通过以下链接下载
|
|||
> https://openKylin.top/downloads/download-smp.php?id=15
|
||||
|
||||
通过以下命令解压
|
||||
> unxz openkylin-1.0-visionfive2-riscv64.img.xz
|
||||
> unxz openkylin-1.0-visionfive2-riscv64.img.xz
|
||||
|
||||
以上路径请根据自己的实际路径去解压
|
||||
|
||||
|
|
Loading…
Reference in New Issue