当前位置:网站首页>Experience the latest version of erofs on Ubuntu
Experience the latest version of erofs on Ubuntu
2020-11-07 23:13:38 【Writing code has faith】
stay Ubuntu Experience the latest version of EROFS
at present Linux The kernel has iterated to 5.9 edition , meanwhile EORFS File system drivers also make feature and stability updates , Take a look at the new features experience .
Get ready Linux Kernel code , It's best to be consistent with the current release kernel
1. obtain Ubuntu Kernel version
$ uname -a
Linux ubuntu 5.9.6-050906-generic #202011051230 SMP Thu Nov 5 17:35:33 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
2. Download the latest EROFS Source code
$ mkdir ~/erofs && cd erofs
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git linux-erofs
$ git checkout -b erofs-dev remotes/erofs/dev
$ git bra|grep erofs
* erofs-dev
erofs-master
remotes/erofs/dev
remotes/erofs/dev-test
remotes/erofs/fixes
remotes/erofs/master
3. Get ready makefile
# SPDX-License-Identifier: GPL-2.0-only
EROFS_VERSION = "1.0"
ccflags-y += -DEROFS_VERSION=\"$(EROFS_VERSION)\"
CONFIG_EROFS_FS=y
CONFIG_EROFS_FS_DEBUG=y
CONFIG_EROFS_FS_XATTR=y
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
CONFIG_EROFS_FS_ZIP=y
CONFIG_EROFS_FS_CLUSTER_PAGE_LIMIT=1
obj-m += erofs.o
erofs-objs := super.o inode.o data.o namei.o dir.o utils.o
erofs-$(CONFIG_EROFS_FS_XATTR) += xattr.o
erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o
ifneq ($(KERNELRELEASE),)
# call from kernel build system
obj-m := erofs.o
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := ~/linux-erofs/fs/erofs
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
echo ${KERNELRELEASE}
endif
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions Module.symvers modules.order
depend .depend dep:
$(CC) $(EXTRA_CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif
4. Compile and install erofs drive
$ cd ~/erofs/linux-erofs
$ make
# Install dependent modules
$ sudo modprobe libcrc32c
$ sudo insmod ~/erofs/linux-erofs/fs/erofs.ko
$ lsmod|grep erofs
erofs 33648640 0
libcrc32c 16384 1 erofs
5. Hang on the packed EROFS Mirror image test.img
$ sudo mount -t erofs -o loop test.img erofsdir;md5sum erofsdir/*.* srcdir/*.*|sort;sudo umount erofsdir
[sudo] password for XX:
0a78b672c059739eaa1dd01cc846f685 erofsdir/dmesg.log
0a78b672c059739eaa1dd01cc846f685 srcdir/dmesg.log
52efd0d1126cd0dbf0e6b28b2cf85c3f erofsdir/inline.txt
52efd0d1126cd0dbf0e6b28b2cf85c3f srcdir/inline.txt
72b3924faa8f5801e2966c69ddaa7d99 erofsdir/file.list
72b3924faa8f5801e2966c69ddaa7d99 srcdir/file.list
7558009b9427ba921ea05e68c35e98b2 erofsdir/config.c
7558009b9427ba921ea05e68c35e98b2 srcdir/config.c
aa5ae2a4d5d71e32357159d9b32a5c2c erofsdir/dd_unrandom.bin
aa5ae2a4d5d71e32357159d9b32a5c2c srcdir/dd_unrandom.bin
c0f56976ed5e0fcf331d30e8d74053bc erofsdir/file_002.txt
c0f56976ed5e0fcf331d30e8d74053bc srcdir/file_002.txt
f127e2ae77c615cd7391c5b4d1194d2c erofsdir/dd_unrandom2.bin
f127e2ae77c615cd7391c5b4d1194d2c srcdir/dd_unrandom2.bin
fdd480f87d40828ecc561cfa9e371a78 erofsdir/liberofs_la-cache.o
fdd480f87d40828ecc561cfa9e371a78 srcdir/liberofs_la-cache.o
版权声明
本文为[Writing code has faith]所创,转载请带上原文链接,感谢
边栏推荐
- C++ 数字、string和char*的转换
- C++学习——centos7上部署C++开发环境
- C++学习——一步步学会写Makefile
- C++学习——临时对象的产生与优化
- C++学习——对象的引用的用法
- C++编程经验(6):使用C++风格的类型转换
- Won the CKA + CKS certificate with the highest gold content in kubernetes in 31 days!
- C + + number, string and char * conversion
- C + + Learning -- capacity() and resize() in C + +
- C + + Learning -- about code performance optimization
猜你喜欢
-
C + + programming experience (6): using C + + style type conversion
-
Latest party and government work report ppt - Park ppt
-
在线身份证号码提取生日工具
-
Online ID number extraction birthday tool
-
️野指针?悬空指针?️ 一文带你搞懂!
-
Field pointer? Dangling pointer? This article will help you understand!
-
HCNA Routing&Switching之GVRP
-
GVRP of hcna Routing & Switching
-
Seq2Seq实现闲聊机器人
-
【闲聊机器人】seq2seq模型的原理
随机推荐
- LeetCode 91. 解码方法
- Seq2seq implements chat robot
- [chat robot] principle of seq2seq model
- Leetcode 91. Decoding method
- HCNA Routing&Switching之GVRP
- GVRP of hcna Routing & Switching
- HDU7016 Random Walk 2
- [Code+#1]Yazid 的新生舞会
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- HDU7016 Random Walk 2
- [code + 1] Yazid's freshman ball
- CF1548C The Three Little Pigs
- HDU7033 Typing Contest
- Qt Creator 自动补齐变慢的解决
- HALCON 20.11:如何处理标定助手品质问题
- HALCON 20.11:标定助手使用注意事项
- Solution of QT creator's automatic replenishment slowing down
- Halcon 20.11: how to deal with the quality problem of calibration assistant
- Halcon 20.11: precautions for use of calibration assistant
- “十大科学技术问题”揭晓!|青年科学家50²论坛
- "Top ten scientific and technological issues" announced| Young scientists 50 ² forum
- 求反转链表
- Reverse linked list
- js的数据类型
- JS data type
- 记一次文件读写遇到的bug
- Remember the bug encountered in reading and writing a file
- 单例模式
- Singleton mode
- 在这个 N 多编程语言争霸的世界,C++ 究竟还有没有未来?
- In this world of N programming languages, is there a future for C + +?
- es6模板字符
- js Promise
- js 数组方法 回顾
- ES6 template characters
- js Promise
- JS array method review
- 【Golang】️走进 Go 语言️ 第一课 Hello World
- [golang] go into go language lesson 1 Hello World