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