Finally i got OpenWRT on my SIP-1080P camera! Sources in my fork: openwrt-davinci.git.

Installation

After building OpenWRT we need to flash firmware via TFTP. You must setup tftp server and place to tftpboot uImage and ubinized rootfs images. Also current uImage require aligning to NAND erase size, done by dd.

$ sudo cp bin/davinci/openwrt-davinci-dm36x-TS38F2-uImage bin/davinci/openwrt-davinci-dm36x-TS38F2-squashfs-ubinized.bin /srv/tftp
$ dd if=bin/davinci/openwrt-davinci-dm36x-TS38F2-uImage of=/srv/tftp/openwrt-davinci-dm36x-TS38F2-uImage bs=128k conv=sync

Prepare installation script

#
# Automatic installation script for TS38F2
#

echo *** Installing OpenWRT to TS38F2

setenv kernelfile openwrt-davinci-dm36x-TS38F2-uImage
setenv rootfsfile openwrt-davinci-dm36x-TS38F2-squashfs-ubinized.bin

# this parameters must match built-in kernel mtd partitions
setenv kernelnaddr 0x400000
setenv kernelnsize 0x800000
setenv rootfsnaddr 0xc00000

echo *** Installing kernel: $(kernelfile)
tftp 0x82000000 $(kernelfile)
nand erase $(kernelnaddr) $(kernelnsize)
nand write $(fileaddr) $(kernelnaddr) $(filesize)

echo *** Installing UBI rootfs: $(rootfsfile)
tftp 0x82000000 $(rootfsfile)
nand erase $(rootfsnaddr)
nand write $(fileaddr) $(rootfsnaddr) $(filesize)

echo *** Original U-Boot environment:
printenv
echo
echo *** Modifying U-Boot environment.

setenv bootcmd  nboot 0x80700000 0 \$(kernelnaddr)\; bootm 0x80700000
setenv bootargs 55M console=ttyS0,115200n8 eth=$(ethaddr) ro rootfstype=squashfs
saveenv
echo *** New environment:
printenv
echo
echo *** Done. Enter \"reset\" to boot new firmware.

Make autoscr image:

$ grep -ve '^#' install-ts38f2.scr > /tmp/instwrt.scr
$ mkimage -A arm -O u-boot -T script -C none -n "OpenWRT Installer" -d /tmp/instwrt.scr instwrt.uscr
$
$ sudo cp instwrt.uscr /srv/tftp

Setup U-Boot network && save original bootargs

DM368 IPNC :>setenv serverip 192.168.1.22
DM368 IPNC :>setenv ipaddr 192.168.1.80
DM368 IPNC :>setenv netmask 255.255.255.0
DM368 IPNC :>
DM368 IPNC :>setenv orig_bootargs $(bootargs)
DM368 IPNC :>setenv orig_bootcmd $(bootcmd)

Run installer

DM368 IPNC :>tftp 80700000 instwrt.uscr
DM368 IPNC :>autoscr

See ASCIINema’s

This stream shows autoscr (but i messed with bootargs)

asciinema.org/a/14970

And here i fix env, openwrt on TS38F2

asciinema.org/a/14970

Update: script image generation and uImage aligning now added in build script.