

During the Pandemic
It’s a Good Time to Develop Online Self-Learning Skills

Introduction
This article was originally written in 2013 as an email to the “Lanzhou University Open Source Community” for junior students, hoping that even though they are in Yuzhong, they can fully leverage the online resources of Lanzhou University, making good use of the open Linux resources to deepen their understanding and mastery of computer knowledge and skills. Over the years, despite a busy work schedule, I have continued to update this article and have gradually written several open-source books and initiated multiple open-source projects, all of which are purely non-profit and aimed at more effective learning and practice of computer professional skills. I am honored to share this article at the invitation of my mentor, Professor Zhou Qingguo.
Now, during the pandemic, on one hand, we need to respond to the national call and school notifications to postpone our studies, while on the other hand, we can fully utilize online courses to continue learning at home.
For science and engineering students, conducting experiments at home is generally quite difficult. However, for computer-related courses, many universities and open-source communities have done a lot of work in terms of computer course experiments. There are not only many open-source projects and open courses available, but also a wealth of supporting experimental environments.
This article mainly discusses how to fully utilize these online resources to complete self-learning and experiments for relevant courses. According to the materials provided in this article, most courses, especially software-related courses, can be conducted at home, thus compensating for the lack of a laboratory at home. This is also an opportunity to join discussions in relevant open-source projects and communities, exchanging and discussing related technologies and courses with engineers from various companies and students from different universities, experiencing the joy of “community learning”.
The original text was published on Tai Xiao Technology: Why Computer Students Should Learn Linux Open Source Technology (http://t.cn/RyaLpC8), and the full text is included here for your reading and feedback.
Open-source technologies related to Linux are very important for students, especially for those majoring in computer science. Below are several aspects for discussion:
1. Research Platform
Due to the advantages of open-source, there are many open documents available for reference, and many interesting ideas can be explored for in-depth research. Digging into any point can reveal a vast world.
2. Professional Vision
Through those open-source projects, one can connect with geniuses from around the world via mailing lists, Patchwork, GitHub, LinkedIn, Google Groups, etc. This not only enhances English reading and writing skills and helps to meet international friends, but also keeps one at the forefront of the field, and even provides opportunities for guidance from experts.
3. Job Opportunities
Just like around 2004, when I decisively chose to switch to the Linux platform in school, I have the same intuition now. Linux and related open-source technologies, which embody the concept of mutual benefit (Open, Free, Share), integrate the wisdom of numerous global enterprises and geniuses, and continuously innovate and update themselves, will continue to thrive.
Currently, it seems that there are many Linux talents, and students who have just graduated from school can quickly write a small driver, which appears to have a low threshold. However, truly high-end talents who can solve problems from a system level are rare. If students start from university, they will have four more years of experience and thinking cultivation by graduation. This will be a significant competitive advantage for future research and work.
4. Course Practice
From hardware to software, the Linux platform can almost provide various learning cases that touch the “soul” from the ground up, transforming all courses from theoretical discussions into practical battles, greatly enhancing engineering practice efficiency and skills.
1. Hardware Aspects
Hardware simulation has become an unstoppable trend. This includes processor simulation and system simulation, with the well-known Qemu and its derivative Android Emulator providing easy-to-use cases that support ARM, X86, PPC, and MIPS.
This tool not only simulates processor instructions and supports system-level (various peripherals) simulation, but also allows executing executable files from one architecture on another architecture (through qemu-user translation). With it, there is no need to spend money on development boards; one can study how to simulate the design and implementation of a hardware system, a set of processor instructions, and even explore virtualization technology and virtualized clusters.
Like the pioneers Stallman, the creator of GNU tools, and Linus, the creator of Linux, the creator of Qemu is also a great pioneer. His personal homepage is: http://bellard.org/.
Fabrice Bellard is a famous French computer programmer known for projects like FFmpeg and Qemu. He is also the author of the fastest pi algorithm, TCCBOOT, and TCC. Born in 1972 in Grenoble, France, he developed the well-known executable compression program LZEXE during high school, which was the first widely used file compression program on DOS.
Getting in touch with open-source allows one to learn about and meet these crazy predecessors, which is undoubtedly an inspiring and exhilarating experience.
Regarding pure CPU simulation, I would like to add Unicorn (https://github.com/unicorn-engine/unicorn), which also originates from Qemu. Additionally, if you want to study processors, consider the currently popular RISC-V (https://riscv.org/), which adopts the BSP protocol license and is completely open-source.
2. Bootloaders
In college, I learned about BIOS, the basic input/output system, and felt its presence but couldn’t see its true form. However, with Uboot, one can directly conduct Uboot experiments through Qemu. Recently, it has become even easier to conduct Uboot experiments through Linux Lab (http://tinylab.org/linux-lab).
3. Operating Systems
Most of Linux itself is open-source. While learning operating system courses, if one can read the source code of Linux 0.11, they will find that operating systems are not just dry descriptions of elevator scheduling algorithms. Instead, they can see real, living scenarios that “speak”.
Scheduling algorithms, synchronization mechanisms, interrupt management, file systems, and various peripheral drivers can all be seen in the source code implementation, allowing for personal modification, debugging, and improvement. One can even submit patches to the official Linux community through mailing lists (http://vger.kernel.org/vger-lists.html) and have the opportunity to interact with those seemingly “god-like” figures in the Linux community who are actually very approachable. Moreover, the open-source community appreciates students who are fearless, thoughtful, and eager to explore.
One can also create a complete operating system. Check out the book “Building Embedded Linux Systems” to download a copy of the source code from the official Linux community (http://www.kernel.org/) and compile it. Then, using Busybox, Buildroot, LFS, Openembedded, or even Yocto, one can create a file system and understand what constitutes a complete operating system versus just an operating system kernel. You will also learn that the user interaction interface, aside from GUI, is fundamentally the Shell Terminator; GUI is merely a dressed-up version. You will truly understand what happens behind the scenes when you press a key on the keyboard. As a computer student, you should not remain in the dark about these matters; you should lift the veil and explore the intricate details. Then, one day, when you close your eyes and the entire story unfolds in your mind as clearly as a movie, you will find that wonderful feeling validated when you encounter bugs that need solving.
To conduct these experiments, there is no need to buy development boards; Qemu is more than sufficient (a “frugal student” is a good student). If you want to learn the Linux 0.11 kernel, you can download open books and source code from http://oldlinux.org/ and conduct experiments using Qemu and the Linux 0.11 Lab (http://tinylab.org/linux-0.11-lab).
If you want to study the latest Linux kernel, you can use Linux Lab (http://tinylab.org/linux-lab). It allows you to set up a Linux kernel experimental environment with one click via Docker, supports hundreds of free development boards through Qemu, integrates essential tools for embedded Linux development such as cross-compilation environments, Buildroot, Uboot, etc., and supports serial and graphical startup, online debugging, and testing, as well as remote access via the web.
4. Assembly Language
I wonder if the assembly language course in school still uses Professor Wang’s book? This is the reference answer for the experiments in the “Assembly Language” (by Wang Shuang) that I wrote in my sophomore year (http://tinylab.org/assembly/).
I want to emphasize the importance of practice here. I wonder how many students have seriously completed all or most of the experiments in their university computer courses. Experiments are indeed very important.
Additionally, I truly hope everyone can learn assembly language on the Linux platform, using the gas assembler, with AT&T syntax, and see how C language implementations are realized in assembly language using gcc. This is a wonderful experience. Of course, you can also use qemu-user to learn ARM, MIPS, and PPC assembly. I particularly recommend learning MIPS assembly, which has a reduced instruction set and is the most elegant assembly language.
Combining the above operating system course, I highly recommend a course from San Francisco University: CS630 (http://www.cs.usfca.edu/~cruse/cs630f06/). Originally, this teacher (Allan B. Cruse) conducted experiments on real I386 machines, and I improved the Makefile so that experiments could be conducted on Qemu. For details, please refer to CS630 Lab (http://tinylab.org/cs630-qemu-lab/).
Here’s a fun story: I shared with Professor Cruse the method of conducting experiments through Qemu, and he said this online student is doing well and can directly earn an A.
Hello, Falcon
I’m amazed to receive your cs630-experiment-on-VM. I think, as an online “student”, you have earned an ‘A’ for this course! I will let some Ubuntu-savvy students here know about what you’ve created, and we’ll see if they find it to be a timesaver, as it ought to be. Thanks for contributing these efforts to the class.
Here are two recommended books:
· ARM Assembly: “ARM System Developers Guide: Designing and Optimizing System Software”
· MIPS Assembly: “See MIPS Run Linux”
As for X86 assembly, don’t miss the aforementioned CS630 course and Allan B. Cruse’s personal homepage.
Additionally, the previously mentioned Linux Lab project also provides 10 hello-world examples in assembly language (see examples/assembly), allowing for quick hands-on experience with assembly language development across five major processor architectures (X86, ARM, MIPS, PowerPC, RISC-V).
5. C Language
In terms of the language itself, it is very vibrant, and it will maintain its unique vitality now and in the foreseeable future. Is the language still being taught in Professor Tan’s course? I recommend self-studying the book “The C Programming Language (K&R)” written by the inventor of C.
Then, don’t forget to solidify the basics; the following references can serve as lasting resources for future learning and work. It is best to read and practice them systematically during university, as it will be immensely beneficial:
· C Traps and Pitfalls
· C FAQ: http://c-faq.com/
· Advanced Unix Programming
I particularly recommend Jserv’s masterpiece “Hello World in Depth”, which reveals the layers behind “Linux”. It states:
Many Linux programming documents filled with open resources often only discuss concepts or technical details, often concluding with a superficial understanding. Why can’t we adopt an “experimental” mindset to think about the subtle changes during the execution of a small-scale application like “Hello World”? With the wealth of information available online, isn’t it more enjoyable to experience the enlightening moments?
Coincidentally, around 2008, I also had a similar journey of thought. Although I was just taking my first steps compared to the predecessors like Jserv, interested friends can share in this experience. I have now organized it into an open-source book:
“C Language Programming Perspective” (https://tinylab.gitbooks.io/cbook), which is continuously being revised and improved. Senior Jserv has also participated in the revision of this book and has already adopted it as a supplementary textbook for universities:
hi,
First of all, thank you for open-sourcing the book “C Language Programming Perspective”. I teach at a university in Taiwan and hope to use this excellent book as a supplementary textbook. I have made some adjustments to ensure it fits the Linux x86_64 environment. I made a few adjustments; please see: https://github.com/jserv/open-c-book/tree/x86_64
However, there are too many modifications needed for the dynamic linking part. Is there a plan for a recent revision?
Thanks,
-jserv
Another book recommended by Jserv: “Computer Science from the Bottom Up” (https://www.bottomupcs.com/)
By the way, I forgot to mention GCC, GDB, and similar tools. Learning C under Linux is inseparable from them, of course, along with editors like VIM + CSCOPE + CTAGS, and tools like Gprof, Gcov, etc. Since Linux Lab provides a wealth of development tools, it can also be used for C language experiments.
6. Scripting Languages
Learning one or two scripting languages can greatly enhance efficiency in daily learning and work. For example, if you need to process some data, you can use SED, AWK, and Gnuplot, making shell programming very important. I have written an open-source book “SHELL Programming Examples” (https://tinylab.gitbooks.io/shellbook), which systematically introduces various numerical, logical, string, file, process, and file system operations needed in daily work in an “object-oriented” manner, making it suitable for quick reference.
For more complex interactive tasks, you can use Python, which allows for efficient implementation of projects with a beautiful language and also helps in learning object-oriented thinking.
7. Compiler Principles
Compiler principles are crucial. Do you understand the stories behind Turbo C and Visual Studio C++? It’s difficult, but GNU Toolchains can help. You can clearly see the entire process from source code editing (vim), preprocessing (gcc -E, cpp), compiling (gcc -S), assembling (gcc -c, as), to linking (gcc, ld).
You can use a series of tools provided by binutils such as readelf, objdump, objcopy, nm, ld, as to understand what an executable file is, what its structure looks like, what it contains, and how the so-called code segments and data segments are organized.
By using objdump, you can disassemble an interesting executable file and see the underlying implementation ideas. You can also explore how an executable file is organized to support dynamic linking. Furthermore, you can study the details of how a program executes and how it can print “Hello, World!” on the screen, what support is needed, and what work the underlying hardware, operating system, and application program do.
Additionally, you can look at the source code of these GNU Toolchains. If you find it too large, you can read about the genius Fabrice Bellard, who wrote TCC (Tiny C Compiler), to see how a complete yet compact C compiler is implemented.
By the way, I have written a related blog series, which has been organized into an open-source book, namely the aforementioned “C Language Programming Perspective” (https://tinylab.gitbooks.io/cbook).
8. Databases
MySQL, PostgreSQL, SQLite? These were very popular during school, and they remain so after all these years. Especially the compact SQLite, which is used in Android. It is small and allows for learning how SQL languages are specifically implemented.
While enterprise-level Oracle and SQLServer are great to use, they are like heavily made-up wealthy women, high above, circulating in the circles of the rich, and will never open their arms to you, leaving you with no chance to understand their thoughts.
However, “poor students” who wish to delve into databases should choose open-source software like SQLite to conduct hands-on experiments. Of course, many emerging NoSQL technologies are also worth paying attention to.
9. Computer Networks
Returning to virtualization, using Qemu (and of course, VirtualBox and others), you can theoretically create any number of virtual machines, set up various network services, and create a complex cluster. Whether you want to create a bridge or NAT, you can choose according to your needs. Moreover, you can combine it with the Linux system to study and research various network protocols in depth.
10. Document Writing
In the process of summarizing various learning experiences, document writing is essential, including slides, articles, and even book publishing. After graduation, it may also involve resume writing. All of these can be accomplished using the currently most popular and minimalist Markdown, which allows you to completely abandon complicated formatting restrictions and immerse yourself more in content creation. Learning Markdown will benefit your learning efficiency and focus.
11. Others
Almost all courses can find open-source practical projects. Such projects are generally published on public code repository hosting platforms. Here, I recommend two code repository hosting platforms: one is the foreign GITHUB (https://github.com), and the other is the domestic GITEE (https://gitee.com).
5. Online Experiments
The experimental phase is often a roadblock to furthering computer courses. To conduct experiments more quickly and efficiently, Tai Xiao Technology has developed an open-source online experimental cloud platform. This platform has gradually added experimental environments including assembly, C, Linux 0.11, Linux, Uboot, Qemu, etc., and more environments are being developed. Suggestions and ideas are welcome.
Project homepage: http://tinylab.org/cloud-lab
Code repository: https://gitee.com/tinylab/cloud-lab
With Cloud Lab, the experimental environment that used to take weeks to set up can now typically be obtained in just a few minutes, and the experimental environment will no longer be a barrier to learning practical computer courses.
Conclusion
The above analysis highlights the many benefits of learning Linux-related open-source technologies from various aspects. Trendy terms like “community learning”, international terms like “Open, Free, Share”, domestic terms like “mutual benefit”, and traditional sayings like “When three people walk together, there must be a teacher among them” all apply.
As the pandemic prevention has entered a normalized phase, during this time of continued isolation and perseverance at home, we might as well seek out open online courses for learning, find open-source online project source codes for experiments, and look for relevant project discussion groups to consult and exchange ideas with engineers from various regions. Perseverance leads to victory; together we can overcome the pandemic and develop online self-learning skills. During this time, I have been contacted by students from various universities to discuss and exchange Linux-related technologies, and I welcome all junior students to add me on WeChat (lzufalcon) for further in-depth discussions. Please be sure to specify the reason for adding.
Wishing you all the best and success in your studies!
Author Biography
Wu Zhangjin, alumnus of the School of Information Science and Engineering at Lanzhou University, author of Linux Lab, contributor to the official Linux community, and has worked at Lemote, WindRiver, and Meizu, focusing on embedded Linux theoretical research and product development. Currently, he is an entrepreneur dedicated to creating better embedded Linux products for the industry.

Content Source | Publicity Department (News Center) Academic Affairs Office
Editor | Hai Xiaohang
Editor-in-Chief | Zhang Tiantian
Chief Editor | Xiao Kun

Click “Read the Original” for continuous updates in the column