feat(lab02): skeleton for ex 2,3,4
This commit is contained in:
@@ -1,178 +0,0 @@
|
||||
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.6.1 Chrome/142.0.7444.265 Electron/39.8.0 Safari/537.36" version="29.6.1">
|
||||
<diagram name="Page-1" id="RzmYo_imKgWcYN3XHb4n">
|
||||
<mxGraphModel dx="5470" dy="1236" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--11" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--12" connectable="0" parent="l6VNc65-mUKkqT4oV-s--11" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="SSH / Serial" vertex="1">
|
||||
<mxGeometry relative="1" x="-0.1603" as="geometry">
|
||||
<mxPoint x="4" y="-15" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-13" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;" value="Docker compose / host" vertex="1">
|
||||
<mxGeometry height="380" width="250" x="-24.97" y="270" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-1" parent="1" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=bottom;labelPosition=center;verticalLabelPosition=top;align=center;" value="Nanopi" vertex="1">
|
||||
<mxGeometry height="380" width="270" x="370" y="270" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-2" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;strokeWidth=2;fillColor=#fff2cc;strokeColor=#d6b656;gradientColor=#ffd966;" value="SD card" vertex="1">
|
||||
<mxGeometry height="130" width="130" x="390" y="300" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-21" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;strokeWidth=2;fillColor=#f5f5f5;gradientColor=#b3b3b3;strokeColor=#666666;" value="Ram" vertex="1">
|
||||
<mxGeometry height="70" width="130" x="390" y="454.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-22" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="Kernel" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="405" y="464.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-23" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="DeviceTree" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="405" y="494.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-16" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="U-Boot" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="405" y="310" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--6" edge="1" parent="1" source="vD2lw7VRJtYcrqhtukAB-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-22">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="550" y="380" />
|
||||
<mxPoint x="550" y="475" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-17" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="Kernel" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="405" y="370" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--7" edge="1" parent="1" source="vD2lw7VRJtYcrqhtukAB-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-23">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="560" y="350" />
|
||||
<mxPoint x="560" y="505" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-18" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="deviceTree" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="405" y="340" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-19" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="rootfs" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="405" y="400" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-3" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;strokeColor=default;strokeWidth=2;" value="toolchain" vertex="1">
|
||||
<mxGeometry height="100" width="140" x="30" y="300" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-4" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;strokeColor=default;strokeWidth=2;" value="samba" vertex="1">
|
||||
<mxGeometry height="70" width="140" x="30" y="560" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-5" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;strokeColor=default;strokeWidth=2;" value="tftp" vertex="1">
|
||||
<mxGeometry height="110" width="140" x="30" y="425" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-7" parent="1" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;strokeColor=#82b366;fillColor=#d5e8d4;gradientColor=#97d077;" value="/buildroot" vertex="1">
|
||||
<mxGeometry height="90" width="100" x="50.03" y="435" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-36" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;fillColor=#dae8fc;gradientColor=#7ea6e0;strokeColor=#6c8ebf;" target="YHTuzEM8hnJJ86Kz7lB9-26">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint y="350" />
|
||||
<mxPoint y="610" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-8" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;gradientColor=#7ea6e0;strokeColor=#6c8ebf;" value="&nbsp;/workspace" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="50.03" y="340" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-9" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffcd28;gradientColor=#ffa500;strokeColor=#d79b00;" value="&nbsp;/rootfs" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="50.03" y="570" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-41" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-10" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-22">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-10" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="kernel" vertex="1">
|
||||
<mxGeometry height="20" width="80" x="60.03" y="465" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-42" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-23">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-11" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="deviceTree" vertex="1">
|
||||
<mxGeometry height="20" width="80" x="60.03" y="495" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-22" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;fontColor=#000000;" value="load from SD card" vertex="1">
|
||||
<mxGeometry height="30" width="70" x="560" y="415" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-35" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;strokeColor=#82b366;fillColor=#d5e8d4;gradientColor=#97d077;" target="YHTuzEM8hnJJ86Kz7lB9-7">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="20" y="320" />
|
||||
<mxPoint x="20" y="480" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-44" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-25" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="YHTuzEM8hnJJ86Kz7lB9-27">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="180.03" y="320" />
|
||||
<mxPoint x="180.03" y="380" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-45" connectable="0" parent="YHTuzEM8hnJJ86Kz7lB9-44" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" value="Extract" vertex="1">
|
||||
<mxGeometry relative="1" x="0.3013" y="-2" as="geometry">
|
||||
<mxPoint x="22" y="-18" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-25" parent="1" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=#82b366;fillColor=#d5e8d4;gradientColor=#97d077;" value="/buildroot" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="50.03" y="310" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-26" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;gradientColor=#7ea6e0;strokeColor=#6c8ebf;" value="&nbsp;/workspace" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="50.03" y="600" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-37" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;endFill=0;fillColor=#ffcd28;gradientColor=#ffa500;strokeColor=#d79b00;" target="YHTuzEM8hnJJ86Kz7lB9-9">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="10" y="380" />
|
||||
<mxPoint x="10" y="580" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-27" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffcd28;gradientColor=#ffa500;strokeColor=#d79b00;" value="&nbsp;/rootfs" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="50.03" y="370" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--1" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="Download at boot time" vertex="1">
|
||||
<mxGeometry height="30" width="70" x="260" y="474.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--2" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="Mount at boot time" vertex="1">
|
||||
<mxGeometry height="30" width="60" x="265" y="550" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--3" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="Mount with fstab" vertex="1">
|
||||
<mxGeometry height="30" width="95" x="247.5" y="580" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-23" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;strokeWidth=2;dashed=1;" value="Mount" vertex="1">
|
||||
<mxGeometry height="80" width="130" x="390" y="554.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-24" parent="1" style="rounded=1;whiteSpace=wrap;html=1;labelPosition=center;verticalLabelPosition=middle;align=center;verticalAlign=top;" value="rootfs" vertex="1">
|
||||
<mxGeometry height="60" width="100" x="405" y="564.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="vD2lw7VRJtYcrqhtukAB-26" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="/workspace" vertex="1">
|
||||
<mxGeometry height="20" width="80" x="415" y="594.5" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-43" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-24">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="YHTuzEM8hnJJ86Kz7lB9-39" edge="1" parent="1" source="YHTuzEM8hnJJ86Kz7lB9-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-26">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--9" edge="1" parent="1" source="vD2lw7VRJtYcrqhtukAB-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" target="vD2lw7VRJtYcrqhtukAB-24">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="540" y="410" />
|
||||
<mxPoint x="540" y="595" />
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="l6VNc65-mUKkqT4oV-s--10" parent="1" style="rounded=1;whiteSpace=wrap;html=1;" value="kernel" vertex="1">
|
||||
<mxGeometry height="20" width="100" x="405" y="370" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
@@ -4,12 +4,15 @@ export PATH := /buildroot/output/host/usr/sbin$\
|
||||
:/buildroot/output/host/bin/$\
|
||||
:$(PATH)
|
||||
|
||||
MODULE := mymodule
|
||||
SOURCE := skeleton
|
||||
|
||||
# Part executed when called from kernel build system:
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
obj-m += mymodule.o ## name of the generated module
|
||||
obj-m += $(MODULE).o ## name of the generated module
|
||||
|
||||
mymodule-objs := skeleton.o ## list of objects needed for that module
|
||||
CFLAGS_skeleton.o := -DDEBUG
|
||||
$(MODULE)-objs := $(SOURCE).o ## list of objects needed for that module
|
||||
CFLAGS_$(SOURCE).o := -DDEBUG
|
||||
|
||||
# Part executed when called from standard make in module source directory:
|
||||
else
|
||||
@@ -25,6 +28,8 @@ clean:
|
||||
|
||||
install:
|
||||
$(MAKE) -C $(KDIR) M=$(PWD) INSTALL_MOD_PATH=$(MODPATH) modules_install
|
||||
install -d $(MODPATH)/etc/modprobe.d
|
||||
install -m 0644 $(SOURCE).conf $(MODPATH)/etc/modprobe.d/$(SOURCE).conf
|
||||
|
||||
endif
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
static char* text = "dummy text";
|
||||
module_param(text, charp, 0664);
|
||||
static int elements = 1;
|
||||
module_param(elements, int, 0);
|
||||
static int number = 1;
|
||||
module_param(number, int, 0);
|
||||
|
||||
static int __init skeleton_init(void)
|
||||
{
|
||||
pr_info ("Linux module 01 skeleton loaded\n");
|
||||
pr_debug (" text: %s\n elements: %d\n", text, elements);
|
||||
pr_info ("Linux module skeleton ex02 loaded\n");
|
||||
pr_debug (" text: %s\n number: %d\n", text, number);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ static void __exit skeleton_exit(void)
|
||||
module_init (skeleton_init);
|
||||
module_exit (skeleton_exit);
|
||||
|
||||
MODULE_AUTHOR ("Daniel Gachet <daniel.gachet@hefr.ch>");
|
||||
MODULE_AUTHOR ("Fastium <fastium.pro@proton.me>");
|
||||
MODULE_AUTHOR ("Klagarge <remi@heredero.ch>");
|
||||
MODULE_DESCRIPTION ("Module skeleton");
|
||||
MODULE_LICENSE ("GPL");
|
||||
|
||||
|
||||
1
src/01-skeleton/skeleton.conf
Normal file
1
src/01-skeleton/skeleton.conf
Normal file
@@ -0,0 +1 @@
|
||||
options mymodule number=42 text="The answer to the Ultimate Question of Life, The Universe, and Everything"
|
||||
Reference in New Issue
Block a user