Netgear X10 (R9000)

that works too :slight_smile: just don't use luci, it's broken for some reason. probably because of our crazy switch setup with master/slave.

Any explanation to why the vlans don't have names?

Wiki says that it should look something like:

config 'switch_vlan' 'eth0_3'
        option 'device' 'eth0'
        option 'vlan' '3'
        option 'ports' '3t 4t'

I know the wiki isn't always 100% accurate but its seldom wrong about naming.

Could that be why Luci isn't parsing it?

hmm, that's good a question, i have this problem as well. need to check this. thanks.

1 Like

My VLAN setup works, VLAN DHCP client is getting IP from external DHCP server.

VLAN 1:
        vid: 1
        ports: 0t 4 6
VLAN 2:
        vid: 2
        ports: 3 5t
VLAN 3:
        vid: 3
        ports: 1 5t
VLAN 4:
        vid: 4
        ports: 2 5t
root@OpenWrt:~# ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether cc:40:d0:33:a1:37 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether cc:40:d0:33:a1:36 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::ce40:d0ff:fe33:a136/64 scope link
       valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 1a:ca:8b:5d:58:dc brd ff:ff:ff:ff:ff:ff
    inet6 fe80::18ca:8bff:fe5d:58dc/64 scope link
       valid_lft forever preferred_lft forever
6: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 4000
    link/ether b8:d7:af:be:23:9f brd ff:ff:ff:ff:ff:ff
8: wlan2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:03:7f:12:34:56 brd ff:ff:ff:ff:ff:ff
9: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether cc:40:d0:33:a1:36 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 fd09:d3e5:4653::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 fe80::ce40:d0ff:fe33:a136/64 scope link
       valid_lft forever preferred_lft forever
10: eth1.1@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP group default qlen 1000
    link/ether cc:40:d0:33:a1:36 brd ff:ff:ff:ff:ff:ff
11: eth2.2@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 1a:ca:8b:5d:58:dc brd ff:ff:ff:ff:ff:ff
    inet6 fe80::18ca:8bff:fe5d:58dc/64 scope link
       valid_lft forever preferred_lft forever
12: eth2.3@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 1a:ca:8b:5d:58:dc brd ff:ff:ff:ff:ff:ff
    inet6 fe80::18ca:8bff:fe5d:58dc/64 scope link
       valid_lft forever preferred_lft forever
13: eth2.4@eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 1a:ca:8b:5d:58:dc brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.116/24 brd 192.168.2.255 scope global eth2.4
       valid_lft forever preferred_lft forever
    inet6 fe80::18ca:8bff:fe5d:58dc/64 scope link
       valid_lft forever preferred_lft forever

Also, adding the name made things much easier. The VLAN device was in the list ready to go.


config switch_vlan
        option name 'eth2.3'
        option device 'switch0'
        option vlan '3'
        option ports '1 5t'

config switch_vlan
        option name 'eth2.4'
        option device 'switch0'
        option vlan '4'
        option ports '2 5t'

I am rebooting it now. Lets see what happens.

1 Like

DHCP leaked again.

I am ready for the next step.
If I recall correctly:
1, Backup.
2, Mess with things.
3, Hope for the best.

ok, can i upload your uboot env here then ?
please do backup of nand then first and transfer the backups to your PC of course :slight_smile:

Sure.

I just need to get nanddump working to make a backup and also see if I can back it up to some place which doesn't get overwritten.

Ah, perhaps that is a package I should have added before I built.

just compile the package and install, you don't have to rebuilt the whole image again. advantages of NAND :slight_smile:

You underestimate my lack of knowledge but willingness to learn.

Don't get me wrong, I can do it. But I have never done it :smiley:
Let me see what's what - internet has everything.

compiling goes like this:
make V=sc -j$(($(nproc)+1)) package/mtd-utils/compile

edit1: nand-utils -> mtd-utils :frowning:

That worked.
However I have no idea where the files not are.

