20190128_jeffrey - silenceuncrio/diary GitHub Wiki

0850

review

繼續 M300 - Wizard

branch develop - Products/Vendor = M300/16_MTK_WIFI

build image 已完成

mfgtool 燒錄已完成

1000

commit 38e026443b2177c8a08b238dc27a7d701e718da1
Author: jeffrey <[email protected]>
Date:   Mon Jan 28 09:57:21 2019 +0800

    refactoring

 proscend/prosrc/www/app/feature/wizard.html | 75 ++++++++++++++---------------
 1 file changed, 37 insertions(+), 38 deletions(-)

1115

commit 99eb5888f6743c2e85975c6c9d76e19436c0faf7
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Mon Jan 28 11:15:44 2019 +0800

    - use `cgi-bin/system.cgi?act=set` instead of `cgi-bin/system.cgi?act=apply`
    - use '$timeout' to depaly a while between each icos module apply

 proscend/prosrc/webcgi/system.c                  | 69 +++++++++++++++++++++++-
 proscend/prosrc/www/app/feature/wizard.js        | 22 ++++----
 proscend/prosrc/www/app/services/icos.service.js |  3 ++
 3 files changed, 82 insertions(+), 12 deletions(-)

1325

commit 5e102be14d0c4d4881a3da15e163aabe7b18721e
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Mon Jan 28 13:20:17 2019 +0800

    - use `cgi-bin/pppoe.cgi?act=set` instead of `cgi-bin/pppoe.cgi?act=apply`
    - use `cgi-bin/dns.cgi?act=set&index=6` instead of `cgi-bin/dns.cgi?act=apply&index=6`
    - use `cgi-bin/wanst.cgi?act=set` instead of `cgi-bin/wanst.cgi?act=apply`
    - use `cgi-bin/lan_control.cgi?act=set` instead of `cgi-bin/lan_control.cgi?act=apply`
    - use `cgi-bin/sntp.cgi?act=set` instead of `cgi-bin/sntp.cgi?act=apply`
    - use `cgi-bin/wifi_apsta.cgi?act=set` instead of `cgi-bin/wifi_apsta.cgi?act=apply`

 proscend/prosrc/webcgi/dns.c                     | 525 +++++++++++++----------
 proscend/prosrc/webcgi/lan_control.c             |  96 +++++
 proscend/prosrc/webcgi/sntp.c                    | 123 ++++++
 proscend/prosrc/webcgi/wanst.c                   | 269 +++++++-----
 proscend/prosrc/webcgi/wifi_apsta.c              |  59 ++-
 proscend/prosrc/www/app/feature/wizard.js        |  20 +-
 proscend/prosrc/www/app/services/icos.service.js |  15 +
 7 files changed, 773 insertions(+), 334 deletions(-)

apply 個幾次都沒啥問題

wizard 還有幾個步驟的簡單說明我還沒做

索性先把 <p>some description</p> 拿掉

commit b73d4fc1ae56e849a9c027f36f4082cdba177d5b
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date:   Mon Jan 28 13:49:51 2019 +0800

    remove `<p>some description</p>`

 proscend/prosrc/www/app/feature/wizard.html | 10 ----------
 1 file changed, 10 deletions(-)

M300 - Wizard 就先這樣吧

1350

盤一下待作事項

  • M330
    • web server and GUI
    • GRE
    • PPTP
    • RIP 1/2
    • OSPF
    • BGP
  • M300
    • Cisco DMVPN
    • MFG tool with UBI
  • M360
    • Schedule Reboot

盤一下 M300 - MFG tool with UBI 該怎麼作

1730

目前搭配 M300\build_small\images\ubifs.img 以及以下的 ucl2.xml 證實可行

