Open ghost opened 2 years ago
I give up... on mounting...
so the limitation of hfs is that you can not create the /dev/* for chroot (why can you not use the original???) i can create it in /mnt/Memory which is the tmpfs created by the airport (Last Airport Extreme 7.9.1 firmware) by copying /dev from the sets to it and run ./MAKEDEV all... going to investigate this down the rabbit hole...
Also... if you have any binaries alredy compiled could you upload them?
rsyncd, bash...
what binaries are you looking for?
Hi @Tristan79 ,
My USB devices I have created using netbsd ffs2 (if I remember correctly with newfs) and mounted normally with 'mount /dev/sd0e /opt', for instance... (EDIT: by the way, the partition sys id I`ve used was 169 - NetBSD, and not 168)
I guess that it used mount_ffs to do so, but really never had issues with it. My guess is that you are using a different, perhaps older ffs version to create the filesystem
Have not tried using mixing HFS+ on the disk, but it seems best, I guess I´ll give it a try.
I am replaying all my steps to rebuild the packages, my goal is to cross compile them. Compiling on the airport take ages...
I had the pkg files for bash2, rsync, and a couple more apps. Lost them some time.
At this time I have the full netbsd 7.2 standard binaries, but none of the pkgsrc. It is not much, but it has the toolchain and gcc, and some basic utils, such as samba, sshd... I will upload these binaries here.
And, as soon as I can resume, recompile the packages I had... rsync is a must for me, as it is bash... I will up them too :-D
best, Guilherme
@ipatch
it started with wanting to run smnpd...since it was missing. definitely want bash rsync. git would be nice... basic utils as wget curl nano busybox ... working fdisk and make_fss ;) python nginx perl php and i want to try nfs... nfsd? or at least mount nfs.
Never got snmpd to compile, it needs perl to compile, and it fails as does python. They fail because of the lack of strace system calls and static builds. By the way, HFS in this device cannot have mount points. My guess is that it is the same limitation that does not allow to have dev files. The best would be if we could replace the kernel (get the second CPU core running and dynamic library support!) or install Linux, but I lack spare units to try it (and the time to do it).
@gchehab
I thought is was 169 (A9)... but when that wasn't working i tried the others. What I gathered the fs are the same... (ffs or ffs2) only the ids are different.
...
I used netbsd 9 to make the filesystem maybe its newer instead of older. Maybe its the usb drive too new? Maybe the mixed partitions? will investigate.
Does your ffs2 partition show up in dmesg as a /dev/dk? driver? Maybe that the problem... that the hfs partition, see in the log in the first message, created a /dev/dk? entries and keeps the sd0e parition from accessing. While when you have only one partition no /dev/dk? ever are created thus not busy.... could be it. I have a old usb stick I am going to test it on.
...
crosscompile, yes. I was discourge by the guide to look that way. But going to look into that...
...
ow yes please the 7.2!
netbsd have a tendacy to remove old released so I got only the netbsd8 binaries... while searching for the 7.2 ones... I zipped the sets here... https://github.com/Tristan79/netbsd8airportsets/tree/main I can use find/awk/tar/grep from it...
i think it is too new... I moved the dev in my sets to dev2 and the root of the sets is /Volumes/dk0/test and run the following... so now i have a /test/dev with devices and a /test/ with all the files... but it does not work.
mkdir /Volumes/dk0/test/dev
mount -o -s5M -t tmpfs tmpfs /Volumes/dk0/test/dev
cp -r /Volumes/dk0/test/dev2/* /Volumes/dk0/test/dev
cd /Volumes/dk0/test/dev
./MAKEDEV all
ln -s /var/run/log log
/Volumes/dk0/test/usr/sbin/chroot /Volumes/dk0/test/ /bin/sh
is does not matter if i run the export of path etc from the environment file.. before or after or both... or not but when I run like ls or cc1 it then crashes after finishing the shell sh with 100% cpu usage.... it could be either the /dev/ in tmpfs and not on the ffs partition or netbsd 8 it too new for this old kernel.
so yes a copy of the toolchain would be much preferred!
@gchehab
strace a kernel option? or as I suspect when googling you need perl to run strace and perl would not compile?
...
when you chroot... does that means you really need static builds for the sets? you are in a chroot environment should a recompiled of the sets non static work? thus enabling more compile options?
i assume the partition is always mounted where you chroot to so you can chroot when running it, not only for compile.
...
i can mount and unmount the hfs no problem. all the /dev/dk? mentioned in the dmesg are mountable... that what i suspect, no hfs partition no /dev/dk? so usb drive is not busy. if that not what you mean, i can mount tmpfs on /dev/ (see above) which is on a hfs filesystem. I can not mount /dev directly.... that gives an error. (and why the bummer ffs did not work). maybe possible to have a / tmpfs with mounted /dev/dk?/bin to /bin on the tmpfs, etc and then mount the original /dev into it... maybe...
...
i saw a youtube clip that even with a booted kernel you could give control to a new kernel and run from there, this was under linux. but... kernel compile on netbsd is on this moment out of my league. :-) but i am learning slooowwly :) ...just as after almost a decade I discovered for bash fzf and autojump.
...
netbsd7.2 and any other binaries would be much appreciated.
and if you could let me know if you have a /dev/dk? or not (see dmesg). in the mean time, I am going to try one partition on an old usb drive!
Actually, by strace I meant DTRACE, my bad. As you can see I was not able to build binaries with it, my guess some issue with the static building.
Anyway, the kernel Apple put in the airport does not have support for dynamic loading, so even chrooted it can not load libraries dynamically. As for the user mode kernel, I am afraid that it does not support it, I would guess that maybe newer Netbsd support it, but again, its support must be included in the host kernel.
The ffs filesystems are not labeled on the airport as dk* devices, to mount you have to use their actual partition names /dev/sd0[a,e,f,...]. Probably is were you stuck.
To create mine last USB drive, I had create the hfsplus on a linux, then the ffs on the airport. Quite trick... We I used an external USB harddrive it was much easier. I gues that pendrive support is bad also on the airport.
I do not think that NetBsd precompiled binaries will work, they are dynamic loaded... Haven't found any static builds ready...
ok static it is! ... well, sd0e mounting was first thing what I tried, and tried all the oters sd0[a-z] nope... i was thinking that the dk0 from the other partition was keeping it hostage with device busy.
going to experiment on it tonight... with just having one ffs partition and no hfs. and trying to create the ffs partition using the airport extreme (or maybe an older airport express) and changing usb sticks (to usb2)... don't think the usb stick is the problem since it read and write normal with fat32 fat16 or hfsplus... or maybe it is?! i have no spare ssd available at the moment so no testing that. ... netbsd 7.2 is running without crashing!!! i can run a command in the chroot environment and it will not crash after the command is finished....netbsd 8.0 is probably too new or some path is incorrect or... ...
i hope the pkgsrc is not too new also... i downloaded the stable tar but... i tried to make a package with 7.2 but... no gcc
checking for arm--netbsdelf-gcc... gcc
checking whether the C compiler works... no
Anyway i found out that cvs -q -z2 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -r pkgsrc-2019Q3 -P pkgsrc
checks out and older version... (also seems /usr/pkgsrc in the newer version had to be located at /pkgsrc)
also have no resolver in the chroot environment. while internet is working ok without chroot.
# cd /pkgsrc/net/zsync
# make
=> Bootstrap dependency digest>=20211023: NOT found
=> Verifying reinstall for ../../pkgtools/digest
===> Installing dependencies for digest-20220214
=> Tool dependency cwrappers>=20150314: NOT found
=> Verifying reinstall for ../../pkgtools/cwrappers
===> Skipping vulnerability checks.
WARNING: No /usr/pkg/pkgdb/pkg-vulnerabilities file found.
WARNING: To fix run: `/usr/sbin/pkg_admin -K /usr/pkg/pkgdb fetch-pkg-vulnerabilities'.
===> Configuring for cwrappers-20220403
=> Configuring and building libnbcompat
checking build system type... arm-unknown-netbsdelf6.0
checking host system type... arm--netbsdelf
checking for arm--netbsdelf-gcc... gcc
checking whether the C compiler works... no
configure: error: in `/pkgsrc/pkgtools/cwrappers/work/libnbcompat':
configure: error: C compiler cannot create executables
See `config.log' for more details
*** Error code 77
Stop.
make[3]: stopped in /pkgsrc/pkgtools/cwrappers
*** Error code 1
Stop.
make[2]: stopped in /pkgsrc/pkgtools/cwrappers
*** Error code 1
Stop.
make[1]: stopped in /pkgsrc/pkgtools/digest
*** Error code 1
Stop.
make: stopped in /pkgsrc/net/zsync
# env
CPUFLAGS=-mfloat-abi=hard -mfpu=vfp3 -march=armv6zk -mtune=arm1176jzf-s
LDSTATIC=-static
ALLOW_VULNERABLE_PACKAGES=yes
PWD=/pkgsrc/net/zsync
LANG=en_US.UTF-8
MAIL=/var/mail/root
HOME=/
LC_ALL=
PATH=/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/libexec:/usr/pkg/sbin:/usr/pkg/bin:/usr/local/sbin:/usr/local/bin
MKPICINSTALL=no
CXXFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
SSH_CONNECTION=10.0.0.3 50402 10.0.100.3 22
SSH_TTY=/dev/ttyp0
TERM=xterm-256color
MKDTRACE=no
OLDPWD=/
USER=root
CFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
HOSTNAME=zolder
LC_CTYPE=en_US.UTF-8
TZ=:/etc/localtime
SSH_CLIENT=10.0.0.3 50402 22
LIBRARY_PATH=/lib:/usr/lib
MKCTF=no
MKPIC=no
LOGNAME=root
MAKEVERBOSE=2
SHELL=/bin/sh
CPPFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
C_INCLUDE_PATH=/usr/include/
CC1=/usr/libexec/cc1
LDFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
# df -h
Filesystem Size Used Avail %Cap Mounted on
tmpfs 5.0M 416K 4.6M 8% /dev
/dev/dk0 51G 13G 38G 25% /
Anyway lots of things to try tonight! Many thanks for the sets! Keep u informed
For the disk part here I am attachin my pendrive disklabel and mount bellow. It took me a lot of tries to make it work. For some reason the hfs does not get a dk* label anymore, Also, for HFS use the specific commands mount -t hfs and fsck_hfs. They are not auto detected as it is in Linux
Netbsd 7.2 was the most recent I manage to run without major hazzles. Some diskutils did not work well (disklabel, for instance, so, use the native one). But I guess you can try samba (must work) and NFS (may work, as it relies on some kernel configuration for the RPC part, but my guess is that it is there),
When I got rsync to run, it was with a current version of pkgsrc. I am doing all over again, but I am trying to use the CVS copy so it can be easily updated -- still cloning... Never tried zsync.
Some packages, I had to edit the pkg configuration files to adjust static build, and a few ones had to be built with gmake (must compile it, also).
This cwrappers error I remember well, I got it too... See this in the error log: 'CC1=/usr/libexec/cc1', your cc1 is not there... You can build it chrooted or change the variable to point it to your CC1 real path (it depends where you mounted your root).
airport# /sbin/disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: USB DISK 2.0
label: fictitious
flags: removable
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 255
sectors/cylinder: 8160
cylinders: 3711
total sectors: 30283008
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # microseconds
track-to-track seek: 0 # microseconds
drivedata: 0
6 partitions:
# size offset fstype [fsize bsize cpg/sgs]
c: 30283008 0 unused 0 0 # (Cyl. 0 - 3711*)
e: 8390655 0 4.2BSD 0 0 0 # (Cyl. 0 - 1028*)
f: 21892352 8390656 HFS # (Cyl. 1028*- 3711*)
airport# mount
/dev/md0a on / type ffs (noatime, nocoredump, nodevmtime, synchronous, local)
/dev/flash2a on /mnt/Flash type ffs (noatime, nocoredump, nodevmtime, synchronous, local)
tmpfs on /mnt/Memory type tmpfs (local)
/dev/sd0e on /opt type ffs (local)
/dev/sd0f on /opt/usr type hfs (local)
/dev/dk2 on /Volumes/dk2 type hfs (local)
how do you enable dns in the chroot environment. I can ping ip addresses but no dns?
also some usefull code below...
to run a chroot environment with all the dev on a hfs partition using a tmpfs.
note change /Volumes/dk0/test to your own netbsd unpacked sets folder.
setup a usb stick with an hfs partition with decompressed sets to /Volumes/dk0/test in the sets folder /Volumes/dk0/test run
mv /dev /dev2
mkdir /dev
script to launch chroot environment
#!/bin/sh
echo "[`date`] Generating tmpfs /dev"
mount -o -s2M -t tmpfs tmpfs /Volumes/dk0/test/dev
cp -r /Volumes/dk0/test/dev2/* /Volumes/dk0/test/dev 2> /dev/null
cd /Volumes/dk0/test/dev
./MAKEDEV all
cd $OLDPWD
ln -s /var/run/log /Volumes/dk0/test/dev/log
echo "[`date`] chroot..."
chroot /Volumes/dk0/test /bin/sh
echo "[`date`] Unmounting tmpfs"
umount /Volumes/dk0/test/dev
save as code.sh and
chmod +x code.sh
environment
with a normal prompt which tells your current folder...
export LANG="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_ALL=""
export CC1=/Volumes/dk0/test/usr/libexec/cc1
export C_INCLUDE_PATH=/Volumes/dk0/test/usr/include/
export LIBRARY_PATH=/Volumes/dk0/test/lib:/Volumes/dk0/test/dk2/root/usr/lib
export CPUFLAGS="-mfloat-abi=hard -mfpu=vfp3 -march=armv6zk -mtune=arm1176jzf-s"
export CFLAGS="-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs"
export CPPFLAGS="-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs"
export CXXFLAGS="-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs"
export LDFLAGS="-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs"
export LDSTATIC='-static'
export ALLOW_VULNERABLE_PACKAGES=yes
export PATH=$PATH:/Volumes/dk0/.airport:/Volumes/dk0/test/usr/local/bin:/Volumes/dk0/test/usr/local/sbin:/Volumes/dk0/test/sbin:/Volumes/dk0/test/bin:/Volumes/dk0/test/usr/sbin:/Volumes/dk0/test/usr/bin:/Volumes/dk0/test/usr/libexec:/usr/pkg/sbin:/Volumes/dk0/test/usr/pkg/bin:/usr/local/sbin:/usr/local/bin
export MAKEVERBOSE=2
export MKPIC=no
export MKPICINSTALL=no
export MKDTRACE=no
export MKCTF=no
alias h='fc -l 1 | sort | uniq;'
alias chr='/Volumes/dk0/test/usr/sbin/chroot /Volumes/dk0/test /bin/sh'
alias fix='find /Volumes/dk0/test -user 4294967295 -exec chown root:wheel {} \;'
alias sensors=envstat
wifi()
{
/sbin/ifconfig wlan0 list sta;
/sbin/ifconfig wlan1 list sta;
/sbin/ifconfig wlan2 list sta;
/sbin/ifconfig wlan3 list sta;
}
SERIAL=`acp -q sySN`
IP=`acp -q laIP`
PS1="$IP $PWD #"
#PS1="$SERIAL $HOSTNAME $PWD #"
cd()
{
command cd "$@"
PS1="$IP $PWD #"
# PS1="$SERIAL $HOSTNAME $PWD #"
}
ext ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar.xz) tar xf $1 ;;
*.tar) tar xf $1 ;;
*.tar.zst) uzstd $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*.deb) ar x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
save as AirPort-environment.txt and run or add to /mnt/Flash/rc.local
cat AirPort-environment.txt >> /.profile
output example
10.0.100.3 /Volumes/dk0/test #ls
.cshrc bin dev2 libdata pkgsrc root test usr
.profile dev etc libexec rescue sbin tmp var
chroot environment
i have no idea how to autostart this... when you chroot (i now copy paste it it in the terminal) when I run code.sh. It also assumes you run the above environment before starting code.sh.
export CC1=/usr/libexec/cc1
export C_INCLUDE_PATH=/usr/include/
export LIBRARY_PATH=/lib:/usr/lib
export PATH=/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/libexec:/usr/pkg/sbin:/usr/pkg/bin:/usr/local/sbin:/usr/local/bin:$PATH
if [ -x /usr/bin/tset ]; then
eval `tset -sQrm 'unknown:?unknown'`
fi
umask 022
case "$-" in *i*)
PS1="${HOSTNAME%%.*}$PS1"
set -o emacs
set -o tabcomplete
;;
esac
alias h='fc -l 1 | sort | uniq;'
alias sensors=envstat
PS1="${HOSTNAME%%.*} $PWD #"
cd()
{
command cd "$@"
PS1="${HOSTNAME%%.*} $PWD #"
}
ext ()
{
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar.xz) tar xf $1 ;;
*.tar) tar xf $1 ;;
*.tar.zst) uzstd $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*.deb) ar x $1 ;;
*) echo "'$1' cannot be extracted via ex()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
zsync was from the compile toolchain wiki page as example. I thought "if they succeed I can too" :-)
random note airport home assistant
cvs -q -z2 -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -r pkgsrc-2019Q3 -P pkgsrc
problem...no source for any package, for some reason as with the sets they remove old packages which is a mayor bummer, they should not delete their old stuff. it destroys a little piece of history of netbsd and the any old devices it runs on to /dev/null 👎 2021Q4 are the oldest packages they have... so it can not download the source of nano or any other package...* furthest I got...* added ip of ftp.netbsd.org into /etc/hosts since no dns in chroot environment
...
...
checking for sha256.h... no
checking sha512.h usability... no
checking sha512.h presence... no
checking for sha512.h... no
checking for MD5Init in -lmd... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating build/pkgconfig/libarchive.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing mkdirs commands
bmake: "/pkgsrc/bootstrap/work/libarchive/Makefile" line 1082: Unknown directive
bmake: "/pkgsrc/bootstrap/work/libarchive/Makefile" line 1140: Need an operator
bmake: "/pkgsrc/bootstrap/work/libarchive/Makefile" line 1404: Need an operator
Variable am__v_lt_ is recursive.
problems encountered...
To use, bootstrap using:
cd pkgsrc/bootstrap/
./bootstrap
build packages, use:
cd pkgsrc/category/package-name
/usr/pkg/bin/bmake install
hmmm... bmake did compile what happens when I switch pkgsrc to current...
random note kloader is the program to load a kernel from a running kernel in netbsd... in the help is stated that the kernel must support it... no idea how to check that.
@ipatch
if you have any compiled binaries of other models or this model or copy of your chroot toolchain. or anything else you can archive because over a decade his is not going to be non reproducible. hopefully it is still now :-)
no source for any package, for some reason as with the sets they remove old packages which is a mayor bummer, they should not delete their old stuff. it destroys a little piece of history of netbsd and the any old devices it runs on to /dev/null 👎
me over netbsd.org
the few airport devices i have all run some variant of netbsd 4.0 i don't have any of the toolchains i built a few years back unfortunately, and never really got past compling anything other than a hello world.
if it were me i just run openwrt on your airport device and be done with it.
I am still up to try compiling a working openwrt ( I am a Linux guy since kernel 0.97....), if I could get my hands on some very cheap spare units... I fear I may brick some devices before getting it right... The 5th gen airport has specs that are near a 1st gen raspberry pi, pretty good for a wifi router. My only device is the main backup server at home, and still a very good wifi router, and I am not ready to scrape it, maybe when its HD breaks...
@ipatch, about the netbsd archives, they are in https://archive.netbsd.org/pub/NetBSD-archive/ ( it has since version 1.0). I would not be amazed if the first versions had native static binaries. I guess the problem is finding a pkgsrc to match it...
@Tristan79, about the DNS, you can copy the /etc/resolv.conf to your root /etc. You will be good to go. If you want the full netbsd experience
If you start the chrooted netbsd rc system, it will read the conf on /etc/defaults/rc.conf (https://man.netbsd.org/rc.conf.5) and create a new one. On my first tryies, I did that to see how it could complete almost all init stuff even chrooted.
About the zsync on the wiki, well, I remember now (I wrote that), it was one of the first packages I've made. As I vaguely recall it was one of the easiest. Never used it though, was a pre-run to rsync.
Maybe I forgot anything on the wiki... Once I get my dev env back online I will revise it -- will try a faster pendrive this week. The one I am using is crashing --- when I got it working I was using an external HD, it runned very smoothly, Once I got all packages I wanted, I moved it all to a pendrive -- without the sources... (bummer)
@gchehab DNS working! typo resolv.conf not resolve.conf... thought it was so "magical" setting or program somewhere else since it was not working... nope type ;) ... added my chroot environment settings in /.profile /root/.profile /etc/profile in the chroot environment as said by sh but no luck... will look into rc.conf. ... but still have the compiled ones on your current running system? rsync binary?
@ipatch The problem with openwrt is how to boot your kernel... without opening it up and soldering (in the end).
. . .
now trying 2021Q4 if that not working I am going to try cross compiling in my vm...
Using the 2019 cvs boostrap. Almost all packages I want to compile require gmake (though the source of the package to compile did not change and can be downloaded without any modification like editor joe, netbsd sources for alot/some of packages seems to be stagnant and what I can read they a shortage of new packages maintainers. which maybe works into our advantage).
Anyway for gmake i tried:
Since 4.2.1 is source is not available anymore. I changed it to 4.3 of the latest pkgsrc (copied the patches over, run bmake mps to recalc the checksums and added SHA1 (make-4.3.tar.gz) = 3c40e5b49b893dbb14f1e2e1f8fe89b7298cc51d because blake verification is not known)...
No luck... (also tried with original patches from 2019 but those got rejected (or my build environment was corrupted due to the heavy mixing))
===> Building for gmake-4.3nb1
Making all in lib
bmake[1]: "/usr/pkgsrc/devel/gmake/work/make-4.3/lib/Makefile" line 1736: Need an operator
bmake[1]: "/usr/pkgsrc/devel/gmake/work/make-4.3/lib/Makefile" line 1781: Need an operator
bmake[1]: "/usr/pkgsrc/devel/gmake/work/make-4.3/lib/Makefile" line 1847: Need an operator
The 7.2 packages are moved to archive/.../source
On https://github.com/ipatch/theairportwiki/wiki/build-a-cross-compile-NetBSD-toolchain-armv6-Notes
This has to be updated...
echo Check if pkg sets are present
mkdir -p netbsd/${RELEASE}/pkgs
for i in gnusrc sharesrc src syssrc xsrc; do
if [ ! -f netbsd/${RELEASE}/pkgs/${i}.tgz ] ; then
echo Downloading ${i}.tgz from http://archive.netbsd.org/pub/NetBSD-archive/NetBSD-${RELEASE}/source/sets
(cd netbsd/${RELEASE}/pkgs && lftp -c "pget http://archive.netbsd.org/pub/NetBSD-archive/NetBSD-${RELEASE}/source/sets/${i}.tgz")
fi
done
Done @Monkeycat-nl, thanks for remind me. Also, I've added a todo to update the process to newer pkgsrc versions. I am rebuilding my steps on this and found a couple of changes.
can confirm 7.2 gets compiled... and runs not stopping as the 8.0 sets I compiled... (the added xsrc is probably not needed).
nice command to run to see the executables on the airport:
find -L / -type f \( -perm -u=x -o -perm -g=x -o -perm -o=x \)
no luck with cross-compiling though... tried to follow
https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/doc/HOWTO-use-crosscompile
but... no luck. I ended up with tools found with a lot of bother but the libthread?.so is wrong file format... so my "kit check" errored out...
netbsd 9.2 with bootstrap... make instead of bmake fails instantly...
I was able to bootstrap and to run bmake successfully without chrooting... When chrooted, you should not need to bootstrap, but has to use make.
Anyway, had to add some new environment vars that I will add to the wiki. Also, it fails because some mk.conf point to binaries hardcoded to /usr/bin, had to make a ugly hack after mounting my USB device in /opt:
for i in `(cd /opt/usr/bin && ls )`; do if [ ! -f /usr/bin/$i ]; then ln -s /opt/usr/bin/$i /usr/bin ; fi; done
My environment has been set as:
ALLOW_VULNERABLE_PACKAGES=yes
CFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
CHECK_FILES=no
CPLUS_INCLUDE_PATH=/usr/include:/opt/usr/include:/usr/pkg/usr/include/:/Volumes/dk2/usr/includC_INCLUDE_PATH=/usr/include:/opt/usr/include:/usr/pkg/usr/include/:/Volumes/dk2/usr/include
CPPFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
CPUFLAGS=-mfloat-abi=hard -mfpu=vfp3 -march=armv6zk -mtune=arm1176jzf-s
CXXFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
LANG=en_US.UTF-8
LC_ALL=
LC_CTYPE=en_US.UTF-8
LDFLAGS=-mno-unaligned-access -fno-use-linker-plugin -static -zmuldefs
LDSTATIC=-static
LIBRARY_PATH=/usr/lib:/opt/usr/lib:/usr/pkg/lib:/Volumes/dk2/usr/lib
MKSOFTFLOAT=no
PATH=/bin:/sbin:/libexec:/usr/bin:/usr/sbin:/usr/libexec:/usr/pkg/sbin:/usr/pkg/bin:/usr/pkg/libexec:/usr/pkg/usr/sbin:/usr/pkg/usr/bin:/usr/pkg/usr/libexec:/usr/pkg/usr/local/sbin:/usr/pkg/usr/local/bin:/usr/pkg/usr/pkg/sbin:/opt/sbin:/opt/bin:/opt/libexec:/opt/usr/sbin:/opt/usr/bin:/opt/usr/libexec:/opt/usr/local/sbin:/opt/usr/local/bin:/opt/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin
PKGSRC_USE_FORTIFY=weak
PKGSRC_USE_MKPIE=no
PKGSRC_USE_MKREPRO=no
PKGSRC_USE_RELRO=partial
PKGSRC_USE_SSP=yes
PKGSRC_USE_STACK_CHECK=no
PKG_DEBUG_LEVEL=2
TZ=:/etc/localtime
Probably isn't the right one yet, but it is a step further...
Now, I am trying to build bash2, however, even explicitly adding the option to static building, it tries to add libtool (that requires dynamic loading). My guess is that newer versions of pkgsrc had deprecated static building in the default mk.conf files.
I guess I manage to configure a good build environment, had to add "USE_BUILTIN.dl=yes" in the mk.conf file, will try to build bash2 again tonight...
Any progress?
Hi @Monkeycat-nl, not yet. Had a major setback (an HD crash) and I am starting over... Quite frustrating... Some issues I had solved are showing up again, but the main issue is the my schedule is quite hard until November... Sorry. I am quite confident that it will work eventually, just had to be able to dedicate more time on the matter...
I am stuck trying to make an usb stick with an hfsplus partition and a ffs partition...
all partitions type Fat16/Fat32/hfsplus mount
partition appleufs (0xab) does will not work because mount_appleufs does not exists mount_ffs on that does also not work... because of the wrong magic number
type 0xa9 (netbsd) 0xa6 0xa5 will also not work. I am always getting always: Device busy...
so what am I doing wrong?
i used linux to partition i used netbsd9 newfs to create the ffs.