Target build help IPQ40x9 (Wally's 4029)

Hi I'm Trying to build Openwrt for my Wally's dr4029, I have found a repo with the device definition's for my router and a few hardware related patches.

https://github.com/sartura/openwrt/tree/DR40X9.

I have created by build enviroment and cloned the git and update it:
git clone of https://github.com/sartura/openwrt.git
./scripts/feeds update -a
./scripts/feeds install -a

I have then run make menuconfig but i dont see the option of the wally's router included in the target in the menu as defined by this commit:

Is there something I'm doing wrong?

You need to checkout the correct branch

1 Like

Ok I was thinking that was the case but how do I do I pick a branch to checkout it just seems to check out the main branch?

Simpy use git checkout after cloning

1 Like

I managed to checkout the correct branch and could configure the build settings but it fails during compilation with:

find /home/professor_jonny/openwrt/build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/root-ipq40xx/ -mindepth 1 -execdir touch -hcd "@1603528583" "{}" +
find: The relative path 'Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2020.812.0_x64__79rhkp1fndgsc' is included in the PATH environment variable, which is insecure in combination with the -execdir action of find.  Please remove that entry from $PATH
make[2]: *** [package/Makefile:72: package/install] Error 1
make[2]: Leaving directory '/home/professor_jonny/openwrt'
make[1]: *** [package/Makefile:109: /home/professor_jonny/openwrt/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.package_install] Error 2
make[1]: Leaving directory '/home/professor_jonny/openwrt'
make: *** [/home/professor_jonny/openwrt/include/toplevel.mk:236: world] Error 2

Sorry, I dont use Windows nor WSL at all.

I think I have found some information reguarding WSL that is not explained in the build guide, I will go through this and see if it works
OpenWrt Project: Windows Subsystem for Linux (WSL)

For some reason WSL.conf seems to ignore the apended Path and exporting a Path fixed the error.
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

This sorted my problem and the image built successfully.

hI professor_jonny
I tried to compile the image from your repo and it built successfully but when I do an upgrade by sysupgrade the boot halt and when I check the boot env it seems changed did you meet this issue before

here the boot log when it charches
Creating 1 MTD partitions on "nand0":
0x000000000000-0x000004000000 : "mtd=0"
UBI: attaching mtd2 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd2
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22
qca_mmc: 0
(IPQ40xx) # printenv
baudrate=115200
bootargs=ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait
bootcmd=bootipq
bootdelay=10
ethact=eth0
fdt_high=0x87000000
flash_type=0
fsbootargs=ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs
ipaddr=192.168.10.2
machid=8010006
mtddevname=fs
mtddevnum=0
mtdids=nand0=nand0
mtdparts=mtdparts=nand0:0x4000000@0x0(fs),
partition=nand0,0
serverip=192.168.10.67
stderr=serial
stdin=serial
stdout=serial

Did you install over the factory image from wallys and follow the instructions in the readme on my github?

You need to install wallys2openwrt.img via tftpboot in uboot and run the install script.
Then first install the factory image.

Alternatively you can boot a ram based image then install via sysupgrade, but i have never tried this method.

You may also need to alter the dts if your nand size differs, uboot needs fixing and it is beyond my skills.

with TFTP and ubi image it works without any problem but when I did an upgrade using web interface and .bin extension the problem occurs

What size is your flash nor and nand.

And can you show log of installing via tftp with image

You may need to edit qcom-ipq40x9-dr40x9.dts as below to suit nand size below is for 256mb nands:

	nand@0 {
		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "ubi";
				reg = <0x00000000 0x08000000>;
			};
		};

change it to this for 128 mb nands:

reg = <0x00000000 0x04000000>;

Yeah it got it I changed it to
partition@0 {
label = "ubi";
reg = <0x00000000 0x04000000>;
};
and it upgrades now, the mistake that i changed your file sorry xD
thank you very much

I had the same issue, uboot on this board is designed for qsdk compatable images of the reference design, and the second half of the nand is reserved or something within .

MIBIB does not parse the partition setup from what I believe and the nand is incorectly formatted and it fails image checks.

@professor_jonny

Commit

I made my own build and patched in dsa support
professor-jonny/pj_openwrt: This repository is designed to support the wallystech DR40x9 Routerboard with DSA in mind. (github.com)

@professor_jonny
Which is why I'm contacting you :slight_smile:

I noticed that improvement and added it into the patch.
Can I have your SoB if thats ok for you so I can credit your work :slight_smile:

Thanks!

Sorry I dont know what a SoB is I'm not up with the slang.

You can credit my work but I only made simple patches to already existing work by rob to make it work with dsa and nft and make the fibre port work.

Problem is with wallystech they made several models of boards with differing nand sizes and this build would only support one version and cut off the rest of the flash for versions with large flash available than my base model.

They also made versions with different sizes of norflash.

Someone really needs to fix the uboot to parse partition info on or make multiple varints to properly support128 256 and 512mb variants of the boards.

Offically my board is 128mb but I can only access 64mb of flash because of the uboot and qsdk madness.

I would like to know if the SFP slot works, and if there is i2c hooked up to be able to read the SFP module eeprom. Mostly to be able to check fibre TX and RX values.

Thank you.

I don’t believe there i2c support rob marco added support for it sfp with kernel patched if his driver is good it should work it is included in my repo.
I dont have a board to test it my unit is without fibre.

I can ask jason (owener of wallys tech) for scematics etc but i believe it is based on the reference design, i was only intrested in sim switching schematics and gpio for it as my board had missing components from the factory.

Okay, thanks.
Yes, cannot tell or test if not on your board.
I can see on the Wally's DR40X9 web page no reference to the SFP gpios or i2c, but it does say SFP is optional.

I remember Robi mentioning SFP when talking about the DSA ESS driver, and I thought I remembered something (maybe a commit log for the DSA driver) about not needing hacky SFP (guessing SFP support without the mod-def0, etc. gpios being connected) compared to the reference driver. If ipq40xx SFP reference design lacks the normal SFP gpios & i2c, I will probably continue to avoid it, unfortunately. See if @robimarko can provide us with extra insight?