S
S
syxoi2016-10-11 14:01:34
linux
syxoi, 2016-10-11 14:01:34

How to build OpenWRT from source?

Hello!
Previously, I had the experience of assembling openwrt for the UPVEL UR-313N4G router, which, of course, was corrupted and even the bootloader was damaged, although I chose the correct platform.
Now I tried to build for Tplink MR3220 v2, I did this:
1) download the sources from the trunk: git clone https://github.com/openwrt/openwrt.git
2) check for the presence of the necessary packages in the system - make prereq
3) ./scripts/ feeds update -a && ./scripts/feeds install -a
4) set up the platform. make menuconfig - first go to Target System and select Atheros ar7xxx, go to Target Profile, TP-LINK TL-MR3220 appears and select it. Click exit, save the config and execute make defconfig (as I understand it, this is necessary so that the so-called "build environment" configures all the drivers, bootloader, packages, etc. necessary for the operation of a particular router, in my case mp3220 , right?)
5) now run make menuconfig again and mark the necessary packages that need to be integrated into the firmware image (marked kmod-usb-net and everything necessary for the highlink to work)
6) compile: make
After assembly, in theory, the file should appear in bin/ar71xx, which will contain the name and revision of the device, as well as with the names sysupgrade and factory, but there are only these files:

ls bin/ar71xx
md5sums
openwrt-ar71xx-generic-nbg460n_550n_550nh-u-boot.bin
openwrt-ar71xx-generic-root.squashfs
openwrt-ar71xx-generic-root.squashfs-64k
openwrt-ar71xx-generic-uImage-gzip.bin
openwrt-ar71xx-generic-uImage-lzma.bin
openwrt-ar71xx-generic-vmlinux.bin
openwrt-ar71xx-generic-vmlinux.elf
openwrt-ar71xx-generic-vmlinux.gz
openwrt-ar71xx-generic-vmlinux.lzma
openwrt-ar71xx-generic-vmlinux-lzma.elf
packages
sha256sums
uboot-ar71xx-nbg460n_550n_550nh

And in the Boot Loaders section there is an item (already marked) [*] uboot-ar71xx-nbg460n_550n_550nh is this even necessary? Some loader.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
I
iv_k, 2016-10-11
@iv_k

you have the kernel images and the rootfs image there, it remains to figure out how to combine it into the firmware, look in the docks =)
u-boot is a bootloader for linux. you can enter its command interface through the serial port, if you have one.

I
ipc_ngs, 2016-10-11
@ipc_ngs

Either your make failed with an error, not completing the files for the firmware (look for error messages) or the built images would have turned out to be too large, read the documentation more carefully: https://wiki.openwrt.org/doc/howto/build#factorybi.. .

S
solalex, 2016-10-11
@solalex

after make menuconfig, you need to actually save the config file, before exiting and saving, check the Target Profile, for some reason you are building for an image for nbg460n
before building, check the .config file
and build with make -j 3 (for dual-core) or make - j 5 (for a quad-core processor)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question