For more information, see my blog: lmos.blog.chinaunix.net, which was originally scheduled to be released in early December. However, due to the heavy workload of the "device model", it is impossible for me to complete it so quickly, that is, a small part is completed today. I often comfort myself in this way. Don't worry, take it slowly, or be in a hurry. I may be lazy. However, it is not that easy to develop an OS. Although this new feature is only a small step for the entire operating system "process", it is a huge step for me and my LMOs ...... I have mentioned before that an important role of the operating system is to manage and control the various devices in the computer and provide interfaces to the application software. I can't imagine how each application controls its own hardware. To manage a device, we need to first understand it and various devices. In fact, the device controller of each device is related to the operating system, these controller control devices communicate with the CPU, memory, and other devices. To communicate with each other, you must use a "wire" (HEH) to connect them. This "wire" is called a bus. Then, fix these "wires" and the device controllers to a board called the motherboard. Some plug-ins are reserved for expansion. A pc is basically ready, huh, huh. But is this perfect? No, things always develop. There are more than a dozen bus types in PC. For example, the first ISA, what EISA ...... I will not list them one by one. In order to be compatible with the modern PC, there is also the ISA bus. Of course, it is implemented using a PCI bridge. ISA has many disadvantages, such as slow first, poor second, and so on ...... Due to these shortcomings, the PCI bus was introduced by companies such as Intel in 1991 to define local bus standards. This standard allows up to 10 PCI-compliant extended cards to be installed on a PCI computer. Plug-and-play is also supported: When a Board is inserted into the system, the operating system automatically allocates resources required for the Board, such as the base address and interrupt number, and automatically find the corresponding driver. Unlike the old ISA board, complicated manual configuration is required. Therefore, the modern PC is like this. I drew an ugly and ugly figure, as shown below: to support more and more advanced devices, LMOs must be added to the primary support of the PCI bus. You can't just run ISA bus 20 years ago. In fact, for system developers, the ISA bus is simpler than the PCI bus because the register addresses and interrupt numbers of those devices are fixed, no new hardware is added to the computer during running. You do not need to allocate the device BUS address, register address, and memory. During the startup process, LMOs configures each bridge and device on each bus and assigns a pcidsc_t, device_t, drive_t, and objnode_t. and establish the relationship between them. To control and manage it. A basic device model is established, which is divided into bus drivers, class drivers, and device drivers. There is nothing to say about this. This mechanism is inevitable. In the kernel, we can't see it, we can't touch it, it's very abstract. This has a bad figure. Let's take a look: of course, you can enter 'p' in the command line to check whether LMOs displays all the buses and devices in your computer, but not the PCI bridge. You can view the LMOs on my physical machine. This is what I have been doing for two months. This year is over. Wish you a happy New Year !! Although this year is over, but LMOs is not over, I will continue. The next step will continue to improve the device driver model, further strengthen and optimize the memory pool distributor, and strive to join the virtual memory mechanism. Let LMOs be improved step by step. After the LMOs application environment is established, I will pause LMOs development and develop the LMOs compilation tool chain. By that time, you can expand the LMOs kernel, develop a graphical environment, develop hardware drivers, develop application software, and transplant the kernel to arm, Dragon core, and other platforms. But before that, I still have a long way to go.
Since LMOs are not yet open-source, we should not use any means or reverse engineering to study its implementation details. Therefore, everyone is responsible for legal issues and all consequences.
There are two ways to install, test, and test the installation. You can choose either of them: (1) install it on a virtual machine. (2) install it on a physical machine. This method is recommended for installation in virtual machines. In this way, neither an empty hard disk nor a Linux operating system is required. First, make sure that your host operating system is installed with the Oracle VM virtualbox Virtual Machine Software. If you do not have any, please download the Oracle VM virtualbox of the relevant operating system version and install it. After installation, create a new virtual machine, and then download the Virtual Machine hard disk image provided by me (Click here to download. And mounted to the virtual machine, start the virtual machine to run LMOs. Since we provide Hard Disk Images in VDI format, you must install Oracle
VM virtualbox virtual machine. It is not recommended for non-professionals to install it on physical machines. First, find a blank hard disk. I use a GB Seagate hard disk. I am a serious reminder. Please make sure that there is no important data in this hard disk. LMOs will clear the partition table and all data on this hard disk. Please note !!!! You can connect this hard disk to the SATA interface on the computer motherboard (at least two SATA interfaces are available on the first Board ). After the connection, you must have two hard disks on your computer. In this case, a blank hard disk is used for testing. A hard disk is installed with a Linux operating system and can start and run your computer. After everything is ready, start the Linux operating system on your other hard disk. After Linux is started
/Dev/SD (x) the "X" represents a and B. For example, if your computer has two hard disks, you will surely find/dev/SDA,/dev/SDB, these two are the device files of the two hard disks. Now everything works properly. You can download the kernel package provided by me (Click here to download it). After decompression, you will get four files: lmhdboot. bin, lmosldr. bin, lmoskrnl. BIN and makefile. Open the MAKEFILE file and modify the related parameter macros Based on the hardware environment of your computer according to the comments in the file. Then save the MAKEFILE file. Make sure that there are no errors in this batch operation, and then execute the make command. After the execution is successful, restart the computer to enter the BIOS settings and start from the blank hard disk that was previously connected. LMOs: LMOs kernel package LMOs virtual hard disk image
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.