It works for Raspberry Pi but not for Cubox. It wont boot with this boot.scr
$this->bbcode_second_pass_code('', '
setenv bootargs 'console=ttyS0,115200n8 vmalloc=384M root=/dev/mmcblk0p2 video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0'
ext2load mmc 0:1 0x00200000 /boot/uImage
bootm
init=/bin/systemd
')
OR
$this->bbcode_second_pass_code('', '
setenv bootargs 'console=ttyS0,115200n8 vmalloc=384M root=/dev/mmcblk0p2 video=dovefb:lcd0:1920x1080-32@60-edid clcd.lcd0_enable=1 clcd.lcd1_enable=0 init=/bin/systemd'
ext2load mmc 0:1 0x00200000 /boot/uImage
bootm
')
$this->bbcode_second_pass_code('', 'mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n 'Boot setup script for SD' -d bootcmd boot.scr')