-
Notifications
You must be signed in to change notification settings - Fork 2
/
basemint_tasks.yml
181 lines (181 loc) · 6.12 KB
/
basemint_tasks.yml
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
- name: Load freemint version from freemint-version.yml
include_vars:
file: freemint-version.yml
- name: Download mint distribution {{ version }}
get_url:
url: "https://tho-otto.de/snapshots/freemint/bootable/freemint-{{ major_version }}-{{ commit_hash }}-000-st_ste.zip"
dest: "{{ playbook_dir }}/freemint-{{ major_version }}-{{ commit_hash }}-000-st_ste.zip"
force: false
- name: Create folder structure
loop:
- freemint
- build/auto
- build/extra
- resources/etherne
file:
path: "{{ item }}"
state: directory
- name: Unpack freemint archive
unarchive:
src: "freemint-{{ major_version }}-{{ commit_hash }}-000-st_ste.zip"
dest: "{{playbook_dir}}/freemint"
creates: "freemint/auto/mint-{{ minor_version }}.prg"
- name: Copy freemint kernel loader
copy:
src: freemint/auto/mint-{{ minor_version }}.prg
dest: build/auto/mint-{{ minor_version }}.prg
- name: Copy freemint sysdir
command: cp -r freemint/mint build/
args:
creates: build/mint
- name: Disable default 68000 kernel
copy:
src: build/mint/{{ version }}/mint000.prg
dest: build/mint/{{ version }}/mint000.prx
- name: Use kernel built with GEMDOS FAT driver
copy:
src: build/mint/{{ version }}/mint000h.prg
dest: build/mint/{{ version }}/mint000.prg
- name: Remove default hostname
replace:
path: build/mint/{{ version }}/mint.cnf
regexp: '^setenv HOSTNAME saturn$'
replace: 'setenv HOSTNAME stmint'
- name: Set kernel debug level to alert
replace:
path: build/mint/{{ version }}/mint.cnf
regexp: '^#KERN_DEBUG_LEVEL=1$'
replace: 'KERN_DEBUG_LEVEL=1'
- name: Increase kernel slices
replace:
path: build/mint/{{ version }}/mint.cnf
regexp: '^#KERN_SLICES=2$'
replace: 'KERN_SLICES=5'
- name: Make sure we have /usr/bin in the MiNT sysroot, needed for coreutils
replace:
path: build/mint/{{ version }}/mint.cnf
regexp: "#sln \\$\\{SYSDIR\\}sys-root/usr u:/usr"
replace: "sln ${SYSDIR}sys-root/usr u:/usr"
- name: Disable unused filesystems
loop:
- ext2
- nfs
command: mv build/mint/{{ version }}/{{ item }}.xfs build/mint/{{ version }}/{{ item }}.xfx
args:
creates: build/mint/{{ version }}/{{ item }}.xfx
- name: Disable unused device drivers
loop:
- flop_raw
command: mv build/mint/{{ version }}/{{ item }}.xdd build/mint/{{ version }}/{{ item }}.xdx
args:
creates: build/mint/{{ version }}/{{ item }}.xdx
- name: Disable non working serial port mfp driver
loop:
- st
- ste
- megast
- megaste
command: mv build/mint/{{ version }}/{{ item }}/mfp.xdd build/mint/{{ version }}/{{ item }}/mfp.xdx
args:
creates: build/mint/{{ version }}/{{ item }}/mfp.xdx
- name: Disable unused network interface drivers
loop:
- plip
command: mv build/mint/{{ version }}/{{ item }}.xif build/mint/{{ version }}/{{ item }}.xix
args:
creates: build/mint/{{ version }}/{{ item }}.xix
- name: Copy mint.ini with boot log enabled
copy:
src: resources/mint.ini
dest: build/mint/{{ version }}
- name: Copy mksh sell
copy:
src: mksh/mksh
dest: build/mint/{{ version }}/sys-root/bin
- name: Copy minimal profile
copy:
src: mksh/profile
dest: build/mint/{{ version }}/sys-root/etc/profile
- name: Set mksh as the default root shell
copy:
dest: build/mint/{{ version }}/sys-root/etc/passwd
content: |
root:x:0:0::/root:/bin/mksh
- name: Download GNU coreutils for FreeMiNT
get_url:
url: http://vincent.riviere.free.fr/soft/m68k-atari-mintelf/archives/mint/coreutils/coreutils-9.4-bin-mintelf-20240120.tar.xz
dest: resources/coreutils-9.4-bin-mintelf-20240120.tar.xz
force: false
# ignore warning to use the unarchive module, as it fails with
# 'failed to find handler for 5380204-142837785679065/source'
- name: Untar coreutils
command: >
tar -C build/mint/{{ version }}/sys-root/
-xaf resources/coreutils-9.4-bin-mintelf-20240120.tar.xz
usr/bin
args:
creates: build/mint/{{ version }}/sys-root/usr/bin/uname
# warn: false
- name: Download ncurses-bin for FreeMiNT
get_url:
url: http://vincent.riviere.free.fr/soft/m68k-atari-mintelf/archives/mint/ncurses/ncurses-6.4-bin-mintelf-20240121.tar.xz
dest: resources/ncurses-6.4-bin-mintelf-20240121.tar.xz
force: false
# ignore warning to use the unarchive module, as it fails with
# 'failed to find handler for 5380204-142837785679065/source'
- name: Untar ncurses-bin
command: >
tar -C build/mint/{{ version }}/sys-root/
-xaf resources/ncurses-6.4-bin-mintelf-20240121.tar.xz
usr/bin
usr/share/terminfo/t/tw52
usr/share/terminfo/t/tw52-m
usr/share/terminfo/t/tw100
usr/share/terminfo/s/st52
usr/share/terminfo/s/st52-color
args:
creates: build/mint/{{ version }}/sys-root/usr/bin/clear
# warn: false
- name: Create a symlink for accessing /usr/bin
replace:
path: build/mint/{{ version }}/mint.cnf
regexp: '^#sln e:/usr u:/usr$'
replace: 'sln c:/mint/{{ version }}/sys-root/usr u:/usr'
- name: copy csed the cheap sed
copy:
src: csed/sed
dest: build/mint/{{ version }}/sys-root/usr/bin/sed
- name: Copy minix userland commands
loop:
- grep
- term
copy:
src: minix/commands/{{ item }}/{{ item }}
dest: build/mint/{{ version }}/sys-root/usr/bin/{{ item }}
- name: Copy fplay script
copy:
src: resources/fplay
dest: build/mint/{{ version }}/sys-root/usr/bin/fplay
- name: Create path for term command lock directory
file:
path: build/mint/{{ version }}/sys-root/usr/spool/locks
state: directory
- name: Download ethernec driver
get_url:
url: http://web222.webclient5.de/prj/atari/download/etherne.zip
dest: resources/etherne.zip
force: false
mode: '0644'
- name: Unarchive ethernec driver
unarchive:
src: resources/etherne.zip
dest: resources/etherne/
creates: resources/etherne/ENEC.MIF
- name: Fix ethernet driver file permissions
file:
path: resources/etherne/ENEC.MIF
mode: '0644'
- name: Copy ethernec driver to mint folder but leaves it disabled
command: cp resources/etherne/ENEC.MIF build/mint/{{ version }}/enec.xix
args:
creates: build/mint/{{ version }}/enec.xix