Which version of curl?

I really don't think I can do that. I tried before and it was over my head.
Isn't there any version of openwrt which supports these older routers where curl works or where using specific versions would work?

No, you've got the only relatively recent version and know it doesn't work.

If you want to keep them running, this would be the time to take what you use to run the image builder, then start building from source.

I would start with something you know builds without issue, like Atheros AR7xxx / generic / TP-Link Archer C7 v2, enable ccache under developer options (and probably saving of build logs), and confirm that you get a set of images at the end. Then you can start to find out if it is the kernel that is too big, or if it is another reason the target isn't being build any more.

Well, I know it's not too big since I don't put many packages on those mainly only bash and curl and a few other things. You've already lost me above but I'll take a look around the net and see if I can find an easy to follow article that explains how to do it. I used to build my own Linux kernels but that was a very long time ago.

https://openwrt.org/docs/guide-developer/build-system/use-buildsystem

(I'm building your device off master right now to see what happens)

OK, it's done and builds OK, it seems.

Note: It seems as though there was some "cruft" adding packages from previous config in my environment.

Rebuilding with

openwrt$ ./scripts/diffconfig.sh 
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_tiny=y
CONFIG_TARGET_ar71xx_tiny_DEVICE_tl-wr703n-v1=y
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
CONFIG_CCACHE=y
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_USE_MKLIBS=y
3276804 Apr  5 18:03 openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin

Switching to the ath79 target to see if there are notable differences:

openwrt$ ./scripts/diffconfig.sh 
CONFIG_TARGET_ath79=y
CONFIG_TARGET_ath79_tiny=y
CONFIG_TARGET_ath79_tiny_DEVICE_tplink_tl-wr703n=y
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
CONFIG_CCACHE=y
CONFIG_PACKAGE_kmod-phy-ath79-usb=y
# CONFIG_PACKAGE_kmod-usb-chipidea is not set
# CONFIG_PACKAGE_kmod-usb-chipidea2 is not set
CONFIG_PACKAGE_kmod-usb2=y
CONFIG_STRIP_KERNEL_EXPORTS=y
# CONFIG_TARGET_ROOTFS_INITRAMFS is not set
CONFIG_USE_MKLIBS=y
3343123 Apr  5 18:26 openwrt-ath79-tiny-tplink_tl-wr703n-squashfs-sysupgrade.bin
>>> (3343123 - 3276804)/1024
64.7646484375

So sticking with ar71xx would probably be a good idea, at least as long as it is maintained.

Ok, I'll give it a try over the weekend then. Maybe I can get somewhere :).
Thanks.

1 Like

Removing IPv6 support, as well as kernel symbols and further stripping exports still looks short of a flashable image with curl and mbedTLS.

-rw-r--r-- 1 jeff jeff 2752512 Apr  5 17:21 openwrt-ar71xx-tiny-root.squashfs
-rw-r--r-- 1 jeff jeff 1421936 Apr  5 17:21 openwrt-ar71xx-tiny-uImage-lzma.bin
-rwxr-xr-x 1 jeff jeff 4486892 Apr  5 17:21 openwrt-ar71xx-tiny-vmlinux.bin
-rwxr-xr-x 1 jeff jeff 4492016 Apr  5 17:21 openwrt-ar71xx-tiny-vmlinux.elf
-rw-r--r-- 1 jeff jeff 1441792 Apr  5 17:21 openwrt-ar71xx-tiny-vmlinux.lzma
-rwxr-xr-x 1 jeff jeff 1432056 Apr  5 17:21 openwrt-ar71xx-tiny-vmlinux-lzma.elf
devel/openwrt$ ./scripts/diffconfig.sh 
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_tiny=y
CONFIG_TARGET_ar71xx_tiny_DEVICE_tl-wr703n-v1=y
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
# CONFIG_BUSYBOX_DEFAULT_FEATURE_IPV6 is not set
CONFIG_CCACHE=y
# CONFIG_IPV6 is not set
CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_KERNEL_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_KERNEL_COREDUMP=y
CONFIG_KERNEL_DEBUG_INFO=y
CONFIG_KERNEL_DEBUG_KERNEL=y
CONFIG_KERNEL_ELF_CORE=y
# CONFIG_KERNEL_IPV6 is not set
CONFIG_KERNEL_KALLSYMS=y
CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_KERNEL_SWAP=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_MBEDTLS=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_PROXY=y
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_curl=y
# CONFIG_PACKAGE_kmod-ppp is not set
CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y
CONFIG_PACKAGE_kmod-usb-ohci=y
CONFIG_PACKAGE_libcurl=y
CONFIG_PACKAGE_libmbedtls=y
# CONFIG_PACKAGE_ppp is not set
CONFIG_PACKAGE_wpad-basic=y
# CONFIG_PACKAGE_wpad-mini is not set
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256
CONFIG_USE_MKLIBS=y
CONFIG_PACKAGE_kmod-lib-crc-ccitt=y
CONFIG_PACKAGE_kmod-nf-ipt6=y
CONFIG_PACKAGE_libip6tc=y


Ok, this builds:

openwrt$ ./scripts/diffconfig.sh 
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_tiny=y
CONFIG_TARGET_ar71xx_tiny_DEVICE_tl-wr703n-v1=y
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
# CONFIG_BUSYBOX_DEFAULT_FEATURE_IPV6 is not set
CONFIG_CCACHE=y
# CONFIG_IPV6 is not set
# CONFIG_KERNEL_IPV6 is not set
# CONFIG_PACKAGE_kmod-lib-crc-ccitt is not set
# CONFIG_PACKAGE_kmod-nf-ipt6 is not set
# CONFIG_PACKAGE_kmod-ppp is not set
# CONFIG_PACKAGE_libip6tc is not set
# CONFIG_PACKAGE_ppp is not set
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_USE_MKLIBS=y
3014660 Apr  5 17:36 openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-sysupgrade.bin
>>> 4*1024*1024 - 3014660
1179644

Now that I've got a minimal build (sometimes removing things with make menuconfig doesn't remove dependencies), add in curl with libcurl using mbedTLS