<UCL>
  <CFG>
    <STATE name="BootStrap" dev="MX6SL" vid="15A2" pid="0063"/>
    <STATE name="BootStrap" dev="MX6D" vid="15A2" pid="0061"/>
    <STATE name="BootStrap" dev="MX6Q" vid="15A2" pid="0054"/>
    <STATE name="BootStrap" dev="MX6SX" vid="15A2" pid="0071"/>
    <STATE name="BootStrap" dev="MX6UL" vid="15A2" pid="007D"/>
    <STATE name="BootStrap" dev="MX7D" vid="15A2" pid="0076"/>
    <STATE name="Updater"   dev="MSC" vid="066F" pid="37FF"/>
  </CFG>

  <LIST name="NAND Flash" desc="Choose NAND as media">

  <CMD state="BootStrap" type="boot" 
    body="BootStrap" file ="firmware/u-boot-m300.imx-nand">Loading U-boot</CMD>
  <CMD state="BootStrap" type="load" 
    file="firmware/zImage" address="0x80800000" 
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE" >Loading Kernel.</CMD>
  <CMD state="BootStrap" type="load" 
    file="firmware/%initramfs%" address="0x83800000"
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading Initramfs.</CMD>
  <CMD state="BootStrap" type="load" 
    file="firmware/zImage-imx6ul-%6uldtb%-%nanddtb%.dtb" address="0x83000000"
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading device tree.</CMD>
  <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>

  <!--burn the uboot to NAND: --> 
  <CMD state="Updater" type="push" 
    body="$ mount -t debugfs debugfs /sys/kernel/debug">Mounting debugfs</CMD>
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd0 0 0">Erasing Boot partition</CMD>
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd1 0 0">Erasing Boot env partition</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/u-boot-m300.imx-nand" ifdev="MX6UL">Sending u-boot.bin</CMD>
  <CMD state="Updater" type="push" 
    body="$ kobs-ng init -x -v --chip_0_device_path=/dev/mtd0 $FILE">Flashing Bootloader</CMD>

  <!-- burn the kernel_a -->
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd2 0 0">Erasing Kernel partition A</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/zImage">Sending kernel zImage</CMD>
  <CMD state="Updater" type="push" 
    body="$ nandwrite -p /dev/mtd2 -p $FILE">Flashing Kernel A</CMD>

  <!-- burn the kernel_b -->
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd7 0 0">Erasing Kernel partition B</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/zImage">Sending kernel zImage</CMD>
  <CMD state="Updater" type="push" 
    body="$ nandwrite -p /dev/mtd7 -p $FILE">Flashing Kernel B</CMD>
  
  <!-- burn the dtb_a -->
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd3 0 0">Erasing dtb partition A</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/zImage-imx6ul-14x14-evk.dtb">Sending Device Tree file</CMD>
  <CMD state="Updater" type="push" 
    body="$ nandwrite -p /dev/mtd3 -p $FILE">Flashing dtb A</CMD>

  <!-- burn the dtb_b -->
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd8 0 0">Erasing dtb partition B</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/zImage-imx6ul-14x14-evk.dtb">Sending Device Tree file</CMD>
  <CMD state="Updater" type="push" 
    body="$ nandwrite -p /dev/mtd8 -p $FILE">Flashing dtb B</CMD>



  <!--prepare all ubi device: -->

  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd4 0 0">Erasing rootfs_a partition</CMD>
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd5 0 0">Erasing config_a partition</CMD>
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd9 0 0">Erasing rootfs_b partition</CMD>
  <CMD state="Updater" type="push" 
    body="$ flash_erase /dev/mtd10 0 0">Erasing config_b partition</CMD>

  <CMD state="Updater" type="push" 
    body="$ ubiformat /dev/mtd4"/>
  <CMD state="Updater" type="push" 
    body="$ ubiformat /dev/mtd5"/>
  <CMD state="Updater" type="push" 
    body="$ ubiformat /dev/mtd9"/>
  <CMD state="Updater" type="push" 
    body="$ ubiformat /dev/mtd10"/>

  <CMD state="Updater" type="push" 
    body="$ ubiattach /dev/ubi_ctrl -m 4">Attaching UBI partition - /dev/ubi0</CMD>
  <CMD state="Updater" type="push" 
    body="$ ubiattach /dev/ubi_ctrl -m 5">Attaching UBI partition - /dev/ubi1</CMD>
  <CMD state="Updater" type="push" 
    body="$ ubiattach /dev/ubi_ctrl -m 9">Attaching UBI partition - /dev/ubi2</CMD>
  <CMD state="Updater" type="push" 
    body="$ ubiattach /dev/ubi_ctrl -m 10">Attaching UBI partition - /dev/ubi3</CMD>

  <CMD state="Updater" type="push" 
    body="$ ubimkvol /dev/ubi0 -N rootfs_a -m"/>
  <CMD state="Updater" type="push" 
    body="$ ubimkvol /dev/ubi1 -N config_a -m"/>
  <CMD state="Updater" type="push" 
    body="$ ubimkvol /dev/ubi2 -N rootfs_b -m"/>
  <CMD state="Updater" type="push" 
    body="$ ubimkvol /dev/ubi3 -N config_b -m"/>

  <CMD state="Updater" type="push" 
    body="send" file="files/ubifs.img">Sending a UBIFS file system image</CMD>

  <!-- burn the rootfs_a -->
  <CMD state="Updater" type="push" 
    body="$ ubiupdatevol /dev/ubi0_0 -t"/>
  <CMD state="Updater" type="push" 
    body="$ ubiupdatevol /dev/ubi0_0 $FILE">Write to UBI volume /dev/ubi0_0 - rootfs_a</CMD>

  <!-- burn the rootfs_b -->
  <CMD state="Updater" type="push" 
    body="$ ubiupdatevol /dev/ubi2_0 -t"/>
  <CMD state="Updater" type="push" 
    body="$ ubiupdatevol /dev/ubi2_0 $FILE">Write to UBI volume /dev/ubi2_0 - rootfs_b</CMD>

  <CMD state="Updater" type="push" 
    body="$ echo Update Complete!">Done</CMD>

  </LIST>

</UCL>
⚠️ **GitHub.com Fallback** ⚠️