This file is http://www.cs.bham.ac.uk/research/poplog/sysdoc/rebuilding-corepop REBUILDING COREPOP Aaron Sloman 19 Aug 2002; Modified 8 Jun 2012 CONTENTS - (Use g to access required sections) -- Introduction -- Find an executable that works, to use as corepop temporarily -- Rebuild poplink.psv (temporarily) and set up corepop -- Use pglink to create a "safe" (reduced) newpop11 -- Make it the new corepop and rebuild system images -- Set up corepop and links to popc poplibr poplink -- Rebuilding saved images -- Introduction ------------------------------------------------------- If you have an executable file of some sort, whether it is basepop11, corepop, but you cannot get things to work with the full pop11 system (basepop11 +startup) you may need to rebuild the basic poplog system executable (corepop), then the tools for re-linking, and then the basic user executable (basepop11) then the saved images built on top of that. This file describes the main steps. However, a shell script is available to perform the tasks described here. It can be found in http://www.cs.bham.ac.uk/research/poplog/tools/relinking.linux.poplog It was designed for and tested on linux poplog. However it should also work on other linux/unix systems. If it works, you need not read the rest of this file. Here are the main steps. All of these commands should be given in the $popsys directory: cd $popsys -- Find an executable that works, to use as corepop temporarily ----- You should find that the corepop file works: try running it. If it does not work, you may find that basepop11 works: try running that. If neither works, try running poplink_cmnd to create an executable, newpop11 that works. If you try running poplink_cmnd and it doesn't find the files referred to this may be because you have installed your poplog root directory (i.e. $usepop) in a different location from that used when the poplink_cmnd file was created. In that case, edit the file to use the correct path names. (It's an automatically generated file, created by code in $popsrc/syscomp/ ) If you cannot get a version of pop11 that works you cannot proceed. If corepop does not work but basepop11 does, do, this, using "cp" NOT "mv" to preserve links: cp basepop11 corepop (Likewise if you use a newly linked newpop11 instead of basepop11.) Where available, both corepop and basepop11 should work. However on some older poplog distributions there will be a corepop file, which you cannot use at this stage. So you will have to use basepop11 or a newly linked newpop11, as above. -- Rebuild poplink.psv (temporarily) and set up corepop --------------- Now remove and then rebuild poplink.psv rm poplink.psv $popsrc/mksyscomp poplink This should have created poplink.psv, as you can check: ls -l poplink.psv However in order to run it you will need a file called corepop. Make sure that poplink is a link to corepop. If in doubt do: rm poplink ln -s corepop poplink -- Use pglink to create a "safe" (reduced) newpop11 ------------------- You should now be able to run pglink. First use it to link a minimal "safe" pop11 which can be used to rebuild the other system-building saved images. pglink -safe This will create some poplink_* files, which you can ignore, a file rsvpop11 which you can delete (the pglink script should be changed to accept the "-norsv" flag) and a newpop11 file which is the one you want. First delete the unwanted file. rm rsvpop11 Test newpop11. It should start up with the usual Sussex poplog notice and give you the colon prompt. Check that it works, but suppress attempts to read any init.p files, which could cause errors or warning messages, because this is a reduced (safe) pop11. newpop11 %noinit It should print out something like this, ending with the pop-11 prompt, a colon: Sussex Poplog (Version 15.53 Sun Jan 30 20:07:57 GMT 2000) Copyright (c) 1982-1999 University of Sussex. All rights reserved. Setpop : test it: 999*9 => ** 8991 Leave it with CTRL-D. -- Make it the new corepop and rebuild system images ---------------- Now make newpop11 the new corepop file cp newpop11 corepop Now, using this "safe" corepop, rebuild all the system-building saved images, after deleting the old ones (including the recently built poplink.psv which is no longer needed): rm *.psv $popsrc/mksyscomp poplink poplibr popc $popsrc/mknewpop Check the outcome: ls -l *.psv You should now have these saved images: newpop.psv popc.psv poplibr.psv poplink.psv used by these scripts: $popsrc/newpop $popsys/pgcomp $popsys/pglibr $popsys/pglink -- Set up corepop and links to popc poplibr poplink ------------------- If you wish you can reduce the size of corepop strip corepop Now set up the final set of links needed to corepop (this may be redundant, depending on the contents of your $popsys directory): rm poplink poplibr popc ln -s corepop poplink ln -s corepop poplibr ln -s corepop popc -- Rebuilding saved images -------------------------------------------- After doing all the above you will need to rebuild system saved images. There is a shell script for this in $usepop/pop/com/makeimages After doing that you will have to rebuild any saved images you have created in the $poplocalbin library. You may have acquired such scripts separately from the main poplog system, in which case you will probably have them in $poplocal/local/com For more information see the file http://www.cs.bham.ac.uk/research/poplog/sysdoc/rebuilding