-
Notifications
You must be signed in to change notification settings - Fork 7
building a cross compile NetBSD toolchain Notes
Chris Jones edited this page Feb 21, 2019
·
4 revisions
- Building a cross compile toolchain for MIPS BE
- Useful packages to install on the host system
Debian Lennybefore trying to build the NetBSD tools - Random Notes
- Useful Links
- TODOs
./build.sh -a mipseb -m evbmips -j8 tools ./build.sh -a mipseb -m evbmips -j8 distribution
Update January 8 2018
Making progress πΈ
amd64 tools for netbsd4apt-get install build-essential flex libncurses-dev ncurses-base zlib1g-dev zlib1g git-core
Giving credit π³ where credit is due.
-
download from the NetBSD archives.
-
extract them all
A little bash magic π©
for file in *.tgz do tar xfz $file done
cd usr/src
The below example is for building a toolchain that will compile binaries for ARM little endian.
./build.sh -U -u -a arm -m evbarm -D ../../evbarm/dest/ -O ../../evbarm/obj/ -R ../../evbarm/release/ -T ../../evbarm/tools/ tools
Some useful tidbits about the above command,
- -U Set MKUNPRIVED=yes.
- -u Set MKUPDATE=yes.
- -a arch Set the value of MACHINE_ARCH to arch.
ie, -a arm
- -m Set the value of MACHINE to mach. All cross builds require -m
- -D dest Set the value of DESTDIR to dest.
- -O Create an appropriate transform macro for MAKEOBJDIR that will place the built object files under obj.
- -R Set the value of RELEASEDIR to rel.
- -T tools Set the value of TOOLDIR to tools.
Once the tools have been built, the userspace can be built with the below command.
./build.sh -U -u -a arm -m evbarm -D ../../evbarm/dest/ -O ../../evbarm/obj/ -R ../../evbarm/release/ -T ../../evbarm/tools/ release
- Finally, copy all the archives and object files from
evbarm/dest/usr/lib/
to
evbarm/tools/arm--netbsdelf/lib/
To build the NetBSD userland libraries / components for Big Endian ARM
./build.sh -U -u -m evbarm -a armeb release
To install debootstrap on a Debian system.
apt-get install debootstrap
To search for a particular package on the apt-get registry
apt-cache search <package_name>
Ex
apt-cache search debootstrap
To debootstrap a lenny system
- debootstrap --arch amd64 lenny /opt/chroot-lenny http://snapshot.debian.org/archive/debian/20070730T000000Z/ - debootstrap --variant=buildd --arch amd64 lenny /opt/chroot/lenny http://archive.debian.org/debian/ - debootstrap --no-check-gpg lenny /opt/chroot/lenny http://archive.debian.org/debian
+ debootstrap --variant=buildd --no-check-gpg lenny /opt/chroot/lenny http://archive.debian.org/debianMake sure to add
--variant=builddor else tools such asapt-getwon't be installed.
-
Running ARM in Big Endian Mode
- To properly build a NetBSD binary using the NetBSD infrastructure on Linux host, see π
- The FreeBSD manual page for crunchgen, see π
- Building a Cross Compile toolchain in GNU/Linux for FreeBSD
- Crosscompiling NetBSD with
build.sh- Official
-
(ει€) Add table of contents this markdown document (ει€γγγΎγ§)
- AirPort Device Boot Videos
- Airport Device Disassemblies
- AirPort Device Notes
- AirPort Device Resources