/
0002-lab03-final.patch
85 lines (67 loc) · 1.96 KB
/
0002-lab03-final.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From e0a3c96b9584e808b91e61c44c823406a24424c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Herman?= <loic@loicherman.ch>
Date: Mon, 2 Oct 2023 20:15:01 +0200
Subject: [PATCH 1/3] exercice 1
---
usr/src/sh.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/usr/src/sh.c b/usr/src/sh.c
index 473e129..ccd8477 100644
--- a/usr/src/sh.c
+++ b/usr/src/sh.c
@@ -43,10 +43,13 @@ void parse_token(char *str) {
if (!next_token)
return;
+ printf("%s\n", next_token);
strcpy(tokens[i++], next_token);
- while ((next_token = strtok(NULL, " ")) != NULL)
+ while ((next_token = strtok(NULL, " ")) != NULL) {
+ printf("%s\n", next_token);
strcpy(tokens[i++], next_token);
+ }
}
/*
--
2.42.0
From 321b0d3ab6d59ffd3e2ff7495ab60971d8d49db3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Herman?= <loic@loicherman.ch>
Date: Mon, 2 Oct 2023 20:24:45 +0200
Subject: [PATCH 2/3] exercice 2
---
so3/include/version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/so3/include/version.h b/so3/include/version.h
index 49e2d42..011c59c 100644
--- a/so3/include/version.h
+++ b/so3/include/version.h
@@ -27,7 +27,7 @@
* - Upgrade U-boot to 2022.04
*/
-#define SO3_KERNEL_VERSION "2023.6.0"
+#define SO3_KERNEL_VERSION "2023.6.1"
#endif /* VERSION_H */
--
2.42.0
From 34d22528597a5be5a72f3c7f958c05c5aee11b68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Herman?= <loic@loicherman.ch>
Date: Mon, 2 Oct 2023 20:34:29 +0200
Subject: [PATCH 3/3] exercice 3
---
so3/devices/timer/arm_timer.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/so3/devices/timer/arm_timer.c b/so3/devices/timer/arm_timer.c
index 7ced21a..009a808 100644
--- a/so3/devices/timer/arm_timer.c
+++ b/so3/devices/timer/arm_timer.c
@@ -87,6 +87,10 @@ static irq_return_t timer_isr(int irq, void *dev) {
#else
jiffies++;
+ if (jiffies % 80 == 0) {
+ printk("%llu\n", jiffies);
+ }
+
raise_softirq(TIMER_SOFTIRQ);
#endif
}
--
2.42.0