I assumed they were in the make directory and the filename was mtd-utils-2.1.2.tar.bz2, but that produced an error Segmentation fault.
Haha, I have no idea what I'm doing :smiley:

i'm trying to figure it out myself :rofl: i don't use very often. wiki seems to be a bit outdated wrt building a single package.

try to add it via menuconfig (nand-utils) as a module (M), and then just rebuild the image, this should built the package.

Sure, I'll be back in a Flash... so to say.

nah, just copy the built ipkg per ssh to your device and use opkg install <path to package on file system>

all built packages can be found here: bin/targets/alpine/generic/packages

ls -l bin/targets/alpine/generic/packages/nand-utils_2.1.2-1_arm_cortex-a15_neon-vfpv4.ipk

1 Like

It's on it's way.
Compiling.

Btw, any possibility I can contribute on compiling all available packages for this device or is that done by some central server in a land far-far away? I have about 20 cores & 180GB RAM on a server that are mostly idle which I could use for this task.

currently we have nothing at all where to build or upload built packages and factory images. i think not everyone is able to compile it. i don't mind building it myself, i need anyways for development but for regular users is of course impractical to build it every time after update.

i'm not asking anyone to do this, but i would welcome it if you want to offer something like this. it would probably help many other users if not me :slight_smile:

I have no issues doing this, it would be the least I could do for OpenWRT community.
I mean if a config could be built with all packages then its just a matter of time per release.

Any idea where this could be put? I know there is an official place for factory and sysupgrade images but I have no idea how to get a release inside there.

It we get the switch stuff working then ill put another Dropbox link here.

Done:
image

I'm not very familiar with that, the problem is this is an unofficial hw and not sure whether OpenWRT will accept our packages and releases.

You can proceed with dumping of your NAND partitions.
All partitions are listed here: cat /proc/mtd. Just dump the first 4 partitions, the others contain just OpenWRT images.

I'll upload the uboot env in the meantime.

Just trying to figure out how to get the dump out of the router.
I have a USB Flash drive in it, but I cant recall how to mount stuff :smiley:

Edit: I cant post any more reply messages. Forum has limited me.
I am going to try the UBoot stuff and if it fails/works I wont be able to post a reply until after 14 hours according the the rules.

u-boot env script:

