Building My first ever image (WR1043nd V2) , Need help with github

I am using Gargoyle/openwrt for years now for many routers , but this is my first time trying to build my own image , as i need to build a specific old image found here :

My problem is that one of my routers (WR1043nd V2) is having Wifi instability with most of gargoyle/openwrt versions , I searched a lot and found that this specific image may solve my problem , I am not a programmer or a Linux expert but i know some basics , and this is my first time to use github , I have spent hours to learn how to build an openwrt image from the image builder , and I think I have succeeded , After installing the required packages I ran these commands :

cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
make -j 16 ( As I have ryzen 3700x 16 threads )

Just choosed WR1043ND V2 from the image builder menu , other settings left as defaults , saved the config , hit "make -j 16" , After a while the images are compiled , no errors appeared at the terminal , and four files at the /home/user/openwrt/bin/targets/ath79 appeared , including the required files that I need for flashing the image :

openwrt-ath79-generic-tplink_tl-wr1043nd-v2-squashfs-factory.bin
and
openwrt-ath79-generic-tplink_tl-wr1043nd-v2-squashfs-sysupgrade.bin

but these images are the recent once , not the one i need , i am not familiar with github , I dont know how to compile the router image according to this specific script or commit or what ever its called , and can't find any working instructions , I have tried :

src-git packages https://github.com/openwrt/packages.git^61cd5ce994701218a033578d2174e4791c146771

before 'make' but getting errors , so what commands should I run ? and that before running make -j 16 or after ? another trivial question , does getting no errors at the terminal while compiling means the images are compiled as intended/choosed and will not hard-break the router ? or should I check them using the sha256sums file ? or even that is not enough to ensure their is no cpu errors ?

If it is same as my problem you need to git checkout the build you want to compile not the master build.

In my case I cloned the a git then checked out the specific build as below:

git clone of https://github.com/sartura/openwrt.git
./scripts/feeds update -a
./scripts/feeds install -a

Then I checked out the specific build that had what i wanted that had not been merged to the master branch:
git checkout DR40X9

You could also merge that build to the master branch locally but this could cause issues on compiling.

git merge DR40X9

1 Like

Thanks for helping , I think there is a typo with your first command , as there is an error "fatal: repository 'of' does not exist" , after searching , what is working with me is :

git clone https://git.openwrt.org/openwrt/openwrt.git
`./scripts/feeds update -a`
`./scripts/feeds install -a`

This is the main OpenWrt project source cloned I think , now how to know the code/number/hash of the build I want to git checkout and compile ?

the link for the build or the change i want is here : https://github.com/openwrt/archive/tree/61cd5ce994701218a033578d2174e4791c146771

which number should I write at the terminal ?

I know this is a dumb question, excuse my ignorance please , and thanks again for helping .

I have also tried
git clone https://github.com/openwrt/archive/tree/61cd5ce994701218a033578d2174e4791c146771.git
but got :

Cloning into '61cd5ce994701218a033578d2174e4791c146771'...
fatal: repository 'https://github.com/openwrt/archive/tree/61cd5ce994701218a033578d2174e4791c146771.git/' not found

You need to check out the master branch and update the feeds as below:

git clone https://github.com/openwrt/archive.git
./scripts/feeds update -a
./scripts/feeds install -a

Then you can update you local to the correct branch tag or build which are listed as below:
Branches · openwrt/archive · GitHub
Tags · openwrt/archive · GitHub

eg:
git checkout attitude_adjustment

I think you can check out that exzact revision that you posted with this command but in not 100% sure I'm also new to this also:
git checkout 61cd5ce994701218a033578d2174e4791c146771