<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello!<br><br>I've just replicated the bug via the proot approach. Thank you a lot for your help!<br><br>Maria <br><br><div class="gmail_quote">On April 2, 2020 1:47:32 PM GMT+02:00, Clemens Schrimpe <clemens.schrimpe@gmail.com> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font face="Courier New" class=""><span style="font-size: 12px;" class="">Hallo all -</span></font><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">I built BIRD (1.x and 2.x) for the EdgeRouter platforms(!) myself for many years now and I still do. At first I used a "proot" environment with QEMU on a Ubuntu environment, but I have moved on to compiling it directly on the machines in question a while ago. EdgeRouters (especially the "XG" or "Infinity" types) have more than enough CPU and RAM to do it there, it's just the "local storage" and the way their firmware is updated, which prevents you from "just doing it".</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">The solution is simple, though: Current EdgeOS versions support the USB-Port on those routers and you can just plug in a cheap thumb drive or even a real SSD/HD with a USB-Interface. Format it with ext3/ext4, mount it to /mnt for example, clone the current OS onto it, like so:</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/root.dev/*"} / /mnt/</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">create shadow-mounts for the special kernel filesystems:</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>mount --rbind /dev /mnt/dev<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>mount --rbind /proc /mnt/proc<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span>mount --rbind /sys /mnt/sys</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">and now you can chroot into your development environment:</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>chroot /mnt /bin/bash --login</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">and (bonus track) even start an sshd <i class="">within</i><span style="font-style: normal;" class=""> this environment for easier access later:</span></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>mkdir /var/run/sshd /run/sshd<span class="Apple-tab-span" style="white-space: pre;"> </span><font color="#ff2600" class=""># may fail on either</font></span></font><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>/usr/sbin/sshd -p 222 -o Protocol=2</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">which runs on port 222 now (vs. the "normal" sshd, running on port 22).</span></font></div></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">Packages for 2.x:</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">wget</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">git</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">build-essential</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">autoconf</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">locales-all</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">cscope</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">ncurses-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libssl-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libev-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">liblzo2-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libpam-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">minizip</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">flex</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">bison</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libperl-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libreadline-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libpcre3-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libpcap-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libldap-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libtalloc-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libcap2-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libmemcached-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libjson-c-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libgdbm-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libsqlite3-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libssh-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libssh2-1-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">binutils manuell nachinstallieren! (dpkg -i ...)</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">------</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">Packages for 1.x:</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">autoconf</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">locales-all</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">cscope</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">ncurses-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libssl-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libev-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">liblzo2-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libpam-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">flex</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">bison</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libperl-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libreadline-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libpcre3-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libpcap-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libldap-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libtalloc-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libcap2-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libmemcached-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libgdbm-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libsqlite3-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libssh-dev</span></font></div></div><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">libssh2-1-dev</span></font></div></div></blockquote><div class=""><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes <b class="">everything</b>, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → <i class="">./configure -prefix=/config/opt/bird</i> .</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">This has been working very well for me in a while and I am compiling all sorts of tools all the time within this "Build jail". </span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">Tools needed to start this off (mkfs, rsync, etc.) are either already on the platform or can be installed through the officially supported "apt-get" mechanism.</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">The above was quickly copy&pasted together from what I have on my terminal windows right now and and is surely lacking a step or two along the way, sorry. Please feel free to ask for more detailed instructions if you get stuck somewhere.</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">Greeting,</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Clemens</span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class=""><br class=""></span></font></div><div class=""><font face="Courier New" class=""><span style="font-size: 12px;" class="">PS: If you want to cover the whole EdgeRouter platform you'll need to do this <i class="">twice</i><span style="font-style: normal;" class=""> - once on an ER-Pro/ER-Infinity and once on an ER-10X (the only X-router with an open USB port), as the former is MIPS-BE and the latter is MIPS-LE ... yes, all of these can somehow be "emulated", but I just found it much easier to create/operate/maintain those build environments on their respective </span><i class="">native</i> platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.</span></font></div><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class=""><div class="">We've not been able to build ourselves on MIPS yet, we went into some strange problems last time (don't remember exactly). Were you so kind please and could you please help us setting up Debian for MIPS in QEMU if I fail to manage it once more?<br class="">The main issue was, what hardware to choose and how to boot it. But I'll try once more before asking any detailed question. Then we can replicate your issue and probably even build and test for MIPS.<br class=""></div></div></blockquote></div><br class=""></div></blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>