20170929_jeffrey - silenceuncrio/diary GitHub Wiki

0850

review

0900

ๅœจ rc.local ไฟฎๆ”นไน‹ๅ‰ไธ่ƒฝ็™ปๅ…ฅ็š„ๅ•้กŒ

ๅฏ้€้Žไฟฎๆ”น proscend\prosrc\icos\script\icos_pam.sh ๆšซๆ™‚่งฃๆฑบ

diff --git a/proscend/prosrc/icos/script/icos_pam.sh b/proscend/prosrc/icos/script/icos_pam.sh
index ee3f2a6..7276ae5 100755
--- a/proscend/prosrc/icos/script/icos_pam.sh
+++ b/proscend/prosrc/icos/script/icos_pam.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-
+exit 0
 read pass
 user="$PAM_USER"
 icos_auth "$user" "$pass"

้€™ๆจฃ็š„ๆˆๆžœๅทฒ็ถ“ๅฏไปฅๆไพ›็ตฆ morris ไฝœ ้›ถไธ‹ 40 ๅบฆ้–‹ๆฉŸๆธฌ่ฉฆ

0930

ไธ้Žๆ‰‹ไธŠไธๅŒ็š„ emmc cpu board ็ซŸ็„ถๆœ‰ไธๅŒ็š„่กŒ็‚บ

ๅŽŸๅ› ๅพ…ๆŸฅ

1000

m300 ้€ฑๆœƒ

1300

็›ฎๅ‰็š„ ucl2.xml ้‡ๅฐไธ€็‰‡ๆฒ’ๅš้Ž MfgTools ็š„ CPU ๆฟ็‡’้Œ„ๅพŒ

ๅพž emmc ้–‹ๆฉŸๆฒ’ๆœ‰ไปปไฝ• output

ไฟฎๆ”น ucl2.xml ็š„ burn uboot ้ƒจๅˆ†ๅฆ‚ไธ‹

  <!-- burn uboot -->
  <CMD state="Updater" type="push" 
    body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
  <CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/u-boot-imx6ul%6uluboot%_sd.imx">Sending u-boot.bin</CMD>
  <CMD state="Updater" type="push" 
    body="$ dd if=$FILE of=/dev/mmcblk%mmc% bs=1k seek=1 conv=fsync">write u-boot.bin to sd card</CMD>
  <CMD state="Updater" type="push" 
    body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>

  <CMD state="Updater" type="push" 
    body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>

ๆ–ฐๅขž enable boot partion 1 to boot ้ƒจๅˆ†

  <CMD state="Updater" type="push" 
    body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>

1310

้‚„ๆ˜ฏ้–‹ไธ่ตทไพ†

1325

ๅ…ˆๅฏซ้€ฑๅ ฑๅง

1400

ๆŸฅๅˆฐ emmc ็š„ uboot ้–‹ๆฉŸๆˆๅŠŸ่ˆ‡ไธๆˆๅŠŸ็š„ๅทฎ็•ฐ่™•ไบ†

ๆˆๅŠŸ็š„

  <CMD state="Updater" type="push" 
    body="$ dd if=/dev/zero of=/dev/mmcblk1 bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
  <CMD state="Updater" type="push" 
    body="$ echo 0 > /sys/block/mmcblk1boot0/force_ro">access boot partition 1</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/u-boot.imx">Sending u-boot.bin</CMD>
  <CMD state="Updater" type="push" 
    body="$ dd if=$FILE of=/dev/mmcblk1boot0 bs=512 seek=2">write U-Boot to sd card</CMD>
  <CMD state="Updater" type="push" 
    body="$ echo 1 > /sys/block/mmcblk1boot0/force_ro"> re-enable read-only access </CMD>
  <CMD state="Updater" type="push" 
    body="$ mmc bootpart enable 1 1 /dev/mmcblk1">enable boot partion 1 to boot</CMD>

ไธๆˆๅŠŸ็š„

  <!-- burn uboot -->
  <CMD state="Updater" type="push" 
    body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
  <CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/u-boot-imx6ul%6uluboot%_sd.imx">Sending u-boot.bin</CMD>
  <CMD state="Updater" type="push" 
    body="$ dd if=$FILE of=/dev/mmcblk%mmc% bs=1k seek=1 conv=fsync">write u-boot.bin to sd card</CMD>
  <CMD state="Updater" type="push" 
    body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>

  <CMD state="Updater" type="push" 
    body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>

1420

ๅ†ๆฌก็ขบ่ชไธ€ๅ€‹ๅฏๆˆๅŠŸ็‡’้Œ„็š„ ucl2.xml

