I want to roll back to the original zyxel firmware from openwrt, however doing this on ssh by trying to flash the firmware :

mtd -r write xxx.bin firmware

It comes back with an error saying can't open device for writing. then i listed the partitions and it came out :

mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "env"
mtd2: 00010000 00010000 "RFdata"
mtd3: 003a0000 00010000 "nbu"
mtd4: 00200000 00020000 "zyxel_rfsd"
mtd5: 00200000 00020000 "romd"
mtd6: 00100000 00020000 "header"
mtd7: 00200000 00020000 "kernel"
mtd8: 07900000 00020000 "ubi"

Where should i flash the firmware in this case?