Giter Club home page Giter Club logo

lld's Introduction

lld's People

Contributors

rockytriton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lld's Issues

include/peripherals/irq.h not consistent with documentation

I think there is a mistake in struct arm_irq_regs_2837.

You have a reserved register between enable and disable. I can't find this in the documentation:

0x200 IRQ basic pending
0x204 IRQ pending 1
0x208 IRQ pending 2
0x20C FIQ control
0x210 Enable IRQs 1
0x214 Enable IRQs 2
0x218 Enable Basic IRQs
// 0x21C RESERVED
0x21C Disable IRQs 1
0x220 Disable IRQs 2
0x224 Disable Basic IRQs

Can't use shared object Library

I decided to have some fun and code along with the videos in the OS development using the Linux kernel playlist. I had issues after compiling the mylib library & moving the shared object to /mnt/myos/lib/. I tried compiling the init using the makefile, and I just get this output:

cc -nostdlib -I../include -c init.c -o init_c.o
cc -lmy -L/mnt/myos/lib -nostdlib -I../include -o init init_c.o ../crt0_s.o
/usr/bin/ld: init_c.o: in function `main':
init.c:(.text+0x20): undefined reference to `sleep_sec'
/usr/bin/ld: init.c:(.text+0x2c): undefined reference to `str_print'
/usr/bin/ld: init.c:(.text+0x36): undefined reference to `sleep_sec'
/usr/bin/ld: init.c:(.text+0x4d): undefined reference to `str_print'
/usr/bin/ld: init.c:(.text+0x59): undefined reference to `str_print'
/usr/bin/ld: init.c:(.text+0x65): undefined reference to `str_print'
/usr/bin/ld: init.c:(.text+0x76): undefined reference to `sys_open'
/usr/bin/ld: init.c:(.text+0x95): undefined reference to `sys_read'
/usr/bin/ld: init.c:(.text+0xa4): undefined reference to `str_print'
/usr/bin/ld: init.c:(.text+0xb7): undefined reference to `sleep_sec'
/usr/bin/ld: init.c:(.text+0xc3): undefined reference to `str_print'
/usr/bin/ld: init.c:(.text+0xd7): undefined reference to `sys_reboot'
collect2: error: ld returned 1 exit status
make: *** [Makefile:11: init] Error 1

Any chance I am doing something wrong?

Qemu ERROR: device '/dev/sda' not found

Hi I want to say that's a great tutorial, thank you.
I learned the part1~2 and did exactly what you did. I can boot myos.
when I followed the tutorial how to run myos in qemu, I got a error "device '/dev/sda' not found", below is my command:
$qemu-img create -f raw myos.img 512M
$mkfs.ext4 ./myos.img
$mkdir mnt
$sudo mount -o loop -t ext4 ./myos.img ./mnt
$sudo cp -r /mnt/myos/* ./mnt
$sudo umount ./mnt
$qemu-system-x86_64 -kernel /boot/vmlinuz-linux -initrd /boot/initramfs-linux.img -m 512m -append "root=/dev/sda" -hda ./myos.img

after the qemu run, I got below information:
...
:: Triggering uevents...
Waiting 10 seconds for device /dev/sda ...
ERROR: device '/dev/sda' not found. Skipping fsck.
:: mounting 'dev/sda' on real root
mount: /new_root: no filesystem type specified.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]#
I found there is no /dev/sd* or /dev/hd* under /dev folder.
my os version: Linux arch 5.16.16-arch1-1 #1 SMP PREEMPT Mon, 21 Mar 2022 22:59:40 +0000 x86_64 GNU/Linux
Could you please give me a help to uderstand what's going on and how to fix this issue.

Suggestion

Make it so it displays the directory your on and the user and so there can be a installer and add dpkg support so you can have KDE and maybe APT with custom stuff whenever your using the debian edited kernel so it could be a debian distro :)

Segment fault when storing

So uh when i run store it comes up with a seg fault


lets say the break is 0F0000

 :> brk 4096
0F1000
 :> store 0F0000 0
segment fault

whats the problem?


the code is the exact same as in the video

part 6-7 broken start SDCARD_CONTROL_POWER not defined issue

Hi, so, first, I have never knew which are the corect manners, but let's start by saying thank you for the tutorials.

just as a side note, personally, I'm trying to make an OS for the pi4 to work as "sheika tablet" from Legend of Zelda Breathe of the Wild and without your tutorials I would be long time lost. Even so, I have follow everything to the line as the nice new puppy that i'm, but when I boot the Pi it always stop working with the next message:

"MESS:00:00:07.512545:0: gpioman: gpioman_get_pin_num: pin SDCARD_CONTROL_POWER not defined"

Now I have searched even across hell whitout any success, my closest lead takes me to the config file, but i have had more lucky playing lottery.

I will be more than thankfull for any help.

Read on file descriptor permanently hangs

int len = sys_read(fd, buffer, sizeof(buffer));

The file descriptor for the card[number] is set to be read in the function mydrm_handle_event; yet when it is passed, and the respective read operation is called on it, the entire execution hangs indefinitely, what could cause this, as the card device was being read previously via the mydrm_open in src/drmlist/drmlist.c; I thought maybe the file descriptors cursor may have to of been re-positioned to the beginning, but this proved unsuccessful.

Any suggestions?

SPI-Communication at part12 is not working on RPi4

I tested the SPI-communication at part 12 with an ENC28J60 connected to a RPi4 (I merged the driver from here. It did'nt work out with your code so I went for debugging. There was something weird with the CS line. I change the code for setting the CS-line (Pin8) to the code from the driver and then it worked.

  1. possibility: You tested it on Rpi3
    The Registers pupd_enable of RPi3 divers from RPi4 see picture.
GPIO_Register_Rpi3 GPIO_Register_RPi4
  1. possibility: SPI timing
    In your example, you are only sending messages. With ENC28J60, I also receive messages, so the timing of the CS line is wrong for the ENC28J60 (CS line needs to be active low for a longer time before MOSI-message starts)

The relevant question: Did you (or somebody else) tested your example with RPi4 also?

MMAP size issue.

I am compiling this on Aarch64 (so this may just be an issue with cross compilation).

I have an issue with the mmap function call, when I pass the in_size + HEADER_SIZE_MASK the number received by the syscall mmap - when viewed with strace - is not what is expected. For example, if I printf the in_size + HEADER_SIZE_MASK I get 131067 but the value sent to the mmap syscall is 4295098363; which automatically fails as that's more ram than that is on my device. I know that the HEADER_SIZE_MASK is set to 0xFFFFFFF8 but why does it result in the memory size being over 4 gigabytes for a memory allocation?

Any ideas on why this occurs?

uint8_t *p = sys_mmap(NULL, in_size + HEADER_SIZE_MASK, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.