<UCL>

  <CFG>
    <STATE name="BootStrap" dev="MX6UL" vid="15A2" pid="007D"/>
    <STATE name="Updater"   dev="MSC" vid="066F" pid="37FF"/>
  </CFG>

  <LIST name="SDCard" desc="Choose SD Card as media">

  <CMD state="BootStrap" type="boot" 
    body="BootStrap" file ="firmware/u-boot-imx6ul%6uluboot%_sd.imx">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%%ldo%.dtb" address="0x83000000"
    loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading device tree.</CMD>


  <CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>


  <!-- create partition -->
  <CMD state="Updater" type="push" 
    body="send" file="mksdcard.sh.tar">Sending partition shell</CMD>
  <CMD state="Updater" type="push" 
    body="$ tar xf $FILE "> Partitioning...</CMD>
  <CMD state="Updater" type="push" body="$ sh mksdcard.sh /dev/mmcblk%mmc%"> Partitioning...</CMD>


  <!-- burn uboot -->
  <CMD state="Updater" type="push" 
    body="$ dd if=/dev/zero of=/dev/mmcblk%mmc% bs=1k seek=384 conv=fsync count=129">clear u-boot arg</CMD>
  <CMD state="Updater" type="push" body="$ echo 0 > /sys/block/mmcblk%mmc%boot0/force_ro">access boot partition 1</CMD>
  <CMD state="Updater" type="push" 
    body="send" file="files/u-boot-imx6ul%6uluboot%_sd.imx">Sending u-boot.bin</CMD>
  <CMD state="Updater" type="push" 
    body="$ dd if=$FILE of=/dev/mmcblk1boot0 bs=512 seek=2">write U-Boot to sd card</CMD>
  <CMD state="Updater" type="push" 
    body="$ echo 1 > /sys/block/mmcblk%mmc%boot0/force_ro"> re-enable read-only access </CMD>
  <CMD state="Updater" type="push" 
    body="$ mmc bootpart enable 1 1 /dev/mmcblk%mmc%">enable boot partion 1 to boot</CMD>



  <CMD state="Updater" type="push" 
    body="$ while [ ! -e /dev/mmcblk%mmc%p1 ]; do sleep 1; echo \"waiting...\"; done ">Waiting for the partition ready</CMD>
  <CMD state="Updater" 
    type="push" body="$ mkfs.vfat /dev/mmcblk%mmc%p1">Formatting rootfs partition</CMD>
  <CMD state="Updater" 
    type="push" body="$ mkdir -p /mnt/mmcblk%mmc%p1"/>
  <CMD state="Updater" 
    type="push" body="$ mount -t vfat /dev/mmcblk%mmc%p1 /mnt/mmcblk%mmc%p1"/>


  <!-- burn zImage -->
  <CMD state="Updater" type="push" 
    body="send" file="files/zImage">Sending kernel</CMD>
  <CMD state="Updater" type="push" 
    body="$ cp $FILE /mnt/mmcblk%mmc%p1/zImage">write kernel image to sd card</CMD>


  <!-- burn dtb -->
  <CMD state="Updater" type="push" 
    body="send" file="files/imx6ul-%6uldtb%%ldo%.dtb">Sending Device Tree file</CMD>
  <CMD state="Updater" type="push" 
    body="$ cp $FILE /mnt/mmcblk%mmc%p1/imx6ul-%6uldtb%.dtb">write device tree to sd card</CMD>


  <CMD state="Updater" type="push" body="$ umount /mnt/mmcblk%mmc%p1">Unmounting vfat partition</CMD>



  <!-- burn rootfs -->
  <CMD state="Updater" type="push" 
    body="$ mkfs.ext3 -j /dev/mmcblk%mmc%p2">Formatting rootfs partition</CMD>
  <CMD state="Updater" type="push" 
    body="$ mkdir -p /mnt/mmcblk%mmc%p2"/>
  <CMD state="Updater" type="push" 
    body="$ mount -t ext3 /dev/mmcblk%mmc%p2 /mnt/mmcblk%mmc%p2"/>
  <CMD state="Updater" type="push" 
    body="pipe tar -jxv -C /mnt/mmcblk%mmc%p2" file="files/rootfs_nogpu.tar.bz2">Sending and writting rootfs</CMD>
  <CMD state="Updater" type="push" 
    body="frf">Finishing rootfs write</CMD>
  <CMD state="Updater" type="push" 
    body="$ umount /mnt/mmcblk%mmc%p2">Unmounting rootfs partition</CMD>



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

  </LIST>

</UCL>

1425

ไพ†ๆŠŠ้€™ๆฌกๆ‰“ๅ›žไพ†็š„ 10 ็‰‡ emmc ้ƒฝไฝœ็‡’้Œ„

1455

็ขบๅฎšๅ็‰‡้ƒฝ่ƒฝ้–‹ๆฉŸ่€Œไธ” rootfs ้ƒฝๆŽ›่ผ‰ๆˆๅŠŸ

โš ๏ธ **GitHub.com Fallback** โš ๏ธ