20170929_jeffrey - silenceuncrio/diary GitHub Wiki
review
ๅจ 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 ๅบฆ้ๆฉๆธฌ่ฉฆ
ไธ้ๆไธไธๅ็ emmc cpu board ็ซ็ถๆไธๅ็่ก็บ
ๅๅ ๅพ ๆฅ
m300 ้ฑๆ
็ฎๅ็ 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>
้ๆฏ้ไธ่ตทไพ
ๅ ๅฏซ้ฑๅ ฑๅง
ๆฅๅฐ 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>
ๅๆฌก็ขบ่ชไธๅๅฏๆๅ็้็ 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>
ไพๆ้ๆฌกๆๅไพ็ 10 ็ emmc ้ฝไฝ็้
็ขบๅฎๅ็้ฝ่ฝ้ๆฉ่ไธ rootfs ้ฝๆ่ผๆๅ