How to use this repo to build your own firmware - ferboiar/wrt32x Wiki

Through GitHub actions you can build your own custom OpenWRT firmware.

  1. Click the Use this template button from my repo to create your new repo (or fork it)
  2. in the home folder of your linux machine clone the openwrt github repo and yours:
git clone https://github.com/openwrt/openwrt.git
git clone https://github.com/ferboiar/wrt32x.git *change it for your brand new recently created repo 
  1. Copy in the new folder "openwrt/" the scripts and the configuration files from your repo:
cp wrt32x/scripts/*.sh openwrt/
chmod +x openwrt/*.sh
mkdir openwrt/patches/
cp -r wrt32x/configs/patches/ openwrt/
cp wrt32x/configs/feeds.conf.default openwrt/
cp wrt32x/configs/wrt32x.config openwrt/
cp wrt32x/configs/rt3200.config openwrt/
  1. run, from "openwrt/" the commands contained in "manual_generate.sh" script:
./fetch_packages.sh
./scripts/feeds update -a
./scripts/feeds install -a
./scripts/feeds uninstall bluld
cp wrt32x.config .config (or cp rt3200.config .config)
git am patches/*.patch
./functions.sh BUILD_USER_DOMAIN
./functions.sh PRE_DEFCONFIG_ADDONS
sudo ./functions.sh CCACHE_SETUP
./functions.sh REMOVE_LANGUAGES
  1. then make menuconfig, load your .config file and choose the packages you want.
  2. upload your .config file to your repo "/configs" as wrt32x.config
  3. launch "Actions" > "Build wrt32x firmware (Linksys Device)"> "Run workflow" on YOUR repo

after 2 or 3h of compilation you will see new files into "Artifacs".

NOTES

  • Note that your repo needs to be public, otherwise you have a strict monthly limit on how many minutes you can use.
  • Your session can run for up to six hours. Don't forget to close it after finishing your work, otherwise you will continue to occupy this virtual machine, making it impossible for others to use it normally.
  • Please check the GitHub Actions Terms of Service. According to the TOS the repo that contains these files needs to be the same one where you're developing the project that you're using it for, and specifically that you are using it for the "production, testing, deployment, or publication of [that] software project".

Build OpenWrt using GitHub Actions: Instructions (Use translator)

Flashing process for wrt32x

If you are not sure about your kernel partition size do a sysupgrade from command line Increasing mamba and venom kernel partition to 6MB

  1. Verify compatibility
   $ fw_printenv | grep "pri_kern_size"; #mamba MUST equal 0x400000
   $ fw_printenv | grep "priKernSize"; #venom MUST equal 0x0600000

Do not try to change them!

  1. Flashing process: You must always use a factory image when flashing to or away from a resized build.
  • Create a backup tar
  • Flash the image via sysupgrade: sysupgrade -F squashfs-factory.img
  • Restore the backup

Two times, to do the change from both boot partitions. Once, you will be capable of install updates without do this again


Advanced

SSH by using ngrok

Click the Settings tab on your own repository, and then click the Secrets button to add the following encrypted environment variables:

  • NGROK_TOKEN: Sign up on the https://ngrok.com , find this token here.
  • SSH_PASSWORD: This password you will use when authorizing via SSH.

Send connection info to Telegram

Click the Settings tab on your own repository, and then click the Secrets button to add the following encrypted environment variables:

  • TELEGRAM_BOT_TOKEN: Get your bot token by talking to @BotFather.
  • TELEGRAM_CHAT_ID: Get your chat ID by talking to @GetMyID_bot or other similar bots.

You can find Telegram Bot related documents here.