3932160 Apr  5 17:43 openwrt-ar71xx-tiny-tl-wr703n-v1-squashfs-factory.bin
>>> 4*1024*1024 - 3932160
262144

That's unlikely to work as there's not enough space for the overlay left. Double-checking the erase-block size -- might be OK if it's using 64 kB erase blocks

>>> 262144/(64*1024)
4.0

So you might have 128 or 192 kB of overlay before things freeze up on you. Running with a single erase block is pretty dicey, in my opinion.

Here's the diffconfig for what I just built

openwrt$ ./scripts/diffconfig.sh 
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_tiny=y
CONFIG_TARGET_ar71xx_tiny_DEVICE_tl-wr703n-v1=y
CONFIG_DEVEL=y
CONFIG_BUILD_LOG=y
# CONFIG_BUSYBOX_DEFAULT_FEATURE_IPV6 is not set
CONFIG_CCACHE=y
# CONFIG_IPV6 is not set
# CONFIG_KERNEL_IPV6 is not set
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_MBEDTLS=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_PROXY=y
CONFIG_PACKAGE_ca-bundle=y
CONFIG_PACKAGE_curl=y
# CONFIG_PACKAGE_kmod-lib-crc-ccitt is not set
# CONFIG_PACKAGE_kmod-nf-ipt6 is not set
# CONFIG_PACKAGE_kmod-ppp is not set
CONFIG_PACKAGE_libcurl=y
# CONFIG_PACKAGE_libip6tc is not set
CONFIG_PACKAGE_libmbedtls=y
# CONFIG_PACKAGE_ppp is not set
CONFIG_STRIP_KERNEL_EXPORTS=y
CONFIG_USE_MKLIBS=y

Hi,

I'm trying to follow along but I'm already doing something wrong. I downloaded the SDK version and running make menuconfig. There is no option to pick only the ar71xx or specifically the tp-link I'm working with.
When I try to remove ipv6 stuff for example, all options I go to only show a green dot and nothing else. I'm reading along on the page you shared but am already missing something.

Update: I had to download all of the packages, now I see the options.

1 Like

Wow, it's way too much work for what I need. I need the most basic package possible, nothing much on it but bash curl libpthread libstdcpp, no usb support, no firewall, nothing, just mainly curl and being able to write some scripts.

I think I have to junk these.