Help compiling using "make image" option

Hi

i'm new to this lede compiling and i need an help for compile a custom firmware with "make image".
I ask you if this procedure is right:

  1. download latest source code with git ( "git clone https://git.lede-project.org/source.git lede" )
  2. "make menuconfig" just for the creation of a .config file for a tplink w8970
  3. download of latest imagebuilder file ( lede-imagebuilder-lantiq-xrx200.Linux-x86_64.tar.xz for my router)
  4. extract files from the archive and replace .config with the one i created in point 2 above.
  5. compile a custom image with the command "make image PACKAGES="list of packages" "

now i have the firmware in the bin folder.

is this procedure right ?

also how can i add a custom package that is not listed in the official repository (simple-adblock) ? Can i download the package and pass a parameter in the "make image" command?

thanks for your help

There are two different thing...

Image Building, you use precompiled packages and build your own image for specified target (router model) and its generate (usually) an .img file compatible with sysupgrade. (you could upload using FTP to some place, and later wget the file URL and sysupgrade using it.

Compile Image involves downloading using git clone and compile every package, this takes too long and is a very tedious step, It is just useful if you need to patch some source code file or change compilation flags for specific package.

You probably should go to Image Building procedure.

See here: https://lede-project.org/docs/user-guide/imagebuilder

thanks for the answer: i just create the .config file from make menuconfig because i add support for usb storage and various filsystems readings. Can the image building take my custom .config file and "activate" the filesystems in the kernel, right?

also i dont know how can i add a custom package in the building process, how can i do it?

thanks

Add a custom package in the building process, you can do it starting with this documents https://lede-project.org/docs/guide-developer/install-buildsystem but it's takes to long or you try with this post https://www.gargoyle-router.com/old-openwrt-coding.html it's using SDK-OpenWRT

You want to put and remove packages? you can do it on the make image command:

make image PROFILE=TLMR3020 FILES=files/ PACKAGES="kmod-usb-storage block-mount kmod-fs-ext4 e2fsprogs -libiwinfo-lua -libubus-lua -libuci-lua -lua -uhttpd -uhttpd-mod-ubus"

make image PROFILE=[TARGET] FILES=[path to custom files] PACKAGES="package-to-add another-package-to-add -package-to-remove -another-package-to-remove"

See this link, is a gist from me that I use with some notes to build images. Some time ago I didn't know how to do it, so I take notes about: https://gist.github.com/braian87b/4a9048dcc2e2fd244f7d44b8896b7ccc

in case i want to use the full "make" command using the sources, how can i add, for example, the luci language packets (luci-i18...) directly in the "make" build process? is it possible to add precompiled packets?

thanks

you should treat language packages as normal packages (see line 137 and 138 on gist)

make image PROFILE=TLWR841 PACKAGES="luci-i18n-base-es miniupnpd"