Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

TurnOffNOD/linux_kernel_for_d1-OSFinal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OS期末大作业-14组(选做实验3)

使用的发行版:https://d1.docs.aw-ol.com/strong/strong_4debian/ ,用的是RVBoards_D1_Debian_img_v0.6.1版本

(下载地址:http://www.perfxlab.cn:8080/rvboards/)

先根据https://d1.docs.aw-ol.com/study/study_4compile/, 使用上述的发行版制作启动TF卡。

大作业代码架构:

用于使能的dts文件位于:arch/riscv/boot/dts/sunxi/board_enable_uart5.dts

使用:在该repo目录下,执行下述命令制作dtbo:

./scripts/dtc/dtc -I dts -O dtb arch/riscv/boot/dts/sunxi/board_enable_uart5.dts -o enable-uart5.dtbo

之后的步骤:

  1. 将上面制作得到的TF卡插入linux主机,(自己实验时是将TF卡+TF转SD卡卡套插入笔记本电脑的读卡器);
  2. 挂载,得到的enable-uart5.dtbo复制进入boot分区的overlay文件夹下,(实验时,在自己电脑的路径为/run/media/<username>/D899-0644/overlay);
  3. 修改boot分区下的config.txt,将dtoverlay一行修改为dtoverlay=enable-uart5
  4. unmount,将TF卡插入哪吒D1开发板启动。

此时将有了/dev/ttyS5,继续前往https://github.com/TurnOffNOD/group14-osFinal-NFCapp 即可。

下面是实验过程中的一些没有在最终结果中使用的中间探索说明,在此不作删除。

注意:现在自己微小修改过的脚本,需要将该repo和tina的sdk放在同一个目录下,并且将tina的sdk命名为tina-sdk-d1

下面是原repo带的readme说明,不做删除。

Instructions

Note: Please update the RVBoards image to V0.5 or above

Generate the kernel image rvboards_boot.img

1 Compile the kernel with./mk-kernel.sh and generate rvboards_img/rvboards_boot.img

Configure the default config and board.dts

1. config

   1. cp config_rvboards_d1 .config
   
2. rvboards_dts

   1. cd arch/riscv/boot/dts/sunxi/
   
   2. cp board.dts_rvboards_d1 board.dts

2 Download the cross-compile toolchain and configure CROSS_COMPILE in mk-kernel.sh

Baidu network disk link:https://pan.baidu.com/s/1-F9YPfm_dGFTlf-rld8OEw

Extract code:3o5v

Note:The cross-compilation toolchain is extracted from the Zhan D1 Nezha Tina SDK. The directory is as follows:

<<tina-d1-open/lichee/brandy-2.0/tools/toolchain/riscv64-linux-x86_64-20200528.tar.xz>>

Replace the kernel image rvboards_boot.img

 #1. Create a new Boot folder in the desktop directory
root@RVBoards:~/Desktop#  mkdir boot

 #2 mount the boot partition
root@RVBoards:~/Desktop# mount /dev/mmcblk0p4 boot/

 #3 Check if mount was successful
root@RVBoards:~/Desktop# ls boot/
'System Volume Information'   boot_debian.img   config.txt   rt-smart
 boot.img                     boot_tina.img     overlay
 
 #4. Place rvboards_boot.img in the boot directory and configure config.txt
root@RVBoards:~/Desktop/boot# vim config.txt
	## kernel=rvboards_boot.img
  
 #5. Restart to rvboards_boot.img
root@RVBoards:~/Desktop/boot# reboot

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 98.3%
  • Assembly 1.1%
  • Makefile 0.2%
  • Shell 0.2%
  • Python 0.1%
  • Perl 0.1%