Building for multiple devices

apologies if i post in the wrong category. but consider this a newbie query.

i have two old routers, dir615d4 and wrt160nl. both on v19.07 for the past few years. i have just ventured into building and compiling, and want to start with them. i have them on hand. they are unbrickable.

inspired by the wiki, i compiled dir615d4 successfully, and i'm amazed at how much space i have reclaimed. i can now make this device so much more useful than just a dumb ap atmo.

i now want to do the same for wrt160nl. and if i'm happy with the results, i might try compiling some others too.

on to my question.. can i compile for two devices simultaneously? i see that i can only select one device at a time in menuconfig. but i have also seen something about multi device compiling. hence my question. thanks

No, you cant. They are both different targets, so they both need their own build.

1 Like

does that mean for each device i should make a separate directory, and then start with step 1 from the build wiki?

git clone https://git.openwrt.org/openwrt/openwrt.git [<buildroot>]

ie a different buildroot for each device?

No you can stick with one buildroot as long as you stay with the same branch. Use profiles (./scripts/env) to store your buildroot settings per device and switch back and forth between them.

2 Likes

i didn't choose a branch. i used tag v19.07.10 as i couldn't find that branch.
i'm not sure what branch i'm on.

In your buildroot:

$ git branch -v

1 Like
$ git branch -v
* (HEAD detached at v19.07.10) d03dc49943 OpenWrt v19.07.10: adjust config defaults
  main                         65964c42f8 [behind 3] realtek: align kernel config with upstream
$ git pull
remote: Enumerating objects: 866, done.
remote: Counting objects: 100% (724/724), done.
remote: Compressing objects: 100% (336/336), done.
remote: Total 482 (delta 340), reused 180 (delta 138), pack-reused 0
Receiving objects: 100% (482/482), 160.97 KiB | 1.39 MiB/s, done.
Resolving deltas: 100% (340/340), completed with 103 local objects.
From https://git.openwrt.org/openwrt/openwrt
   afffcd09e5..2784f78c6c  main          -> origin/main
   afffcd09e5..2784f78c6c  master        -> origin/master
   2d465fbf57..1abaf051d2  openwrt-24.10 -> origin/openwrt-24.10
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

what is this in make menuconfig, and can i use it if all my configs, package lists, etc are the same?

Screenshot_2024-11-21_21-29-02

Only if all your devices belong to the same Target, Sub-target, and Target Profile.

3 Likes

./scripts/env failed with cryptic errors, probably because i had not selected a branch.
i restarted again, selected v19.07 and all working now.

1 Like