Upgrade_Compiler
These instructions assume ravenadm has already been updated with the last ports compiler and/or binutils and that the task is to rebuild a fresh set of packages on a supported platform. Obviously this package set includes updated compiler/binutils/toolchain packages.
-
Update ravensource
The ravensource is required because ravensys-gcc is temporarily modified to speed up the process. Also building ravenadm from source may prevent a version warning, potentially having to disable the ncurses option to allow the build
cd <ravensource repo location> git pull
-
Rebuild ravenadm
eval `ravenadm dev jump ravenadm` ravenadm dev buildsheet . save ravenadm force ravenadm
-
Install the latest ravenadm
ravensw add --force /path/to/profile/packages/All/ravenadm-single-standard-<version>.tzst
-
Update conspiracy
ravenadm update-ports
-
Modify ports compiler buildsheet
eval `ravenadm dev jump ravensys-gcc` vi specification
add the following to the CONFIGURE_ARGS list:
--disable-bootstrap --disable-cc1
-
Build the latest ports compiler
ravenadm dev buildsheet . save ravenadm force ravensys-gcc
-
If binutils have been updated, build those as well
ravenadm force ravensys-binutils
-
Package the new toolchain
ravenadm force ravensys-toolchain
-
Make a copy of the current sysroot and toolchain just in case
cd /raven/share cp -a raven raven.backup
-
Replace the current toolchain with the updated one
ravensw remove "ravensys-toolchain-*" (answer yes) ravensw add /var/ravenports/primary/packages/All/ravensys-toolchain-single-standard-5.0.tzst (example)
-
Set SKIPCCRUN in environment
vi ~/.profile (as non-root user)
- add "export SKIPCCRUN=yes" and save (:wq)
- "exit" to log off
- log back as the regular user
- "su" to become root
- "env" to confirm SKIPCCRUN is defined in the environment
-
Create new profile in ravenadm and activate it
ravenadm configure
The purpose of this is to preserve the original packages. Just duplicate the current profile and change the profile directory the packages directory and the compiler ccache directory (if set).
One trick is to bring up /raven/etc/ravenadm/ravenadm.ini in a text editor, copy the profile block and make the adjustments in the editor. Don't forget to activate the new profile, either with "ravenadm configure" or expertly by altering "profile_selected=" line.
-
Create a new ccache directory
This should match the new profile. You may want to copy "ccache.conf" file from the previous profile's ccache directory.
-
Rebuild the toolchain with SKIPCCRUN set
ravenadm force ravensys-binutils ravenadm force ravensys-gcc ravenadm force ravensys-toolchain
-
Remove toolchain
ravensw remove "ravensys-toolchain-*" (answer yes)
-
Install newly-built toolchain
ravensw add /var/ravenports/nextgen/packages/All/ravensys-toolchain-single-standard-5.0.tzst (example)
-
Rename the packages directory of the new profile
mv /var/ravenports/nextgen/packages /var/ravenports/nextgen/packages.1g (example)
-
Recreate the packaged directory
mkdir /var/ravenports/nextgen/packages (example)
-
Remove SKIPCCRUN from environment
From the non-root user:
vi ~/.profile
Comment out the export SKIPCCRUN file and save.
-
Log out and back in again
Log out, then back in as non-root user, then "su" to become root again. Run "env" to verify SKIPCCRUN is no longer set in environment.
-
Rebuild toolchain
ravenadm force ravensys-binutils ravenadm force ravensys-gcc ravenadm force ravensys-toolchain
- Remove toolchain
ravensw remove "ravensys-toolchain-*" (answer yes)
- Install newly-built toolchain
ravensw add /var/ravenports/nextgen/packages/All/ravensys-toolchain-single-standard-5.0.tzst (example)
- Rename the packages directory of the new profile
mv /var/ravenports/nextgen/packages /var/ravenports/nextgen/packages.2g (example)
- Recreate the packaged directory
mkdir /var/ravenports/nextgen/packages (example)
- Remove modifications to ravensys-gcc
eval `ravenadm dev jump ravensys-gcc` git checkout . ravenadm dev buildsheet . save
- Rebuild toolchain
ravenadm force ravensys-binutils ravenadm force ravensys-gcc ravenadm force ravensys-toolchain
- Build ravensys-root
ravenadm build ravensys-root:<variant>
- Remove toolchain
ravensw remove "ravensys-toolchain-*" (answer yes)
- Install newly-built toolchain
ravensw add /var/ravenports/nextgen/packages/All/ravensys-toolchain-5.0.tzst (example)
- Remove system root
ravenadm remove "ravensys-root-*" (answer yes)
- Install newly-built system root
ravensw add /var/ravenports/nextgen/packages/All/ravensys-root-single-netbsd_amd64-3.4.tzst (example)
- Rename the packages directory of the new profile
mv /var/ravenports/nextgen/packages /var/ravenports/nextgen/packages.3g (example)
- Recreate the packaged directory
mkdir /var/ravenports/nextgen/packages (example)
- Build everything
- Upgrade binutils and/or compiler
- Update Scripts/Ravenports_Mk/raven.information.mk
- GCC[X]_POINT
- GCC[X]_SNAPSHOT
- CURRENT_GCC
- CURRENT_GCC_VERSION
- BINUTILS_VERSION
- regenerate conspiracy (to replace raven.information.mk)
- Run Scripts/miscellaneous/full_regen_by_list.sh with gcc.list
- remove bucket_3E/ravensys-toolchain/distfile (should be empty)
- build binutils:ravensys (if necessary)
- regen patches
- fix plist
- build gcc (if necessary)
- update patches (probably not necessary)
- rebuild ravensys-toolchain
- bump version or revisions
- Update Scripts/Ravenports_Mk/raven.information.mk
- Update ravenadm
- go to github repository definitions and update
- compiler_version
- previous_compiler
- binutils_version
- previous_binutils
- ravenadm version
- Tag release
- Update ravenadm port to build new release
- Build ravenadm
- go to github repository definitions and update
- use ravensw(8) to replace ravensys-toolchain with newly built version
- rename profile's package directory and create an empty directory in its place
- clear ccache
- relocate directory
- create new directory in it's place
- copy ccache.conf back to new directory
- delete old cache later
- build ravensys-root:[opsys]
- bump version first
- use ravensw(8) to replace ravensys-root-[opsys] with newly built version
- rename profile's package directory again, and create empty directory in its place
- final toolchain generation
- force-build binutils:ravensys
- force-build gccX
- build ravensys-toolchain
- use ravensw(8) to replace ravensys-toolchain with newly built version
- build-everything
- Update ravenadm
- go to definitions and update
- compiler_version
- previous_compiler
- binutils_version
- previous_binutils
- Also bump version
- Release
- Update ravenadm port to build new release
- set-options to build without ncurses
- build ravenadm (no ncurses)
- go to definitions and update
- Replace ravenadm with new version
- Update Scripts/Ravenports_Mk/raven.information.mk
- GCC[X]_POINT
- GCC[X]_SNAPSHOT
- CURRENT_GCC
- CURRENT_GCC_VERSION
- BINUTILS_VERSION
- Copy raven.information.mk to [conspiracy]/Mk/
- Run Scripts/miscellaneous/full_regen_by_list.sh with gcc.list
- remove bucket_3E/ravensys-toolchain/distfile (should be empty)
- build binutils (if necessary)
- build gcc (if necessary)
- regen patches
- build ravensys-toolchain with SKIPCCRUN=1 in the environment
- update COMPILER_VER DEF
- update GCC_VERSION DEF
- update GCC_BRANCH
- bump version (regen buildsheet)
- replace ravensys-toolchain with newly built version
- rename profile's package directory and create an empty directory in its place
- build ravensys-root:[opsys]
- bump version first
- use ravensw(8) to replace ravensys-root-[opsys] with newly built version
- rename profile's package directory again, and create empty directory in its place
- clear ccache
- relocate directory
- create new directory in it's place
- copy ccache.conf back to new directory
- delete old cache later
- unset SKIPCCRUN if it's in environment
- rebuild binutils
- rebuild gccX
- rebuild ravensys-toolchain
- replace ravensys-toolchain
- rebuild ravensys-root-[opsys]
- replace ravensys-root-[opsys]
- set-options on ravenadm to build with ncurses again (this doesn't work. Remove options file, e.g. rm /var/ravenports/primary/options/ravenadm)
- build everything