2.3 KiB
Importing newer NetBSD sources
This repository contains MINIX 3 code alongside sources periodically imported from NetBSD. The project does not provide an automated tool for updating all NetBSD components at once. The general approach below may be used to bring in a more recent snapshot of NetBSD.
-
Add the official NetBSD repository as a remote and fetch its history:
git remote add netbsd https://github.com/NetBSD/src.git git fetch netbsd -
Choose the NetBSD branch or tag you want to integrate, for example
netbsd-10or a specific release tag, and check it out:git checkout -b netbsd-update netbsd/netbsd-10 # example branch -
Merge the selected NetBSD revision into the MINIX tree. Expect many conflicts that require manual resolution. Use
--allow-unrelated-historiesbecause the two projects started from different repositories.git merge --allow-unrelated-histories netbsd/netbsd-10 -
After resolving conflicts, rebuild the entire system to verify that the merge did not introduce build errors:
./build.sh -j$(nproc) tools buildConsult
docs/UPDATINGfor additional steps that may be required after bringing in new code.
Alternatively, set the NETBSD_BRANCH environment variable and run
releasetools/sync_netbsd.sh to automate these steps:
NETBSD_BRANCH=netbsd-10 releasetools/sync_netbsd.sh
Updating to a new NetBSD snapshot touches a large number of files and may change interfaces used throughout MINIX. Take care to review each conflict and test the result thoroughly before deploying.
Files affected by NetBSD updates
Most directories in this tree originate from NetBSD and will change when syncing to a new snapshot. The following areas are commonly affected:
sys/– kernel sources and platform codelib/,libexec/– system libraries and helper daemonsbin/,sbin/,usr.bin/,usr.sbin/– userland utilitiesinclude/,crypto/,external/– headers and third-party packagestests/,tools/,distrib/– test suite, build tools and release scripts
Only the minix/ subtree and a few minix programs under usr.* are
maintained separately. Interface changes in any imported directory may require
corresponding updates throughout the MINIX-specific code.