kernel: scheduling fix for ARM
[minix.git] / docs / UPDATING
blob85235515111a43c44897ff6d56f168365c04c00f
1 20130201:
2         Replace our native ln with NetBSD version.
4         As our native ln is a hard link to cp, simply overwriting ln with
5         the new version would cause mv, cp, etc to stop working.
7         Do this BEFORE a 'make build':
9         # rm /bin/ln
10         # cp /bin/cp /bin/ln
12         Then 'make build' as usual.
14 20130130:
15         With the shell update, and following update of 'test', some
16         modifications are needed in .profile and .ashrc.
17         If you use the defaults, simply execute the following for all
18         of your users:
20         # cp etc/ast/.ashrc ~/
21         # cp etc/ast/.profile ~/
23 20130114:
24         The terminfo update is also linked to the databases functions,
25         which means the tool used to generate the termcap entries has to
26         be rebuild with the new libraries before creating a valid 
27         terminfo DB. To resolve this issue we have to do two (2) full 
28         build of the system. The simplest is to do the following:
30         # make build && make build && reboot 
31         
32 20121207:
33         The join and lorder tools have been upgraded. Build them first:
35         # make -C usr.bin/lorder clean all install
36         # make -C usr.bin/join clean all install
37         # make -C usr.bin/tic clean all install
38         # make -C usr.bin/nbperf clean all install
40         Then do a "make build".
42 20121205:
43         Following the terminfo update, some new tools are now used during 
44         the build. Execute the following to install them:
45         # make -C usr.bin/nbperf all install
46         # make -C usr.bin/lorder all install
47         # make -C usr.bin/join all install
48         # make -C usr.bin/tic all install
50 20121205:
51         The tsort tool has been also upgraded and is now also used during
52         the build:
53         # make -C usr.bin/tsort all install
54         # cp share/mk/* /usr/share/mk
56 20121205:
57         lorder requires a newer version of sort, so to ensure it is present
58         do the following:
59         # make -C usr.bin/sort clean all install
61 20121127:
62         /etc/mtab is now obsoleted by /proc/mounts. You need to create a
63         symlink:
65         # rm /etc/mtab
66         # ln -s /proc/mounts /etc/mtab
68 20121116:
69         To make the build system less verbose:
71         # cp /usr/src/etc/make.conf /etc
73 20121115:
74         Before your first native build you need to update /usr/share/mk.
75         # rm /usr/share/mk/*
76         # cp /usr/src/share/mk/* /usr/share/mk
77         
78         With the update, it is now recommended to use the following make
79         targets :
80         - "build" (i.e., make build) instead of "world", which is now obsoleted.
81         
82         There is some differences between make build and make world. namely:
83         - make build is NOT automatically followed by make etcforce.
84         - make build is by default preceded by a make clean, to prevent that
85           use the following command:
86           # make build MKUPDATE=yes
87         
88         It is now possible to crosscompile minix on minix, if you have 
89         not already followed the previous steps, you will need to do the
90         following before using the build.sh script:
91         # make etcforce
93 20120927:
94         Building a new boot image requires the current mkfs.mfs.
95         # make -C usr.sbin/mkfs.mfs clean all install
97 20120703:
98         The device manager(devman) is now started automatically during the 
99         mount -a operation.  As fstab is generated during installation it is 
100         required to manually insert the following entry in fstab. Failing to 
101         do so will result in the devmand daemon to be able to open the events 
102         file in /sys.
104         none  /sys  devman  rw,rslabel=devman 0 0
106 20120608:
107         New install and mk files require the following steps:
109         # cp /usr/src/share/mk/*.mk /usr/share/mk
110         # cd /usr/src
111         # make -C usr.bin/xinstall all
112         # cp usr.bin/xinstall/xinstall /usr/bin/install
113         # rm /bin/install
115         then do
116         # make clean world
118 20120510:
119         WARNING: the shared libraries major revision set to 0 will break
120         existing dynamically linked binaries if they exist.
122         There are two risks. One: existing binaries won't find the current
123         libraries; two: linking binaries with both majors present will link
124         them in twice. So the previous libraries have to be removed.
126                 . re-build world statically first if necessary
127                 . remove libraries from /lib and /usr/lib
128                 . then build world
130 20120416:
131         Upgrade your clang to clang-2.9nb6 or clang-3.1nb3 to be able to
132         build shared libraries and dynamically linked executables. The
133         system will keep working without them, but a dynamic-capable
134         system will be a requirement soon.
136 20120413:
137         Boot loader menu now has an option to boot into single user mode. To
138         get the menu option do:
140         # cp /usr/src/etc/boot.cfg.default /etc
141         # update_bootcfg
143 20120402:
144         an installed genassym is required to build the kernel:
145         # make -C usr.bin/genassym install     
147 20120328:
148         The boot loader now defaults to 115200 baud rate to make booting over
149         serial more pleasant. To install the new boot loader do
151         # cd /usr/src/sys
152         # make clean install
153         # updateboot
155         To boot over serial add the following to /etc/boot.cfg.local (create
156         the file if not present):
157         menu=Start latest serial MINIX 3:load_mods /boot/minix_latest/mod*;multiboot /boot/minix_latest/kernel rootdevname=c0d0p0s0 cttyline=0 cttybaud=115200
158         consdev=com0
160         To install the new boot configuration run
162         # update_bootcfg
164 20120306:
165         The base system only looks in /usr/pkg/compiler-rt/lib now, so
166         -L/usr/pkg/lib is gone.
167         Please make sure you have the latest compiler-rt package
168         installed.
170 20120214:
171         Compiling everything with clang (previous entry) depends on a
172         relatively new clang package. Please make sure you have at
173         least clang-2.9nb3 installed. The symptom of an old clang being 
174         used is an assert(inited) firing, e.g. after rebuilding make.
176 20120214:
177         Full switch to clang/ELF. ack is no longer supported.
179         clang is the ELF-generating compiler in the base system, gcc is
180         available as a package.
182         To boot ELF-format images, either reinstall your whole system,
183         thereby getting the netbsd-based boot loader, or use the boot
184         monitor as documented at
185                 http://wiki.minix3.org/en/UsersGuide/BootMonitor
187         Single copies of ELF boot files are also stored in /boot on
188         make hdboot as a boot monitor compatability measure. In short,
189         to boot the ELF image in /boot using the boot monitor,
190         do "mb=1" and "kernel=/boot/kernel", then "boot" in the boot
191         monitor.
193         Workaround for header file timestamps causing perpetual recompiles:
194         # find /usr/pkg -name '*.h' | xargs touch
196         Now that CC is clang instead of ack (cc), the depend files will
197         be out of date, so to make world, do:
198         # make cleandepend clean world
200 20120213
201         Replace VFS with AVFS
203         In case you were running AVFS by doing
204         'BUILDAVFS=yes make clean world', you now have to do a
205         'make clean cleandepend world' instead of a normal 'make clean world'.
207 20120202
208         Rename installboot to installboot_minix.
210         Do this BEFORE a 'make world':
211         # rm -f /usr/bin/installboot /usr/sbin/installboot
212         # make -C boot/installboot clean install
213         # make -C usr.sbin/installboot clean install
214         Then 'make clean world' as usual.
216 20120119:
217         Follow up to previous entry. The same problem also exists for
218         the man pages.
220         Do this BEFORE a 'make world':
221         # rm /usr/man/man1/rm.1
222         # cp /usr/man/man1/cp.1 /usr/man/man1/rm.1
223         Then 'make clean world' as usual.
225 20120112:
226         Replace our native rm and rmdir with NetBSD version.
228         As our native rm is a hard link to cp, simply overwriting rm with
229         the new version would cause mv, cp, ln, etc to stop working.
231         Do this BEFORE a 'make world':
232         # rm /bin/rm
233         # cp /bin/cp /bin/rm
234         Then 'make clean world' as usual.
236 20111222:
237         This update requires /etc/fstab having the new format.
239         The latest mkfs.mfs and fsck.mfs must be installed in
240         /sbin when building a new image, and booting with the new mfs,
241         and the new system rc script must be installed that invokes the new
242         fsck driver.
244         Do this BEFORE a 'make world':
245         # make clean etcfiles etcforce includes libraries
246         # make -C commands/mkfs.mfs clean install
247         # make -C commands/fsck.mfs clean install
248         Then 'make clean world' as usual.
250 20111212:
251         After a successful "make world", issue the following commands:
252         # cd /dev
253         # MAKEDEV fbd
255 20111109:
256         Switch to NetBSD passwd system.
258         You have to bootstrap pwd_mkdb:
259         # make clean includes elf-libraries
260         # make -C usr.sbin/pwd_mkdb install
262         Now build world.  WARNING: this will blind your system to
263         /etc/shadow, making current user accounts vanish. Updating the
264         group file is necessary to add a 'users' group so the new stock
265         useradd will work.
267         # make clean world
268         # cp etc/group /etc/group
270         The new shadow file is /etc/master.passwd.  Add your old user
271         accounts back with useradd(8), groups with groupadd(8), and
272         set a root pw with passwd(1) if you want.  Use vipw(8) to edit
273         /etc/master.passwd if you want. See useradd(8) to get started
274         with the new pw format. Test your new system now by logging in.
276         Once you're satisfied your new system works, remove the old
277         adduser, and rely exclusively on the new useradd and
278         master.passwd.
279         # rm /usr/bin/adduser
280         # mv /etc/shadow /etc/shadow.orig
282         pwdauth is updated so that current binaries (e.g. sshd) will
283         work with the new pw db.
285         By default your new users are in the 'users' group. Add yourself
286         to the 'operator' group if you want to be able to su without
287         typing in the password.
289 20111109:
290         fstab format change. /etc/rc reads both formats for a while.
291         Please convert your /etc/fstab to the new format though as
292         the system will assume the new format in the future.
294         A helper script is in etc/. Example:
295         # sh etc/newfstab.sh /etc/fstab >newfstab
296         (Don't redirect to /etc/fstab directly as the shell will
297         truncate it before it can be read.)
299 20110928:
300         Update your /usr/etc/daily and /etc/man.conf if you
301         want to fully enjoy the manpage fixes.
303 20110817:
304         To use the new asynchronous version of VFS do:
305         # BUILDAVFS=yes make cleandepend world
307         To switch back to the normal VFS do:
308         # make cleandepend world
310         By default the old VFS and PFS are built and included in the boot
311         image. AVFS is a work in progress and not yet mature. Use at your own
312         risk.
313 20110722:
314         To install the new mkdep:
315         # cp /usr/bin/mkdep /usr/bin/ackmkdep
316         # make elf-libraries
317         # cd usr.bin/mkdep
318         # touch findcc.d mkdep.d .depend
319         # make install
321 20110716:
322         To install libterminfo and terminfo database, you need 
323         the new stat:
324         # cd /usr/src/usr.bin/stat
325         # make clean install
327         You must create a directory /usr/share/terminfo for terminfo database
328         to be installed. 
329         # make -C etc install
331         Then make clean world as normal.
333 20110708
334         * VFS and installed MFSes must be in sync before and after this change *
336         You must update the GNU headers.
337         # cd /usr/src
338         # make gnu-includes
340         You must rebuild both MFS and VFS (including those one in the image).
341         Either make world or do the following:
342         # cd /usr/src/servers/mfs
343         # make install
344         # cd /usr/src/servers/vfs
345         # make install
346         # cd /usr/src/tools
347         # make hdboot
348         # shutdown -r now
350 20110701:
351         # rm -rf /usr/include /usr/netbsd
352         # make etcfiles includes cleandepend depend gnu-includes
354         DOWNGRADING:
355           Important: this automatically updates your /usr/lib/descr,
356           something you will have to revert manually if you
357           want to go back a revision! Previous to this
358           revision, you do this by:
359           # cp commands/acd/acd.descr /usr/lib/descr
360           Repeating the above commands to make sure your /usr/include
361           is re-acked is probably a good idea too for going back revisions.
363         This change moves 
364                 1. /usr/include to /usr/include.ack
365                 2. /usr/netbsd/include to /usr/include
367         Reduce compiler cases to only two:
368                 1. ack, a.out, minix headers (moved to /usr/include.ack),
369                    minix libc
370                 2. gcc/clang, elf, netbsd headers (moved to /usr/include),
371                    netbsd libc (moved to /usr/lib)
373         So this obsoletes the /usr/netbsd hierarchy.
375         There are no specific UPDATING instructions, but you should know
376         that starting with this version, gcc/clang use the netbsd libc and
377         headers system exclusively, and those files are in the standard
378         locations now. It's the first step to switching completely and
379         simplifying building.
381 20110629:
382         Rebuild m4:
383         make -C usr.bin/m4 install
385 20110629:
386         You must install clang. By default, it is used to build the
387         elf libraries and some userland utilities.
389 20110628:
390         Since buildworld will also build the elf-libraries, you
391         must follow the process in
392         http://wiki.minix3.org/en/UsersGuide/ELFSwitch
394 20110624:
395         (Next release bumped to MINIX 3.2.0.)
396         ELF support in the base system. /usr/lib libraries
397         will be in ELF format once you upgrade.
398         These were know as 'gcc format', but now more properly refered
399         to as 'elf format,' as they are shared between gcc and clang.
400         To start producing ELF, please see:
401         http://wiki.minix3.org/en/UsersGuide/ELFSwitch
403         To create the /usr/netbsd hierarchy:
404         # cd /usr/src
405         # umount /proc
406         # make etcfiles
407         # mount -e -t procfs none /proc
409 20110225:
410         Create ddekit include dirs:
411         mkdir -p /usr/include/ddekit/minix
413 20100921:
414         gcc format libraries are created in /usr/lib now, 
415         so throw out /usr/gnu/lib/ if you want to make sure you
416         don't pick up the old ones.
417         (with pkgsrc and this, all of /usr/gnu is obsolete now.)
419 20100914:
420         mkdir /proc
421         chmod 555 /proc
423 20100827:
424         From now on, the rc scripts, recovery scripts and system.conf in /etc
425         and /usr/etc are updated automatically by make world. If you want to
426         change them, do so in the source tree. If you make changes to your
427         settings in /etc and /usr/etc, merge them into the the source tree
428         before issuing a make world.
430 20100805:
431         mkfs and fsck have been renamed to mkfs.mfs and fsck.mfs, respectively.
432         Moreover, they have been moved to /sbin, which is by default not in
433         PATH. Edit your .ashrc (or equivalent) to also include /sbin in PATH.
434         Also, first issue a 'make commands' before building world.
436 20100802:
437         /usr/src/etc/system.conf updated to include ext2 file server: copy it
438         (or merge it) to /etc/system.conf.
440 20100719:
441         If you installed using a 3.1.6 image (or earlier) and haven't updated 
442         the boot monitor since r6246 you need to do so now:
443         cd /usr/src/boot; make install; sh updateboot.sh
445 20100714:
446         mknod /dev/uds c 18 0
447         chmod 666 /dev/uds
449 20100713:
450         /usr/src/etc/rc updated: copy it (or merge it) to /etc/rc.
451         /usr/src/etc/system.conf updated to include boot sys services: copy
452         it (or merge it) to /etc/system.conf.
453         *** WARNING ***: this change breaks binary compatibility with
454         old images. Use only newly compiled images (make clean world
455         the first time) or download and install the latest ISO.
456 20100705:
457         /usr/src/etc/usr/rc updated: copy it (or merge it) to /usr/etc/rc.
458         /usr/src/etc/rc updated: copy it (or merge it) to /etc/rc.
459         Perform some cleanup (optional):
460         # rm -f /sbin/tty /sbin/log
461 20100630:
462         protocol change between service and rs: be sure to compile commands
463         together with the system image and don't use the new userspace with
464         an old image (or vice versa); it is recommended to replace
465         /boot/image_big with the newly compiled image to keep option 1 in the
466         boot menu working.
467 20100625:
468         /etc/mk has been moved to /usr/share/mk. You will need to
469         create /usr/share/mk manually.
470         # cp -r /usr/src/share/mk /usr/share/
471         # cd /usr/src; make -m /usr/share/mk world
472 20100515:
473         /usr/src/etc/usr/rc updated: copy it (or merge it) to /usr/etc/rc.
474         /etc/inet.conf is now line-based; if you have hand-edited this file
475         before, then make sure that you do not have configurations in there
476         that span multiple lines.
477 20100512:
478         yacc and lex updated
479         # make includes
480         # cd commands/yacc
481         # make depend all install
482         # cd commands/lex
483         # LEX=flex make depend all install
484 20100506:
485         /usr/src/etc/usr/rc updated: copy it (or merge it) to /usr/etc/rc.
486 20100410:
487         /usr/src/etc/usr/rc updated: copy it (or merge it) to /usr/etc/rc.
488         /usr/src/etc/rc updated: copy it (or merge it) to /etc/rc.
489 20100408:
490         /usr/src/etc/usr/rc updated: copy it (or merge it) to /usr/etc/rc.
491 20100318:
492         Gas2ack updates: Run 'make install' in commands/i386/gas2ack
493 20100317:
494         /usr/src/etc/system.conf updated to ignore default kernel calls: copy
495         it (or merge it) to /etc/system.conf.
496         The hello driver (/dev/hello) added to the distribution:
497         # cd /usr/src/commands/scripts && make clean install
498         # cd /dev && MAKEDEV hello
499 20100316:
500         /usr/man/man9 is required
501         # mkdir /usr/man/man9
502 20100308:
503         Include directory reorganization:
504         # mv /usr/include/ibm /usr/include/i386
505         # ln -s /usr/include/i386 /usr/include/machine
506         Install(1) updates:
507         # cd commands/simple && make /bin/install
508 20100303:
509         Gas2ack updates: Run 'make install' in commands/i386/gas2ack
510 20100215:
511         Make(1) has been replaced: Run 'make install' in commands/make
512         Mkdep updates: Copy commands/scripts/mkdep.sh to /usr/bin/mkdep
513         Make(1) needs mkfiles: Copy files in etc/mk to /etc/mk
514         ACK update: Copy commands/i386/acd.descr to /usr/lib/descr
515         End.a renamed:
516            -Copy /usr/lib/i86/end.a to /usr/lib/i86/libend.a
517            -Copy /usr/lib/i386/end.a to /usr/lib/i386/libend.a
518            -Copy /usr/gnu/lib/end.a to /usr/gnu/lib/libend.a
519         Asmconv updates: Run 'make install' in commands/i386/asmconv
520 20091212:
521         /etc/drivers.conf has been renamed to /etc/system.conf.
522         user "service" has been added to password file /etc/passwd.
523 20091006 (r5422):
524         OSS requires an improved make to be compiled; run "make install"
525         in /usr/src/commands/make before running "make world".
526 20070212 (r2751):
527         mkfs needs more memory to make an image; chmem it or do
528         # touch mkfs.c ; make /usr/bin/mkfs
529         in /usr/src/commands/simple.
530 20070118:
531         drivers.conf has been updated to include an ACL for mfs. it has
532         to be installed before rebooting after an update of the mount command.
533 20061222:
534         The archictecture-dependent/-independent split needs ARCH=<arch>
535         in /etc/make.conf, included by some Makefiles and sourced by
536         some shell scripts. To install it, type 'make install' in
537         src/etc, or simply copy the file over.
538 20061222:
539         Install binaries in the right order because the new readdir
540         implementation and the new mount program are incompatible
541         with older kernels and the new kernels require the new mount.
542         # cd /usr/src
543         # make includes
544         # make libraries
545         # make cmds
546         # make depend
547         # cd /usr/src/tools
548         # make hdboot
549         # make install
550         # cd ..
551         # make install
552         Installing fails for boot. Reboot the system
553         # reboot -x 'unset image; boot'
554         Now install everything
555         # cd /usr/src
556         # make install
557 20060818:
558         You need flex in your $PATH, which has become part of the base
559         system. This needs bigger binaries.
560         If you don't have flex yet, you can compile it first by doing:
561         # cp /usr/src/etc/binary_sizes* /etc
562         # binsizes big
563         # cd /usr/src/commands/flex-2.5.4
564         # sh build