mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-02 06:46:18 -04:00
reorganize dir
Signed-off-by: Mia Steinkirch <mia.steinkirch@gmail.com>
This commit is contained in:
parent
1b6f705e7c
commit
a8e71c50db
276 changed files with 23954 additions and 0 deletions
BIN
other_resources/eudyptula-challenge-solutions/bt3/.DS_Store
vendored
Normal file
BIN
other_resources/eudyptula-challenge-solutions/bt3/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -0,0 +1,9 @@
|
|||
obj-m += eudyptula_1.o
|
||||
KERNEL_VER ?= $(shell uname -r)
|
||||
KERNEL_PATH ?= /lib/modules/$(KERNEL_VER)/build
|
||||
|
||||
all:
|
||||
make -C $(KERNEL_PATH) M=$(PWD) modules
|
||||
|
||||
clean:
|
||||
make -C $(KERNEL_PATH) M=$(PWD) clean
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Eudyptula #1
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
printk(KERN_DEBUG "Ola Mundo!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void cleanup_module(void)
|
||||
{
|
||||
printk(KERN_DEBUG "Unloading exer 1! Goodbye!!!\n");
|
||||
}
|
||||
|
||||
|
||||
MODULE_LICENSE("GLP");
|
||||
MODULE_AUTHOR("7e1cf379bd3d");
|
|
@ -0,0 +1,5 @@
|
|||
make
|
||||
sudo insmod ./eudyptula_1.ko
|
||||
cat /proc/modules | grep eudyptula
|
||||
lsmod | grep eudyptula
|
||||
sudo rmmod eudyptula_1
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
5261
other_resources/eudyptula-challenge-solutions/bt3/task_02/config
Executable file
5261
other_resources/eudyptula-challenge-solutions/bt3/task_02/config
Executable file
File diff suppressed because it is too large
Load diff
42
other_resources/eudyptula-challenge-solutions/bt3/task_02/instructions.md
Executable file
42
other_resources/eudyptula-challenge-solutions/bt3/task_02/instructions.md
Executable file
|
@ -0,0 +1,42 @@
|
|||
1. Clone Linus’ repo and read Installing the kernel source:
|
||||
```
|
||||
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
|
||||
```
|
||||
|
||||
2. Generate .config and add CONFIG_LOCALVERSION_AUTO=y
|
||||
```
|
||||
$ make localmodconfig
|
||||
```
|
||||
|
||||
3. Get an openssl header error, install lots of dev libraries
|
||||
```
|
||||
$ sudo apt-get install python-pip python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev libjpeg8-dev zlib1g-dev
|
||||
```
|
||||
|
||||
4. Make! (It takes ~ 30 min)
|
||||
```
|
||||
$ make
|
||||
```
|
||||
|
||||
5. Make module, install, add to grub
|
||||
```
|
||||
$ make modules
|
||||
$ sudo make modules_install
|
||||
$ sudo make install
|
||||
$ update-grub
|
||||
```
|
||||
|
||||
6. Reboot machine. For ubuntu: press shift to get grub menu
|
||||
|
||||
Profit!
|
||||
|
||||
Some tips:
|
||||
* List of kernel addresses sorted in ascending order, from which it is simple to find the function that contains the offending address:
|
||||
```
|
||||
$ nm vmlinux | sort | less
|
||||
```
|
||||
|
||||
Send
|
||||
```
|
||||
make && make modules && make modules_install && make install
|
||||
```
|
|
@ -0,0 +1,34 @@
|
|||
This is Task 02 of the Eudyptula Challenge
|
||||
------------------------------------------
|
||||
|
||||
Now that you have written your first kernel module, it's time to take
|
||||
off the training wheels and move on to building a custom kernel. No
|
||||
more distro kernels for you. For this task you must run your own
|
||||
kernel. And use git! Exciting, isn't it? No? Oh, ok...
|
||||
|
||||
The tasks for this round are:
|
||||
- Download Linus's latest git tree from git.kernel.org (you have to
|
||||
figure out which one is his. It's not that hard, just remember what
|
||||
his last name is and you should be fine.)
|
||||
- Build it, install it, and boot it. You can use whatever kernel
|
||||
configuration options you wish to use, but you must enable
|
||||
CONFIG_LOCALVERSION_AUTO=y.
|
||||
- Show proof of booting this kernel. Bonus points if you do it on a
|
||||
"real" machine, and not a virtual machine (virtual machines are
|
||||
acceptable, but come on, real kernel developers don't mess around
|
||||
with virtual machines, they are too slow. Oh yeah, we aren't real
|
||||
kernel developers just yet. Well, I'm not anyway, I'm just a
|
||||
script...) Again, proof of running this kernel is up to you, I'm
|
||||
sure you can do well.
|
||||
|
||||
Hint, you should look into the 'make localmodconfig' option, and base
|
||||
your kernel configuration on a working distro kernel configuration.
|
||||
Don't sit there and answer all 1625 different kernel configuration
|
||||
options by hand, even I, a foolish script, know better than to do that!
|
||||
|
||||
After doing this, don't throw away that kernel, git tree, and
|
||||
configuration file. You'll be using it for later tasks. A working
|
||||
kernel configuration file is a precious thing, all kernel developers
|
||||
have one they have grown and tended to over the years. This is the
|
||||
start of a long journey with yours. Don't discard it like was a broken
|
||||
umbrella, it deserves better than that.
|
Loading…
Add table
Add a link
Reference in a new issue