You can actually install losetup using opkg in the initramfs
@Robimarko I am trying to build from your 5.15.x branch and selecting the following options in the make config stage
#Kernel dependencies
Kernel modules -> Network Devices -> kmod-qca-nss-drv
Kernel modules -> Network Support -> kmod-tun
Kernel modules -> Netfilter Extensions -> kmod-ipt-ipset
Kernel modules -> Netfilter Extensions -> kmod-nft-core
Kernel modules -> Netfilter Extensions -> kmod-nft-fib
Kernel modules -> Netfilter Extensions -> kmod-nft-nat
Kernel modules -> Netfilter Extensions -> kmod-nft-nat6
Kernel modules -> Netfilter Extensions -> kmod-nft-offload
Network -> VPN -> openvpn-openssl
Network -> Routing And Redirection -> mwan3
Network ->Firewall->iptables-mod-conntrack-extra
Network ->Firewall->iptables-mod-ipopt
Network ->Firewall->nftables-json
Network ->vpn-policy-routing
The build completes without any errors but the resulting bin file does not appear to assign DHCP to connected clients.
Could you please confirm if any of the options above should be left out when building from the ipq807x-5.15 branch?
Unfortunately, I dont really have a cristal ball but I can tell you that qca-nss-drv is useless
Thanks for the reploy @robimarko
I was able to install your build from yesterday with help from @kirdes. It runs nicely but kmod-tun is missing, I need it due to openvpn.
I'm currently attempting to build from the ipq807x-2022-07-08 tag, I'll have exclude nss-drv but will have to include kmod-tun. Hopefully, it works out this time
On /usr/sbin there is a script fwupgrade.sh it seems is not the partuuid but the partlabel that is used
PARTLABEL_KERNEL_1="0:HLOS"
PARTLABEL_ROOTFS_1="rootfs"
PARTLABEL_KERNEL_2="0:HLOS_1"
PARTLABEL_ROOTFS_2="rootfs_1"
PARTLABEL_KERNEL_3="0:HLOS_2"
PARTLABEL_ROOTFS_3="rootfs_2"
on the stock firmware there is a script that mounts at boot as follows
+ mkdir -p /sys /proc
+ echo_dbg Making /sys...
+ echo -e \033[01;32mMaking /sys...\033[00m
Making /sys...
+ mount -t sysfs -o nodev,noexec,nosuid none /sys
+ echo_dbg Making /proc...
+ echo -e \033[01;32mMaking /proc...\033[00m
Making /proc...
+ mount -t proc -o nodev,noexec,nosuid none /proc
+ wait_detect_emmc
+ local devname=/dev/mmcblk0p
+ local emmc_all_partition_exist=1
+ seq 6
+ emmc_all_partition_exist=1
+ [ ! -e /dev/mmcblk0p1 ]
+ emmc_all_partition_exist=0
+ break
+ [ 0 -eq 0 ]
+ sleep 1
+ echo_dbg sleep 1 wait for emmc device /dev/mmcblk0p1
+ echo -e \033[01;32msleep 1 wait for emmc device /dev/mmcblk0p1\033[00m
sleep 1 wait for emmc device /dev/mmcblk0p1
+ seq 6
i guess there is some script embedded ... on the stock firmware i see a post_fwupgrade.sh script with these echo_dbg
I was talking about u-boot:
@kirdes It seems the github action you started yesterday wasn't completed successfully.
I'm back to stock firmware because I could not successfully build with kmod-tun from the 5.15.x branch.
Have you been successful with 5.15.x build that includes kmod-tun, can you provide the URL for such?
The action was successfull, but the build doesn't contain kmod-tun
I haven't used kmod-tun with the ipq807x target cause I'm using wireguard, not openvpn.
Thanks Kirdes.
I'll be stuck with openvpn on openwrt for 3 yrs because VyprVPN refused to support wireguard on router
bootipq debug
IPQ807x# bootipq debug
bootargs=console=ttyMSM0,115200n8 root=PARTUUID=2a213133-47f8-80a1-5d66-1d565a2ec756 rootwait
Booting from flash
Using MMC device
MMC read: dev # 0, block # 32802, count 32768 ... 32768 blocks read: OK
shows that the root=PARTUUID= is appended by bootipq
I presume one could load the memory via mmc read followed by bootm (as in the dynalink) ...
something like this
mmc read 0 0x70800000 0x800 0x2000; mmc read 0 0x70D00000 0x3000 0x300; bootm 0x70800000 0x70D00000
does anyone know how from the mmc part output
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000022 0x00008021 "0:HLOS"
attrs: 0x0000000000000000
type: b51f2982-3ebe-46de-8721-ee641e1f9997
guid: 1a373c3c-588e-eff4-5182-68ad83e0e62e
2 0x00008022 0x00010021 "0:HLOS_1"
attrs: 0x0000000000000000
type: a71da577-7f81-4626-b4a2-e377f9174525
guid: 7d35f31d-0980-2220-edfd-6228595b79d2
3 0x00010022 0x00018021 "0:HLOS_2"
attrs: 0x0000000000000000
type: 3e972198-336f-11ea-baa1-52540063a6b7
guid: 964e7e67-6666-7303-312a-291b757640e8
4 0x00018022 0x00118021 "rootfs"
attrs: 0x0000000000000000
type: 98d2248d-7140-449f-a954-39d67bd6c3b4
guid: 2a213133-47f8-80a1-5d66-1d565a2ec756
5 0x00118022 0x00218021 "rootfs_1"
attrs: 0x0000000000000000
type: 5647b280-dc2a-485d-9913-cf53ac40fa32
guid: 77f91baf-6750-e138-dbe5-434eaeded6dd
6 0x00218022 0x00318021 "rootfs_2"
attrs: 0x0000000000000000
type: cd26dc90-3370-11ea-baa1-52540063a6b7
guid: 8530d17c-21e3-f82b-12ec-87fd429a600e
7 0x00318022 0x0031a021 "0:WIFIFW"
attrs: 0x0000000000000000
type: 5911fd72-35be-424e-975d-69c957ad3a43
guid: 9420c4b0-ba83-2b38-6ba6-2839be048c92
8 0x0031a022 0x00322021 "reserved"
attrs: 0x0000000000000000
type: 8da63339-0007-60c0-c436-083ac8230908
guid: e590e607-3410-795e-afbc-888e9b2ea17b
9 0x00322022 0x0073d821 "rootfs_data"
attrs: 0x0000000000000000
type: ab1760da-a8bb-4d6f-98d2-9ad3ab9009cd
guid: d1402149-3e8e-0709-99d9-170bfab2f66c
to create a mmc command that loads the kernel and rootfs ?
Dont complicate things with manual reads, basically changing whole u-boot env
ok so here's what found - if using the stock firmware
there is a script that loads the rootfs and checks the current_entry flag and loads the appropriate mountpoints and finally switches to root
interestingly it mounts /dev/mmcblk0p8 (where the uboot env is) and loads the env variables
Would this method be appropriate to use for Openwrt ? sorry running out of ideas now ...
[ 5.146276] Freeing alternatives memory: 44K (ffffffc000a6b000 - ffffffc000a76000)
+ exec
+ mkdir -p /sys /proc
+ echo_dbg Making /sys...
+ echo -e \033[01;32mMaking /sys...\033[00m
Making /sys...
+ mount -t sysfs -o nodev,noexec,nosuid none /sys
+ echo_db[ 5.177871] mmc0: MAN_BKOPS_EN bit is not set
g Making /proc...
+ echo -e \033[01;32mMaking /proc...\033[00m
Making /proc...
+ mount -t proc -o nodev,noexec,nosuid none /proc
+ wait_detect_emmc
+ local devname=/dev/mmcblk0p
+ local emmc_all_partition_exist=1
+ seq 6
+ emmc_all_par[ 5.202103] mmc0: new HS200 MMC card at address 0001
[ 5.205139] mmcblk0: mmc0:0001 Q2J54A 3.64 GiB
[ 5.210123] mmcblk0rpmb: mmc0:0001 Q2J54A partition 3 512 KiB
[ 5.215828] GPT: device [179:4] (rootfs) set to be root filesystem
[ 5.220213] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9
tition_exist=1
+ [ ! -e /dev/mmcblk0p1 ]
+ emmc_all_partition_exist=0
+ break
+ [ 0 -eq 0 ]
+ sleep 1
+ echo_dbg sleep 1 wait for emmc device /dev/mmcblk0p1
+ echo -e \033[01;32msleep 1 wait for emmc device /dev/mmcblk0p1\033[00m
sleep 1 wait for emmc device /dev/mmcblk0p1
+ seq 6
+ emmc_all_partition_exist=1
+ [ ! -e /dev/mmcblk0p1 ]
+ emmc_all_partition_exist=1
+ [ ! -e /dev/mmcblk0p2 ]
+ emmc_all_partition_exist=1
+ [ ! -e /dev/mmcblk0p3 ]
+ emmc_all_partition_exist=1
+ [ ! -e /dev/mmcblk0p4 ]
+ emmc_all_partition_exist=1
+ [ ! -e /dev/mmcblk0p5 ]
+ emmc_all_partition_exist=1
+ [ ! -e /dev/mmcblk0p6 ]
+ [ 1 -eq 0 ]
+ break
+ [ 1 -eq 0 ]
+ mount_rootfs
+ get_current_fw_entry
+ fw_printenv
+ grep current_entry
+ awk -F= {print $2}
+ local current_entry=1
+ [ x1 = x ]
+ echo 1
+ local current_entry=1
+ local dev_rootfs=
+ [ 1 = 0 ]
+ [ 1 = 1 ]
+ findfs PARTLABEL=rootfs_1
+ dev_rootfs=/dev/mmcblk0p5
+ echo_dbg rootfs boot from rootfs_1
+ echo -e \033[01;32mroo[ 6.542780] EXT4-fs (mmcblk0p5): couldn't mount as ext3 due to feature incompatibilities
[ 6.549581] EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
tfs boot from rootfs_1\033[00m
rootfs boot from rootfs_1
+ mkdir -p /mnt/rootfs
+ mount -o ro /dev/mmcblk0p5 /mnt/rootfs
+ mount_rootfs_data
+ findfs PARTLABEL=rootfs_data
+ local dev_rootfs_data=/dev/mmcblk0p9
+ echo_dbg rootfs data: /dev/mmcblk0p9
+ echo -e \033[01;32mrootfs data: /dev/mmcblk0p9\033[00m
rootfs data: /dev/mm[ 6.906493] EXT4-fs (mmcblk0p9): couldn't mount as ext3 due to feature incompatibilities
cblk0p9
+ [ x/dev/mmcblk0p9 != x ]
+ [ -e /dev/mmcblk0p9 ]
+ blkid /dev/mmcblk0p9
+ grep -q ext4
+ echo_dbg Mount rootfs data to /mnt/rootfs_data
+ echo -e \033[01;32mMount rootfs data to /mnt/rootfs_data\033[00m
Mount rootfs data to /mnt/rootfs_data
+ mkdir -p /mnt/rootfs_data
+ mount /dev/mmcblk0p9 /mnt/rootfs_data
[ 7.263342] EXT4-fs (mmcblk0p9): recovery complete
[ 7.266953] EXT4-fs (mmcblk0p9): mounted filesystem with ordered data mode. Opts: (null)
+ [ ! -d /mnt/rootfs_data/etc ]
+ [ -e /mnt/rootfs_data/etc/reset_to_default ]
+ mount_usr_squahsfs
+ echo_dbg Mount usr.squahsfs to /mnt/rootfs_data/usr
+ echo -e \033[01;32mMount usr.squahsfs to /mnt/rootfs_data/usr\033[00m
Mount usr.squahsfs to /mnt/rootfs_data/usr
+ [ ! -d /mnt/rootfs_data/usr ]
+ mount -t squashfs -o ro,loop /mnt/rootfs/usr.squashfs /mnt/rootfs_data/usr
+ check_and_restore_ubootenv
+ mount_reserved
+ findfs PARTLABEL=reserved
[ 7.467295] random: nonblocking pool is initialized
+ dev_reserved=/dev/mmcblk0p8
+ echo_dbg reserved partition from reserved
+ echo -e \033[01[ 7.638790] EXT4-fs (mmcblk0p8): couldn't mount as ext3 due to feature incompatibilities
;32mreserved partition from reserved\033[00m
reserved p[ 7.655030] EXT4-fs (mmcblk0p8): mounted filesystem with ordered data mode. Opts: (null)
artition from reserved
+ mkdir -p /mnt/reserved
+ mount -o ro /dev/mmcblk0p8 /mnt/reserved
+ [ -e /mnt/reserved/uboot-env.bin ]
+ fw_printenv
+ grep BMAC
+ awk -F= {print $2}
+ local BMAC=xx
+ fw_printenv
+ grep MN
+ awk -F= {print $2}
+ local MN=A03
+ fw_printenv
+ grep QSN
+ awk -F= {print $2}
+ local QSN=xx
+ fw_printenv
+ grep FWMode
+ awk -F= {print $2}
+ local FWMode=Normal
+ [ x245EBE530553 == x ]
+ [ xA03 == x ]
+ [ xx== x ]
+ [ xNormal == x ]
+ umount /mnt/reserved
+ get_fw_mode
+ fw_printenv
+ grep FWMode
+ awk -F= {print $2}
+ local FWMode=Normal
+ [ xNormal = x ]
+ echo Normal
+ fw_mode=Normal
+ [ Normal == Normal ]
+ fw_printenv
+ grep ipaddr
+ ipaddr_found=
+ [ x != x ]
+ fw_printenv
+ grep serverip
+ serverip_found=
+ [ x != x ]
+ fw_printenv
+ grep tftptimeoutcountmax
+ tftptimeoutcountmax_found=
+ [ x != x ]
+ echo watchdog close null
+ echo exit 0
+ mount --move /sys /mnt/rootfs_data/sys
+ mount --move /proc /mnt/rootfs_data/proc
+ mount --move /dev /mnt/rootfs_data/dev
+ add_necessary_rootfs
+ [ ! -d /mnt/rootfs_data/run ]
+ mount -t tmpfs tmpfs /mnt/rootfs_data/run
+ [ ! -L /mnt/rootfs_data/var/run ]
+ mkdir -p /mnt/rootfs_data/run/lock
+ [ ! -L /mnt/rootfs_data/var/lock ]
+ [ ! -L /mnt/rootfs_data/etc/rc.common ]
+ [ ! -L /mnt/rootfs_data/etc/preinit ]
+ [ ! -L /mnt/rootfs_data/etc/hotplug-preinit.json ]
+ [ ! -L /mnt/rootfs_data/etc/hotplug.json ]
+ [ false = true ]
+ echo_dbg Switch to real root file system
+ echo -e \033[01;32mSwitch to real root file system\033[00m
Switch to real root file system
+ exec switch_root /mnt/rootfs_data /sbin/init
I am trying to install mwan3 on a build from ipq807x-5.15-pr and noticed that mwan3 requires the following dependencies.
I tried to resolve the issue by adding the following dependencies before the "make defconfig" stage.
CONFIG_PACKAGE_kmod-ipt-ipset
CONFIG_PACKAGE_iptables-mod-conntrack-extra
CONFIG_PACKAGE_iptables-mod-ipopt
CONFIG_PACKAGE_kmod-ip6tables
The build succeeds but the qhora becomes unresponsive after flashing the resulting build. I repeated the build process without adding the above dependencies and the resulting build works just fine.
Can the above dependencies be added to ipq807x-5.15-pr, anyone had success with that?
Has anyone here successfully installed mwan3 on ipq807x-5.15 build.?
so after a lot of juggling and thinking between using a preinit script or something else ... I thought to use the simplest ... /etc/config/fstab as mount_root checks first for block and attempts to load the fstab
my plan is to during upgrade update the fstab with the right rootfs (mount it on /rom) and then copy the contents to /dev/mmcblk0p9 (rootfs_data)
however any reason for using a loop device at the moment ? and instead during upgrade update mmcblk0p9 which is the true rootfs_data?
eth5 on wan
has anyone been able to use eth5 on wan ?
I am using mwan3 with both eth4 and eth5 assigned to wan using veth devices (veth4 and veth5). I only get veth4 assigned an IP.
both the ax3600 and dynalink use the same use case and get ip's from the ISP
I dont think that one works in 1G for some reason
what is weird is that the Advertised link modes + link partner advertised modes match on capabilities!
I know, PHY itself is in 1G mode but one of the 2 AQR113C wont work in 1G, no idea why
@rmandrad are you running mwan3 on ipq807x-5.15?
If so, could you help with some information on the selected kmods during the build process. I have had multiple attempts but unable to add the following mwan3 kmod dependencies shown below.
CONFIG_PACKAGE_kmod-ipt-ipset
CONFIG_PACKAGE_iptables-mod-conntrack-extra
CONFIG_PACKAGE_iptables-mod-ipopt
CONFIG_PACKAGE_kmod-ip6tables
An attempt to include any of the above results to a non responsive router after the flash
Could you provide more info regarding how you got your mwan3 to work
Hi @TempestJunior yes a fork of 5.15 & I use menuconfig at the moment ... select the luci mwan3 package