Hi, I am currently using BIRD 1.6.3 on an Edgerouter Pro. The CPU architecture is MIPS and the OS is based on Debian Stretch. Because of the latter, I can use the Debian package repos to install BIRD 1.6.3, however I would like to upgrade to BIRD 2 which does not have a package built. I noticed there is another repo (located at http://bird.network.cz/debian) which maintains BIRD 2 for Debian Stretch, however those packages are not built for the MIPS architecture. I tried building the package myself in a virtual system emulated with qemu, but the build failed with the following error:
obj/lib/fletcher16_test 2>/dev/null && touch obj/lib/fletcher16_test.ok obj/lib/fletcher16_test: t_fletcher16_compute 0.007899378s [FAIL] obj/lib/fletcher16_test: t_fletcher16_checksum 0.004199340s [FAIL] obj/lib/fletcher16_test 0.015348769s [FAIL] Makefile:180: recipe for target 'obj/lib/fletcher16_test.ok' failed make[1]: *** [obj/lib/fletcher16_test.ok] Error 1 make[1]: Leaving directory '/root/src/debian/bird2-2.0.7' dh_auto_test: make -j1 test VERBOSE=1 returned exit code 2 debian/rules:21: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 debuild: fatal error at line 1116: dpkg-buildpackage -rfakeroot -us -uc -b failed
Would it be possible to add MIPS as a build target for the bird.network.cz repo? Thanks, Ross
Hello! 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? 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. Thank you! Maria On April 2, 2020 4:53:07 AM GMT+02:00, Ross Tajvar <ross@tajvar.io> wrote:
Hi,
I am currently using BIRD 1.6.3 on an Edgerouter Pro. The CPU architecture is MIPS and the OS is based on Debian Stretch. Because of the latter, I can use the Debian package repos to install BIRD 1.6.3, however I would like to upgrade to BIRD 2 which does not have a package built. I noticed there is another repo (located at http://bird.network.cz/debian) which maintains BIRD 2 for Debian Stretch, however those packages are not built for the MIPS architecture.
I tried building the package myself in a virtual system emulated with qemu, but the build failed with the following error:
obj/lib/fletcher16_test 2>/dev/null && touch obj/lib/fletcher16_test.ok obj/lib/fletcher16_test: t_fletcher16_compute 0.007899378s [FAIL] obj/lib/fletcher16_test: t_fletcher16_checksum 0.004199340s [FAIL] obj/lib/fletcher16_test 0.015348769s [FAIL] Makefile:180: recipe for target 'obj/lib/fletcher16_test.ok' failed make[1]: *** [obj/lib/fletcher16_test.ok] Error 1 make[1]: Leaving directory '/root/src/debian/bird2-2.0.7' dh_auto_test: make -j1 test VERBOSE=1 returned exit code 2 debian/rules:21: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 debuild: fatal error at line 1116: dpkg-buildpackage -rfakeroot -us -uc -b failed
Would it be possible to add MIPS as a build target for the bird.network.cz repo?
Thanks, Ross
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Hallo all - 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". 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: rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/root.dev/*"} / /mnt/ create shadow-mounts for the special kernel filesystems: mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys and now you can chroot into your development environment: chroot /mnt /bin/bash --login and (bonus track) even start an sshd within this environment for easier access later: mkdir /var/run/sshd /run/sshd # may fail on either /usr/sbin/sshd -p 222 -o Protocol=2 which runs on port 222 now (vs. the "normal" sshd, running on port 22). Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive): Packages for 2.x: wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev binutils manuell nachinstallieren! (dpkg -i ...) ------ Packages for 1.x: autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes everything, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → ./configure -prefix=/config/opt/bird . 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". 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. 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. Greeting, Clemens PS: If you want to cover the whole EdgeRouter platform you'll need to do this twice - 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 native platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
Thank you Clemens, this is very useful information. Unfortunately I don't have an Edgerouter with a USB port that's not currently in production. Perhaps I will buy a spare so I can try the process you describe. On Thu, Apr 2, 2020 at 7:47 AM Clemens Schrimpe <clemens.schrimpe@gmail.com> wrote:
Hallo all -
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".
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:
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/ root.dev/*"} / /mnt/
create shadow-mounts for the special kernel filesystems:
mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys
and now you can chroot into your development environment:
chroot /mnt /bin/bash --login
and (bonus track) even start an sshd *within* this environment for easier access later:
mkdir /var/run/sshd /run/sshd # may fail on either
/usr/sbin/sshd -p 222 -o Protocol=2
which runs on port 222 now (vs. the "normal" sshd, running on port 22).
Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):
Packages for 2.x:
wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
binutils manuell nachinstallieren! (dpkg -i ...)
------
Packages for 1.x:
autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes *everything*, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → *./configure -prefix=/config/opt/bird* .
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".
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.
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.
Greeting,
Clemens
PS: If you want to cover the whole EdgeRouter platform you'll need to do this *twice* - 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 *native* platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
Hi I built a bird for edgerouter using these debian images: https://people.debian.org/~aurel32/qemu/ sometimes you can specify cpu type but for edgerouter is quite slow... So I used emdebian.org but it looks down. I think you can find docker images for each platform. You can try use: https://wiki.debian.org/CrossToolchains Regards, Martin On Fri, 3 Apr 2020 at 17:58, Ross Tajvar <ross@tajvar.io> wrote:
Thank you Clemens, this is very useful information. Unfortunately I don't have an Edgerouter with a USB port that's not currently in production. Perhaps I will buy a spare so I can try the process you describe.
On Thu, Apr 2, 2020 at 7:47 AM Clemens Schrimpe < clemens.schrimpe@gmail.com> wrote:
Hallo all -
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".
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:
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/ root.dev/*"} / /mnt/
create shadow-mounts for the special kernel filesystems:
mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys
and now you can chroot into your development environment:
chroot /mnt /bin/bash --login
and (bonus track) even start an sshd *within* this environment for easier access later:
mkdir /var/run/sshd /run/sshd # may fail on either
/usr/sbin/sshd -p 222 -o Protocol=2
which runs on port 222 now (vs. the "normal" sshd, running on port 22).
Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):
Packages for 2.x:
wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
binutils manuell nachinstallieren! (dpkg -i ...)
------
Packages for 1.x:
autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes *everything*, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → *./configure -prefix=/config/opt/bird* .
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".
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.
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.
Greeting,
Clemens
PS: If you want to cover the whole EdgeRouter platform you'll need to do this *twice* - 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 *native* platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
Hi Marcin, The Debian images at your first link are too old - it looks like they were last updated in 2013. I would need a Stretch image. However, that's not the part I had an issue with - as I mentioned in my initial email, I was able to install Debian in a MIPS emulator but the package build failed. I will check out the cross-compiling link you sent. Thanks, Ross On Fri, Apr 3, 2020 at 1:33 PM Marcin Dulinski <martin@dulin.me.uk> wrote:
Hi
I built a bird for edgerouter using these debian images: https://people.debian.org/~aurel32/qemu/ sometimes you can specify cpu type but for edgerouter is quite slow... So I used emdebian.org but it looks down. I think you can find docker images for each platform. You can try use: https://wiki.debian.org/CrossToolchains
Regards, Martin
On Fri, 3 Apr 2020 at 17:58, Ross Tajvar <ross@tajvar.io> wrote:
Thank you Clemens, this is very useful information. Unfortunately I don't have an Edgerouter with a USB port that's not currently in production. Perhaps I will buy a spare so I can try the process you describe.
On Thu, Apr 2, 2020 at 7:47 AM Clemens Schrimpe < clemens.schrimpe@gmail.com> wrote:
Hallo all -
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".
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:
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/ root.dev/*"} / /mnt/
create shadow-mounts for the special kernel filesystems:
mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys
and now you can chroot into your development environment:
chroot /mnt /bin/bash --login
and (bonus track) even start an sshd *within* this environment for easier access later:
mkdir /var/run/sshd /run/sshd # may fail on either
/usr/sbin/sshd -p 222 -o Protocol=2
which runs on port 222 now (vs. the "normal" sshd, running on port 22).
Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):
Packages for 2.x:
wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
binutils manuell nachinstallieren! (dpkg -i ...)
------
Packages for 1.x:
autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes *everything*, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → *./configure -prefix=/config/opt/bird* .
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".
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.
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.
Greeting,
Clemens
PS: If you want to cover the whole EdgeRouter platform you'll need to do this *twice* - 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 *native* platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
Hello! I've just replicated the bug via the proot approach. Thank you a lot for your help! Maria On April 2, 2020 1:47:32 PM GMT+02:00, Clemens Schrimpe <clemens.schrimpe@gmail.com> wrote:
Hallo all -
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".
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:
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/root.dev/*"} / /mnt/
create shadow-mounts for the special kernel filesystems:
mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys
and now you can chroot into your development environment:
chroot /mnt /bin/bash --login
and (bonus track) even start an sshd within this environment for easier access later:
mkdir /var/run/sshd /run/sshd # may fail on either
/usr/sbin/sshd -p 222 -o Protocol=2
which runs on port 222 now (vs. the "normal" sshd, running on port 22).
Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):
Packages for 2.x:
wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
binutils manuell nachinstallieren! (dpkg -i ...)
------
Packages for 1.x:
autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes everything, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → ./configure -prefix=/config/opt/bird .
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".
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.
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.
Greeting,
Clemens
PS: If you want to cover the whole EdgeRouter platform you'll need to do this twice - 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 native platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Hello! Hopefully fixed in current master, commit 2928c5bcc7 The affected test was broken itself, yet it accidentally somehow worked on little endian. Maria On April 4, 2020 1:42:58 AM GMT+02:00, "Maria Matějka" <maria.matejka@nic.cz> wrote:
Hello!
I've just replicated the bug via the proot approach. Thank you a lot for your help!
Maria
On April 2, 2020 1:47:32 PM GMT+02:00, Clemens Schrimpe <clemens.schrimpe@gmail.com> wrote:
Hallo all -
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".
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:
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/root.dev/*"} / /mnt/
create shadow-mounts for the special kernel filesystems:
mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys
and now you can chroot into your development environment:
chroot /mnt /bin/bash --login
and (bonus track) even start an sshd within this environment for easier access later:
mkdir /var/run/sshd /run/sshd # may fail on either
/usr/sbin/sshd -p 222 -o Protocol=2
which runs on port 222 now (vs. the "normal" sshd, running on port 22).
Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):
Packages for 2.x:
wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
binutils manuell nachinstallieren! (dpkg -i ...)
------
Packages for 1.x:
autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes everything, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → ./configure -prefix=/config/opt/bird .
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".
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.
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.
Greeting,
Clemens
PS: If you want to cover the whole EdgeRouter platform you'll need to do this twice - 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 native platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Thank you Maria! When will that update reach the Debian source repo, so I can build the package? On Sat, Apr 4, 2020 at 7:27 PM Maria Matějka <maria.matejka@nic.cz> wrote:
Hello! Hopefully fixed in current master, commit 2928c5bcc7 The affected test was broken itself, yet it accidentally somehow worked on little endian. Maria
On April 4, 2020 1:42:58 AM GMT+02:00, "Maria Matějka" < maria.matejka@nic.cz> wrote:
Hello!
I've just replicated the bug via the proot approach. Thank you a lot for your help!
Maria
On April 2, 2020 1:47:32 PM GMT+02:00, Clemens Schrimpe < clemens.schrimpe@gmail.com> wrote:
Hallo all -
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".
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:
rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/ root.dev/*"} / /mnt/
create shadow-mounts for the special kernel filesystems:
mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys
and now you can chroot into your development environment:
chroot /mnt /bin/bash --login
and (bonus track) even start an sshd *within* this environment for easier access later:
mkdir /var/run/sshd /run/sshd # may fail on either
/usr/sbin/sshd -p 222 -o Protocol=2
which runs on port 222 now (vs. the "normal" sshd, running on port 22).
Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):
Packages for 2.x:
wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
binutils manuell nachinstallieren! (dpkg -i ...)
------
Packages for 1.x:
autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes *everything*, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → *./configure -prefix=/config/opt/bird* .
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".
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.
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.
Greeting,
Clemens
PS: If you want to cover the whole EdgeRouter platform you'll need to do this *twice* - 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 *native* platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
It should probably happen shortly after we release the new version. Which is something we're usually quite lazy to do so I would expect it to happen in let's say a month or so. Until that, it should be pretty straightforward to apply the commit on almost any recent BIRD version source as this fix is completely independent on any recent development. Maria On April 5, 2020 1:45:06 AM GMT+02:00, Ross Tajvar <ross@tajvar.io> wrote:
Thank you Maria! When will that update reach the Debian source repo, so I can build the package?
On Sat, Apr 4, 2020 at 7:27 PM Maria Matějka <maria.matejka@nic.cz> wrote:
Hello! Hopefully fixed in current master, commit 2928c5bcc7 The affected test was broken itself, yet it accidentally somehow worked on little endian. Maria
On April 4, 2020 1:42:58 AM GMT+02:00, "Maria Matějka" < maria.matejka@nic.cz> wrote:
Hello!
I've just replicated the bug via the proot approach. Thank you a lot
for
your help!
Maria
On April 2, 2020 1:47:32 PM GMT+02:00, Clemens Schrimpe < clemens.schrimpe@gmail.com> wrote:
Hallo all -
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".
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:
rsync -aAXv
--exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/
root.dev/*"} / /mnt/
create shadow-mounts for the special kernel filesystems:
mount --rbind /dev /mnt/dev mount --rbind /proc /mnt/proc mount --rbind /sys /mnt/sys
and now you can chroot into your development environment:
chroot /mnt /bin/bash --login
and (bonus track) even start an sshd *within* this environment for easier access later:
mkdir /var/run/sshd /run/sshd # may fail on either
/usr/sbin/sshd -p 222 -o Protocol=2
which runs on port 222 now (vs. the "normal" sshd, running on port 22).
Depending on the EdgeOS Version (1.x or 2.x) you install additional packages need for development. Here are some suggestions (non-comprehensive):
Packages for 2.x:
wget git build-essential autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev minizip flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libjson-c-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
binutils manuell nachinstallieren! (dpkg -i ...)
------
Packages for 1.x:
autoconf locales-all cscope ncurses-dev libssl-dev libev-dev liblzo2-dev libpam-dev flex bison libperl-dev libreadline-dev libpcre3-dev libpcap-dev libldap-dev libtalloc-dev libcap2-dev libmemcached-dev libgdbm-dev libsqlite3-dev libssh-dev libssh2-1-dev
Why am I doing this on this "shadow root" again? Because every EdgeOS update wipes *everything*, except for /config (which is why I place my compiled "modules" (binaries), like BIRD, into /config/opt/bird/... for example → *./configure -prefix=/config/opt/bird* .
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".
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.
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.
Greeting,
Clemens
PS: If you want to cover the whole EdgeRouter platform you'll need to do this *twice* - 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 *native* platforms - besides: They are incredibly cheap - even the Infinity router (8 x SFP+, 116 CPUs - 16G RAM - bored beyond belief) is comparatively cheap.
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? 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.
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
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?
I would be happy to help if I can - it was pretty easy for me, I mostly followed this guide: https://markuta.com/how-to-build-a-mips-qemu-image-on-debian/ Feel free to email me directly if you have questions. On Thu, Apr 2, 2020 at 7:11 AM Maria Matějka <maria.matejka@nic.cz> wrote:
Hello! 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? 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. Thank you! Maria
On April 2, 2020 4:53:07 AM GMT+02:00, Ross Tajvar <ross@tajvar.io> wrote:
Hi,
I am currently using BIRD 1.6.3 on an Edgerouter Pro. The CPU architecture is MIPS and the OS is based on Debian Stretch. Because of the latter, I can use the Debian package repos to install BIRD 1.6.3, however I would like to upgrade to BIRD 2 which does not have a package built. I noticed there is another repo (located at http://bird.network.cz/debian) which maintains BIRD 2 for Debian Stretch, however those packages are not built for the MIPS architecture.
I tried building the package myself in a virtual system emulated with qemu, but the build failed with the following error:
obj/lib/fletcher16_test 2>/dev/null && touch obj/lib/fletcher16_test.ok obj/lib/fletcher16_test: t_fletcher16_compute 0.007899378s [FAIL] obj/lib/fletcher16_test: t_fletcher16_checksum 0.004199340s [FAIL] obj/lib/fletcher16_test 0.015348769s [FAIL] Makefile:180: recipe for target 'obj/lib/fletcher16_test.ok' failed make[1]: *** [obj/lib/fletcher16_test.ok] Error 1 make[1]: Leaving directory '/root/src/debian/bird2-2.0.7' dh_auto_test: make -j1 test VERBOSE=1 returned exit code 2 debian/rules:21: recipe for target 'build' failed make: *** [build] Error 2 dpkg-buildpackage: error: debian/rules build gave error exit status 2 debuild: fatal error at line 1116: dpkg-buildpackage -rfakeroot -us -uc -b failed
Would it be possible to add MIPS as a build target for the bird.network.cz repo?
Thanks, Ross
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
participants (4)
-
Clemens Schrimpe -
Marcin Dulinski -
Maria Matějka -
Ross Tajvar