📜 ⬆️ ⬇️

Build DebWRT on the example of Ubiquity RouterStation Pro

Greetings, habreads.
I bring to your attention a small how-to on assembling and installing DebWRT on Ubiquity RouterStation Pro
A bit about DebWRT.
As the author of the project himself writes on the site : “DebWRT is a project to launch Debian GNU / Linux on embedded devices, such as wireless routers. DebWRT combines two technologies: Debian and OpenWrt. Debian is thousands of packages for various architectures and a great package manager, and OpenWrt is a kernel that perfectly supports embedded devices. Combining these two technologies opens up a whole new world of opportunities. ”
Thus, all the hardware that OpenWRT supports will support DebWRT, but after we have “prepared” it.
So let's get started ...

During the "preparation" I needed the following ingredients:
# apt-get update
# apt-get install build-essential sudo subversion debootstrap makedev libncurses5-dev glib1g-dev gawk flex unzip git-core
#mkdir / usr / src / debwrt
#chmod 777 / usr / src / debwrt

It is necessary to collect not from under the root.
#nano / etc / sudoers
non-root-user ALL = (ALL) ALL

We take away source OpenWRT DebWRT
$ cd / usr / src
$ svn checkout svn.debwrt.net/debwrt/trunk debwrt
$ rm -rf /usr/src/debwrt/openwrt/.svn/
$ cd / usr / src / debwrt
$ svn co svn: //svn.openwrt.org/openwrt/trunk openwrt
$ / usr / src / debwrt / openwrt / scripts / feeds update -a
')
$ make menuconfig
Choose the necessary system (in my case rspro)
Save and exit

$ make openwrt / menuconfig
In the Kernel Modules menu, we mark the drivers we need.
Save and exit

$ make openwrt / all V = 99
first cup of tea

$ make debian / rootfs
second cup of tea

Next, you need to prepare a memory card and flash the device itself. This was already written here on Habré. Only in our case, take the firmware from here:
/usr/src/debwrt/bin/name-platform-angel-2.0-1-default/ - right there are modules and headers
/usr/src/debwrt/build/rootfs-mips-angel-2.0-1/ - and this is the system itself and it needs to be copied to DEBWRT_ROOT

After the firmware, insert the card, reboot the router and knock on 192.168.1.1
Login / Password - root / debwrt

Now you need to perform the second stage of installation:
-bash-4.1 # / debootstrap / debootstrap --second-stage
-bash-4.1 # rm -rf / var / cache / apt / archives
-bash-4.1 # mkdir -p / var / cache / apt / archives / partial
-bash-4.1 # echo "deb ftp.debian.org/debian squeeze main" >> / etc / apt / sources.list
-bash-4.1 # reboot

After the reboot, we go to the router and, if all the stages are successful, then we should see the standard Debian greeting and of course:

# apt-get update

PS The second stage can be performed on the computer. To do this, you need to activate the item Use qemu to perform Debian second stage install on the host and install the packages necessary for qemu

DebWRT project site: debwrt.net
DebWRT Wiki: dev.debwrt.net/wiki
DebWRT HCL: dev.debwrt.net/wiki/TableOfSupportedHardware
Thanks to the author of the amain project for advice and support and to drunken habroman for reviewing

Source: https://habr.com/ru/post/130875/


All Articles