Skip to content

Commit

Permalink
Minor fixes and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
fido2020 committed Sep 21, 2020
1 parent 5594ab2 commit 6034f65
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ Scripts/build-win/mount.cfg
Kernel/subprojects/lai
Initrd/*
Base/*
Disks/*
!Base/lemon
!Base/hello.asm
!Base/hello.py
initrd.tar
Ports/*
!Ports/*.sh
Expand Down
2 changes: 1 addition & 1 deletion Applications/Terminal/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ int main(char argc, char** argv){
paint = false;
}

poll(fds.data(), fds.size(), 100);
poll(fds.data(), fds.size(), 200);
}
for(;;);
}
2 changes: 1 addition & 1 deletion Applications/subprojects/LemonUtils
15 changes: 15 additions & 0 deletions Base/hello.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
_start:
mov rax, 4 ; Write
mov rbx, 0 ; Stdout
mov rcx, string ; Data
mov rdx, string_end - string ; Length
int 0x69 ; Write
mov rax, 1 ; Exit
mov rbx, 0
int 0x69 ; Exit
string:
db "Hello, Lemon OS World!"
string_end:
3 changes: 3 additions & 0 deletions Base/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import platform

print("Hello, " + platform.system() + " World!")
3 changes: 2 additions & 1 deletion Kernel/src/arch/x86_64/hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ namespace HAL{
break;
}
case Mboot2MemoryMap: {
multiboot2_memory_map_t* mbMemMap = reinterpret_cast<multiboot2_memory_map_t*>(tag);
multiboot2_memory_map_t* mbMemMap = reinterpret_cast<multiboot2_memory_map_t*>(tag);

multiboot2_mmap_entry_t* currentEntry = mbMemMap->entries;
while(currentEntry < reinterpret_cast<void*>(mbMemMap) + mbMemMap->size){
Expand All @@ -97,6 +97,7 @@ namespace HAL{
}
currentEntry = reinterpret_cast<multiboot2_mmap_entry_t*>((uintptr_t)currentEntry + mbMemMap->entrySize);
}
Memory::usedPhysicalBlocks = 0;
}
case Mboot2FramebufferInfo: {
multiboot2_framebuffer_info_t* mbFbInfo = reinterpret_cast<multiboot2_framebuffer_info_t*>(tag);
Expand Down
2 changes: 1 addition & 1 deletion Kernel/src/arch/x86_64/physicalallocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Memory{
uint32_t physicalMemoryBitmap[PHYSALLOC_BITMAP_SIZE_DWORDS];

uint64_t usedPhysicalBlocks = PHYSALLOC_BITMAP_SIZE_DWORDS * 32;
uint64_t maxPhysicalBlocks = 0;
uint64_t maxPhysicalBlocks = PHYSALLOC_BITMAP_SIZE_DWORDS * 32;

lock_t allocatorLock = 0;

Expand Down
3 changes: 0 additions & 3 deletions Kernel/src/fs/fat32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,6 @@ namespace fs::FAT32{

fat_entry_t* dirEntries = (fat_entry_t*)ReadClusterChain(cluster, &clusterCount);

Log::Warning(name);

List<int> foundEntries;
List<int> foundEntriesLfnCount;

Expand Down Expand Up @@ -285,7 +283,6 @@ namespace fs::FAT32{
}

if(strcmp(_name, name) == 0){
Log::Warning("Found %s", _name);
uint64_t clusterNum = (((uint32_t)dirEntries[i].highClusterNum) << 16) | dirEntries[i].lowClusterNum;
if(clusterNum == bootRecord->ebr.rootClusterNum || clusterNum == 0)
return mountPoint; // Root Directory
Expand Down
2 changes: 1 addition & 1 deletion Kernel/src/lemon.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
namespace Lemon{
char* versionString = "Lemon OS Alpha x86_64 0.2.0";
char* versionString = "Lemon OS Nightly (Alpha) x86_64";
}
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Lemon OS is a UNIX-like 64-bit operating system written in C++.

![Lemon OS Screenshot](Screenshots/image.png)

### Prebuilt Image
[Latest Prebuilt Image](https://github.com/fido2020/Lemon-OS/releases/tag/0.2.0)

### Building
See [Building Lemon OS](https://github.com/fido2020/Lemon-OS/wiki/Building-Lemon-OS)

Expand All @@ -32,22 +35,23 @@ See [Building Lemon OS](https://github.com/fido2020/Lemon-OS/wiki/Building-Lemon
### System requirements
- 256 MB RAM (512 is more optimal)
- x86_64 Processor
- VESA VBE support
- 2 cores/CPUs recommended
- I/O APIC (mostly relevant for Virtual Machines)
- I/O APIC

## Repo Structure

| Directory | Description |
| ------------- | ---------------------------------- |
| Applications/ | Userspace Applications |
| Base/ | Files copied to disk |
| Kernel/ | Lemon Kernel |
| LibLemon/ | LibLemon (Lemon API) |
| Toolchain/ | Cross Compiler Patches |
| Ports/ | Build scripts and patches for ports|
| Resources/ | Images, fonts, etc. |
| Scripts/ | Build Scripts |
| Screenshots/ | Screenshots |
| System/ | Core system programs and services |

![Lemon OS Screenshot](Screenshots/image3.png)
![Lemon OS Screenshot](Screenshots/image2.png)

0 comments on commit 6034f65

Please sign in to comment.