Some notes about my attempts at resurrecting an old WRT54G v2.2 router board in order to use it as a managed switch.
The original openwrt firmware on this device was ATTITUDE ADJUSTMENT (12.09, r36088)
I tried to build a new firmware from openwrt trunk, unfortunately the b44 ethernet driver did not work in openwrt stable kernel 4.19.
By attempting to load a new image (trx without the device-specific header) I got dropped to the CEF bootloader shell which was interesting as I’ve never seen it:
Finally I managed to figure out how to build a proper .bin image by adding a prefix with the device-specific “pattern” using the addpattern tool built by openwrt. I found the proper command here. I also enabled the “Use the testing kernel version” option in “Global build settings” which was linux-5.14. The final image size was 3412000 bytes which is only a bit shorter than 3866624 bytes available in the 4 MB flash.
This resulted in the image being properly detected and flashed:
As you can see this time the ethernet device was properly initialized. The entire openwrt configuration file can be found here.