Low Level Devel
Code for https://www.youtube.com/playlist?list=PLVxiWMqQvhg9FCteL7I0aohj1_YiUx1x8
Low Level Devel
Code for https://www.youtube.com/playlist?list=PLVxiWMqQvhg9FCteL7I0aohj1_YiUx1x8
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
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?
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.
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 :)
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
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.
The make process failed when compiling init and lash: undefined reference to __stack_chk_fail. The setup is set with the youtube video.
LLD/linux_os/part10/src/mydrm/mydrm.c
Line 122 in 7c3c7b2
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?
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.
The relevant question: Did you (or somebody else) tested your example with RPi4 also?
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?
LLD/linux_os/part6/src/mylib/mem.c
Line 177 in 62e5144
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.