Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: 1 [2]
Author Topic: Debianized Packaged Kernels
EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: October 27, 2014, 04:28
Quote

Right now things are waiting on bug 762410. Mainly getting the maintainer of broadcom-sta-source to contact me should simplify adjusting the package to work for MIPs. I certainly hope it won't be too difficult.

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: December 20, 2014, 03:54
Quote

Then there is also some time going looking at the DebWRT packages and time going to reset my multiarch development system. The newer Debian release is definitely setting things up in ways that will help multiarch.

Then there is the issue of suggesting to the appropriate mailing list that the libc exec*() calls, aside from execve() really need to have the fallbak behavior of doing exec*("/bin/sh", "executeable", ...) removed. While this might have been a good thing in the days before the "#!/bin/sh" standard was established, nowadays this behavior is a far bigger hinderance than help (foreign architecture binaries are far greater concern than scripts missing the "#!/bin/sh").

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: February 15, 2015, 08:27
Quote

I've now managed to successfully build the broadcom-sta driver with the kernel I've built. As of right now the kernel module hasn't been shown to work, merely build, but that is a large step forward. This means I'm very close to having a fully functional correctly packaged Debian kernel.

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: February 16, 2015, 08:15
Quote

I finally got things into good enough shape that I thought it was worth exposing to others. To my surprise, one of the tweaks that I copied in seems to have trivially made it work on my RT-N16. Everything appears to be in working shape. Ideally someone with more experience with Debian packaging would review things and fix things that are broken with the packaging, but It Works For Me(tm).

I've passed the changes on to AMain, so hopefully others will be able to take advantage of this project.

When others start playing with it, big issue, `depmod` needs to be run after installing the kernel modules. Then "switch_core", "switch_robo" and "switch_adm" should be added to /etc/modules. Forgetting either of these steps is likely to leave your router inaccessible from the network!

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: September 24, 2015, 23:47
Quote

More recently I've been trying to get a 3.16 kernel packaged and operational on a RT-N16. So far I've manage to adapt the OpenWRT patches to apply to the Debian kernel. These are in good enough shape they're visible on the contrib branch, at this time I'm still fighting things to get this operational.

Right now the 3.16 appear to build, but upon trying to kexec it goes away and I never see anything from the 3.16 kernel even on the serial port. I tried kexec'ing a pure OpenWRT 3.18 kernel from revision 45586, and that kernel showed signs of life on the serial port.

My current list of suspects: Do Debian's kernel patches break MIPS kexec()? Did I correctly adapt OpenWRT's patches? Will a pure vanilla 3.16 kernel possibly boot on a RT-N16?

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: November 28, 2015, 23:33
Quote

I've now confirmed reaching the early stages of success with a Debian-packaged 3.16 kernel on a RT-N16. Apparently before 3.10 the MIPS kernel started requiring at least GCC 4.8 to correctly build (I'd been using 4.4). Now, I have confirmed the kernel boots by talking to it via TTL serial cable, but no network activity has been displayed yet. Likely a fair amount of configuration will be needed in other places to have things fully working.

Note, the flash FS device changes from /dev/mtdblock2 with 3.2, to /dev/mtdblock4 with the 3.16 kernel.

Of note, need to update for `swconfig` and see which of the Broadcom 802.11 drivers work (broadcom-sta, brcmsmac, or b43).

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: December 7, 2015, 07:42
Quote

Okay, got an operational BCM47xx 3.16 kernel. Turns out sometime before version 3.10 the MIPSel Linux kernel started requiring use of GCC 4.8 or later. Once one has a recent enough GCC suddenly you start seeing output on the internal serial port, rather than a whole lot of nothing. Due to a request I've also got theoretical AR71xx patches put together. Problem is, while I can build an AR71xx kernel, I don't have hardware and have no idea whether it works. Hopefully things will be publicly visible soon.

The OpenWRT 3.16 kernel patches have much more widespread support for the switch configuration API. As such, the current version of `swconfig` is required. Look here. Please note you will need to remove the libnl-tiny and swconfig packages before installing the current swconfig. Problem is the DebWRT packages started with 0.1 and are now using OpenWRT's version numbers, which dpkg thinks are lower. Meanwhile I'm worried libnl-tiny and libnl-tiny0 will clobber each other.

Now the task of figuring out exactly how `swconfig` works. The documentation provides some hints on how it works, but is very obtuse about what various terms mean.

amain
Administrator
Posts: 222
Permalink
Post Re: Debianized Packaged Kernels
on: December 7, 2015, 08:54
Quote

Some examples:

http://dev.debwrt.net/browser/trunk/debian/package/debwrt-net/etc/network/interfaces.rspro
http://dev.debwrt.net/wiki/NetgearWNDR3700

Otherwise you could reverse engineer OpenWrt's network scripting.

And sorry for the version numbering mess. 🙂

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: December 8, 2015, 03:33
Quote

Since Debian packaged kernels are now far enough along, I'm going to be starting a topic under networking for `swconfig`. I'm unsure how long it will take to propagate from contrib to trunk, but the kernels are working. Other devices will need other patchsets ported though. I've discovered my sample configurations for AR71xx devices are incomplete, so going to generate two more (combo and SD-card).

EHeM
Advanced
Posts: 58
Permalink
Post Re: Debianized Packaged Kernels
on: June 11, 2016, 03:04
Quote

I've managed to figure things out, `swconfig` has some distinct quirks and the behavior of the kernel modules is rather sub-optimal. I've managed to generate a candidate script for interfacing with swconfig. Question is, should switch configuration be done as part of the boot process, or during the process of bringing network interfaces up? Both have some strengths, but I'm rather unsure which is best to opt for...

In other news though, anyone who has a router with an attached switch that uses `swconfig`. You really should rebuild your kernel now. Luckily being able to reprogram attached switches from an unprivileged user shell isn't that big of a hole, but this could cause an interesting nyetwork experience.

Pages: 1 [2]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.062 seconds.