arch arm
autoload n
baudrate 115200
board alpine_hw29765235p0p512p1024p4x4p4x4_32_db
board_name alpine_hw29765235p0p512p1024p4x4p4x4_32_db
bootargs console=ttyS0,115200 pci=pcie_bus_perf earlycon
bootargshd run rootargshd; setenv bootargs $rootargs pci=pcie_bus_perf console=ttyS0,115200 $bootargsextra; printenv bootargs
bootargsnand run rootargsnand; setenv bootargs $rootargs pci=pcie_bus_perf console=ttyS0,115200 $bootargsextra; printenv bootargs
bootargsnfs run rootargsnfs; setenv bootargs $rootargs pci=pcie_bus_perf console=ttyS0,115200 $bootargsextra; printenv bootargs
bootcmd nmrp;run check_dni_image;run bootargsnand;qca8337_init_one; ledtoggle;sleep 1;run bootnand
bootdelay 2
bootext4 lcd_print "Loading OS...";scsi init; ext4load scsi ${ext4dev}:${ext4part} $loadaddr ${ext4dir}${dt_filename};if test $? -ne 0; then run fail; exit; fi;if test ${dt_is_from_toc} != 1; then; else flash_contents_obj_read_mem $loadaddr_dt $loadaddr;if test $? -ne 0; then run fail; exit; fi;fi;ext4load scsi ${ext4dev}:${ext4part} $loadaddr ${ext4dir}uImage;if test $? -ne 0; then run fail; exit; fi;fdt addr $loadaddr_dt;bootm $loadaddr - $fdtaddr;run fail; exit
bootnand lcd_print "Loading OS...";nand set_partition_offset $nand_pt_addr_kernel;nand read $loadaddr $nand_pt_addr_kernel 4;setenvmem filesize $loadaddr;incenv filesize 4;nand read $loadaddr $nand_pt_addr_kernel $filesize;ledtoggle;nand set_partition_offset $nand_pt_addr_al_boot;bootm $loadaddr_payload - $fdtaddr;lcd_print Failed!
bootnandmulti run kernel_select;if test $kernel_selected -ne 0; then run bootnand; fi
boottftp lcd_print "Loading OS...";tftpboot $loadaddr ${tftpdir}${dt_filename};if test $? -ne 0; then run fail; exit; fi;if test ${dt_is_from_toc} != 1; then; else flash_contents_obj_read_mem $loadaddr_dt $loadaddr;if test $? -ne 0; then run fail; exit; fi;fi;tftpboot $loadaddr ${tftpdir}uImage;if test $? -ne 0; then run fail; exit; fi;fdt addr $loadaddr_dt;bootm $loadaddr - $fdtaddr;run fail; exit
bootupd is_nand_boot; if test $? -eq 0; then run bootupdspi; else; run bootupdnand; fi
bootupdnand lcd_print "Updating al-boot" "to NAND"; tftpboot $loadaddr ${tftpdir}boot.img; if test $? -ne 0; then run fail; exit; fi;nand set_partition_offset $nand_pt_addr_al_boot;nand erase.spread $nand_pt_addr_al_boot $filesize; nand write $loadaddr $nand_pt_addr_al_boot $filesize; lcd_print "Done"
bootupdnandy lcd_print "Updating al-boot" "to NAND"; echo >> Use YModem to upload the boot image binary...;loady $loadaddr;if test $? -ne 0; then run fail; exit; fi;nand set_partition_offset $nand_pt_addr_al_boot;nand erase.spread $nand_pt_addr_al_boot $filesize; nand write $loadaddr $nand_pt_addr_al_boot $filesize; lcd_print "Done"
bootupdspi lcd_print "Updating al-boot" "to SPI"; tftpboot ${loadaddr} ${tftpdir}boot.img; if test $? -ne 0; then run fail; exit; fi;sf probe; sf erase 0 +${filesize}; sf write ${loadaddr} 0 ${filesize}; echo bootupd done;echo Notice: Changes in default environment variables will only take effect once the;echo environment variables are deleted from flash using the 'delenv' script;lcd_print "Done"
bootupdspiy lcd_print "Updating al-boot" "to SPI"; echo >> Use YModem to upload the boot image binary...;loady ${loadaddr};if test $? -ne 0; then run fail; exit; fi;sf probe; sf erase 0 +${filesize}; sf write ${loadaddr} 0 ${filesize}; echo bootupd done;echo Notice: Changes in default environment variables will only take effect once the;echo environment variables are deleted from flash using the 'delenv' script;lcd_print "Done"
bootupdy is_nand_boot; if test $? -eq 0; then run bootupdspiy;else; run bootupdnandy; fi
check_dni_image lcd_print "Loading DNI firmware for checking...";nand set_partition_offset $nand_pt_addr_kernel;ledtoggle;loadn_dniimg 0 $nand_pt_addr_kernel $loadaddr;ledtoggle;calc_rootaddr $nand_pt_addr_kernel $loadaddr;nand set_partition_offset $nand_pt_addr_al_boot;setenv kernel_addr_for_fw_checking $loadaddr;incenv kernel_addr_for_fw_checking 4;iminfo $kernel_addr_for_fw_checking;if test $? -ne 0; then echo "linux checksum error";fw_recovery; fi;ledtoggle;iminfo $rootfs_addr_for_fw_checking;if test $? -ne 0; then echo "rootfs checksum error";fw_recovery; fi;ledtoggle;lcd_print Failed!
cpu armv7
cvos_tags 0x01000000
cvos_tags_seed_a 0x01000004
cvos_tags_seed_b 0x01000008
cvos_tags_validate mw.l ${cvos_tags} 0xcf05cf05
delenv is_nand_boot; if test $? -eq 0; then run delenvspi; else; run delenvnand; fi
delenvnand lcd_print "Deleting env..."; nand erase ${env_offset} 2000; if test -n ${env_offset_redund}; then nand erase ${env_offset_redund} 2000; fi;lcd_print "Done"
delenvspi lcd_print "Deleting env..."; sf probe; sf erase ${env_offset} +2000;if test -n ${env_offset_redund}; then sf erase ${env_offset_redund} +2000;fi;lcd_print "Done"
dtupd is_nand_boot; if test $? -eq 0; then run dtupdspi; else; run dtupdnand; fi
dtupdnand lcd_print "Updating DT" "to NAND"; tftpboot $loadaddr_dt ${tftpdir}${dt_filename};if test $? -ne 0; then run fail; exit; fi;if test ${dt_is_from_toc} != 1; then; else flash_contents_obj_read_mem $loadaddr $loadaddr_dt;if test $? -ne 0; then run fail; exit; fi;fi;nand set_partition_offset $nand_pt_addr_al_boot;nand erase.spread ${dt_location} 10000; nand write ${loadaddr_dt} ${dt_location} 10000; lcd_print "Done"
dtupdnandy lcd_print "Updating DT" "to NAND"; echo >> Use YModem to upload the device tree binary...;loady $loadaddr_dt;if test $? -ne 0; then run fail; exit; fi;if test ${dt_is_from_toc} != 1; then; else flash_contents_obj_read_mem $loadaddr $loadaddr_dt;if test $? -ne 0; then run fail; exit; fi;fi;nand set_partition_offset $nand_pt_addr_al_boot;nand erase.spread ${dt_location} 10000; nand write ${loadaddr_dt} ${dt_location} 10000; lcd_print "Done"
dtupdspi lcd_print "Updating DT" "to SPI"; tftpboot $loadaddr_dt ${tftpdir}${dt_filename};if test $? -ne 0; then run fail; exit; fi;if test ${dt_is_from_toc} != 1; then; else flash_contents_obj_read_mem $loadaddr $loadaddr_dt;if test $? -ne 0; then run fail; exit; fi;fi;sf probe; sf erase ${dt_location} +${filesize}; sf write ${loadaddr_dt} ${dt_location} ${filesize};echo dtupd done;lcd_print "Done"
dtupdspiy lcd_print "Updating DT" "to SPI"; echo >> Use YModem to upload the device tree binary...;loady $loadaddr_dt;if test $? -ne 0; then run fail; exit; fi;if test ${dt_is_from_toc} != 1; then; else flash_contents_obj_read_mem $loadaddr $loadaddr_dt;if test $? -ne 0; then run fail; exit; fi;fi;sf probe; sf erase ${dt_location} +${filesize}; sf write ${loadaddr_dt} ${dt_location} ${filesize}; echo dtupd done;lcd_print "Done"
dtupdy is_nand_boot; if test $? -eq 0; then run dtupdspiy; else; run dtupdnandy; fi
eepromupd confirm_msg "Perform EEPROM update? [y/n] ";if test $? -ne 0; then exit; fi;tftpboot ${tftpdir}eeprom.bin;if test $? -ne 0; then exit; fi;i2c probe ${pld_i2c_addr};if test $? -ne 0; then exit; fi;i2c write $fileaddr ${pld_i2c_addr} 0.2 $filesize;if test $? -ne 0; then exit;fi;echo eepromupd done
eepromupdy confirm_msg "Perform EEPROM update? [y/n] ";if test $? -ne 0; then exit; fi;echo >> Use YModem to upload the EEPROM binary...;loady $loadaddr;if test $? -ne 0; then exit; fi;i2c probe ${pld_i2c_addr};if test $? -ne 0; then exit; fi;i2c write $loadaddr ${pld_i2c_addr} 0.2 $filesize;if test $? -ne 0; then exit;fi;echo eepromupdy done
eth1addr CC:40:D0:33:A1:36
eth3addr 8A:D0:A1:12:26:A5
ethact al_eth1
ethaddr CC:40:D0:33:A1:37
ethprime al_eth1
ext4dev 0
ext4dir boot/
ext4part 1
fail echo Failed!; lcd_print "Failed!"
hdroot /dev/sda1
iocc_force 1
iocc_force_val 1
ipaddr 192.168.1.1
kernel_rename_1 editenv nand_pt_desc_kernel_1;saveenv
kernel_rename_2 editenv nand_pt_desc_kernel_2;saveenv
kernel_select_1 setenv nand_pt_addr_kernel ${nand_pt_addr_kernel_1};setenv kernel_selected 1
kernel_select_2 setenv nand_pt_desc_kernel ${nand_pt_desc_kernel_2};setenv nand_pt_addr_kernel ${nand_pt_addr_kernel_2};setenv nand_pt_desc_kernel_2 ${nand_pt_desc_kernel_1};setenv nand_pt_addr_kernel_2 ${nand_pt_addr_kernel_1};setenv nand_pt_desc_kernel_1 ${nand_pt_desc_kernel};setenv nand_pt_addr_kernel_1 ${nand_pt_addr_kernel};saveenv;setenv kernel_selected 2
kernel_select setenv kernel_selected 0;setenv bootmenu_0 ${nand_pt_desc_kernel_1}=run kernel_select_1;setenv bootmenu_1 ${nand_pt_desc_kernel_2}=run kernel_select_2;bootmenu
kernelupd lcd_print "Updating kernel...";tftpboot $loadaddr_payload ${tftpdir}uImage;if test $? -ne 0; then run fail; exit; fi;nand set_partition_offset $nand_pt_addr_kernel;mw.l $loadaddr $filesize;incenv filesize 4;nand erase.spread $nand_pt_addr_kernel $filesize;nand write $loadaddr $nand_pt_addr_kernel $filesize;nand set_partition_offset $nand_pt_addr_al_boot;echo kernelupd done;lcd_print "Done"
loadaddr 0x08000000
loadaddr_dt 0x07000000
loadaddr_payload 0x08000004
loadaddr_rootfs_chk 0x07000000
nand_pt_addr_al_boot 0x0
nand_pt_addr_fs 0x01000000
nand_pt_addr_kernel 0x00580000
nand_pt_addr_kernel_1 0x00400000
nand_pt_addr_kernel_2 0x00a00000
nand_pt_desc_kernel_1 Test kernel A
nand_pt_desc_kernel_2 Test kernel B
nand_pt_size_fs 0x1f000000
nand_pt_size_kernel 0x00c00000
netmask 255.255.255.0
nfsrootdir /srv/root/
preboot 
rootargshd setenv rootargs root=${hdroot} rw
rootargsnand setenv rootargs root=ubi0:root rootfstype=ubifs ubi.mtd=3
rootargsnfs setenv rootargs root=/dev/nfs rw nfsroot=${serverip}:${nfsrootdir},tcp,nolock rw ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${board_name}:eth1:none
rootfsupd lcd_print "Updating rootfs...";tftpboot $loadaddr_rootfs_chk ${tftpdir}rootfs.ubi.md5;if test $? -ne 0; then run fail; exit; fi;tftpboot $loadaddr ${tftpdir}rootfs.ubi;if test $? -ne 0; then run fail; exit; fi;md5sum -v $loadaddr $filesize *$loadaddr_rootfs_chk;if test $? -ne 0; then run fail; exit; fi;nand set_partition_offset $nand_pt_addr_fs;nand erase.spread $nand_pt_addr_fs $nand_pt_size_fs;nand write $loadaddr $nand_pt_addr_fs $filesize;nand set_partition_offset $nand_pt_addr_al_boot;echo rootfsupd done;lcd_print "Done"
serverip 192.168.1.10
skip_eth_halt 0
soc alpine_hw29765235p0p512p1024p4x4p4x4
vendor annapurna-labs

Put this into a file, copy the file to the device and then run this:
fw_setenv --script <path to the file>
Then do NOT reboot yet.
Verify that the env can be read with fw_printenv.

1 Like