20190710_jeffrey - silenceuncrio/diary GitHub Wiki
ๅ ไพๅนซ VIC ็ task ่ตทๅ้ ญ
โ icos git:(develop) โ git flow feature start wifi_sta
Switched to a new branch 'feature/wifi_sta'
Summary of actions:
- A new branch 'feature/wifi_sta' was created, based on 'develop'
- You are now on branch 'feature/wifi_sta'
Now, start committing on your feature. When done, use:
git flow feature finish wifi_sta
โ icos git:(feature/wifi_sta) โ
็ธ้็ icos module ็บ PROSRC_WIFI_STA
PROSCEND Software Configuration
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Applications โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Arrow keys navigate the menu. <Enter> selects submenus --->. โ
โ Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, โ
โ <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help. โ
โ Legend: [*] built-in [ ] excluded <M> module < > module capable โ
โ โโโโโโโโโโโโโโโโ^(-)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ WIFI AP SSID: "" (NEW) โ โ
โ โ WIFI AP Password: "" (NEW) โ โ
โ โ [*] WIFI Support(STA mode) โ โ
โ โ [ ] LTE Lock Bands โ โ
โ โ [ ] LTE Lock PCIs โ โ
โ โ [ ] LTE Search Operators โ โ
โ โ [*] Traffic Statistics โ โ
โ โ [*] PROMSG QUEUE โ โ
โ โ [ ] YUNCORE Manufacture โ โ
โ โโโโโโโโโโโโโโโโโด(+)โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ <Select> < Exit > < Help > โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
compile ๅบ็พ้ฏ่ชค
netmon.c:1731:13: warning: conflicting types for 'wifi_v4_ping' [enabled by default]
netmon.c:1731:13: error: static declaration of 'wifi_v4_ping' follows non-static declaration
netmon.c:1348:25: note: previous implicit declaration of 'wifi_v4_ping' was here
netmon.c:1748:13: warning: conflicting types for 'wifi_v6_ping' [enabled by default]
netmon.c:1748:13: error: static declaration of 'wifi_v6_ping' follows non-static declaration
netmon.c:1431:25: note: previous implicit declaration of 'wifi_v6_ping' was here
ๅนซๅฟไฟฎไธไธ้ๅๅฐ้ฏ่ชค
commit 9e4ae9e1d0df766adf0d2538a3bbd1973267460c
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Wed Jul 10 10:10:30 2019 +0800
add declaration for static function before it be invoked
proscend/prosrc/icos/icoslib/netmon/netmon.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
ๅๅฐ M300
manufacture tool ไน้่ฆ ubi ็็ๆฌ
็ถๆๅทฒๅๅฎไบ - use UBIFS file system image in mfgtools
ไธ้ daily build server ๆๅบ้ฏ
ๅ ็บ manufacture image ๅจ็ขๅบ็ๆๅ้ๆฒๆ ubiimage
้ฃๆๆฒ็ฉบๆไปฅๅ้ๅไบ - revert: use UBIFS file system image in mfgtools
ๅ ๅ่ use UBIFS file system image in mfgtools ้ๅๆก็ผ็พๅ ด
diff --git a/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml b/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
index 520ff3d..24cdacc 100644
--- a/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
+++ b/manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
@@ -109,29 +109,20 @@
<CMD state="Updater" type="push"
body="$ ubimkvol /dev/ubi3 -N config_b -m"/>
- <!-- burn the rootfs_a -->
- <CMD state="Updater" type="push"
- body="$ mkdir -p /mnt/rootfs_a"/>
<CMD state="Updater" type="push"
- body="$ mount -t ubifs ubi0:rootfs_a /mnt/rootfs_a"/>
- <CMD state="Updater" type="push"
- body="pipe tar -jxv -C /mnt/rootfs_a" file="files/rootfs.tar.bz2">Sending and writting rootfs_a</CMD>
+ body="send" file="files/ubifs.img">Sending a UBIFS file system image</CMD>
+
+ <!-- burn the rootfs_a -->
<CMD state="Updater" type="push"
- body="frf">Finishing rootfs write</CMD>
+ body="$ ubiupdatevol /dev/ubi0_0 -t"/>
<CMD state="Updater" type="push"
- body="$ umount /mnt/rootfs_a">Unmounting rootfs_a partition</CMD>
+ 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="$ mkdir -p /mnt/rootfs_b"/>
- <CMD state="Updater" type="push"
- body="$ mount -t ubifs ubi2:rootfs_b /mnt/rootfs_b"/>
- <CMD state="Updater" type="push"
- body="pipe tar -jxv -C /mnt/rootfs_b" file="files/rootfs.tar.bz2">Sending and writting rootfs_b</CMD>
- <CMD state="Updater" type="push"
- body="frf">Finishing rootfs write</CMD>
+ body="$ ubiupdatevol /dev/ubi2_0 -t"/>
<CMD state="Updater" type="push"
- body="$ umount /mnt/rootfs_b">Unmounting rootfs_a partition</CMD>
+ 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>
diff --git a/meta-proscend/classes/image_types_proscend.bbclass b/meta-proscend/classes/image_types_proscend.bbclass
index 78c8b59..f308fcd 100644
--- a/meta-proscend/classes/image_types_proscend.bbclass
+++ b/meta-proscend/classes/image_types_proscend.bbclass
@@ -202,7 +202,10 @@ IMAGE_CMD_nandflash_mfgtools () {
done
fi
- cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
+ # cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
+
+ # use UBIFS file system image
+ cp ubifs.img ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/ubifs.img
filename=$(date "+${MACHINE}_%Y%m%d%H%M%S_mfgtools.zip")
cd ${MFGTOOLS_DIR}/nandflash
ๅ่ M300 - Wiki - Build Image
ไฝฟ็จ source proenv.sh m300 proscend-m300
ไพ setup a Proscend
image for nandflash
้็ญๆผๆฏ้ ่จญ็ source proenv.sh
้ฒ proscend ็ฎ้ - make distclean
- make menuconfig
- Products/Vendor = M300/0_GENERIC
ๆ /build_small/tmp/ ๅชๆ - ่ฉฆ่ๆจกๆฌ daily build server ็่ก็บ
user@aef20c2bd55a:~/build_small$ rm -rf /tmp/
rm: cannot remove '/tmp/': Permission denied
user@aef20c2bd55a:~/build_small$ sudo rm -rf /tmp/
user@aef20c2bd55a:~/build_small$
ๅจ build_small ็ฎ้ไธไฝฟ็จ source bimage.sh
้ๅง build image
user@aef20c2bd55a:~/build_small$ source bimage.sh
ๆๅ
ไธฆๆฒๆๅบ็พ้ฏ่ชค
่ฉฆ่ๅ่ daily build server ็ไฝๆณ
daily build server ๆฏไฝฟ็จ source base ไธ็ build.sh
ไพไพๆๅคๅ profile ไพ็ขๅบ image
็ฌฌไธๆฌก ๆๆๆดๅ ./build_small ๆไปฅๆ่ฑๆไน ๆ้
...
if [ $CLEAN -eq 1 ]; then
# Clean whole build directory
rm -rf ./build_small
fi
...
ๆๅชๆณๆจกๆฌ็ฌฌไธๆฌกไนๅพๅๆๅๅ profile ๆไธๆๅบๅ้ก
ไฟฎๆน build.sh
ๅฆไธ
diff --git a/build.sh b/build.sh
index aabad9b..03636f8 100755
--- a/build.sh
+++ b/build.sh
@@ -379,7 +379,8 @@ fi
if [ $CLEAN -eq 1 ]; then
# Clean whole build directory
- rm -rf ./build_small
+ # rm -rf ./build_small
+ echo "no rm -rf ./build_small"
fi
_BUILD_SUCCESS="success"
ๅฉ็จ ./build.sh -clean -f "M300/1_GPS\|M300/0_GENERIC"
ไพ็ข็ๅ
ฉไปฝ image
ไธๅฐๅฟๅบไบ้ปๆๅค
vmware ้ๆฉๅๅๅ
้ๆฐ source proenv.sh - ไนๅฐฑๆฏ source proenv.sh m300 proscend-m300
ไพ setup a Proscend
image for nandflash
้ฒ proscend ็ฎ้ - make distclean
- make menuconfig
- Products/Vendor = M300/1_GPS
ๅจ build_small ็ฎ้ไธไฝฟ็จ source bimage.sh
้ๅง build image
ๅบ็พ้ฏ่ชค่จๆฏ
mkfs.ubifs -r ./rootfs.x -m 2048 -e 126976 -c 766 -o ubifs.img ...
/home/user/build_small/tmp/work/m300-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.nandflash: 216: /home/user/build_small/tmp/work/m300-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.nandflash: mkfs.ubifs: not found
WARNING: exit code 127 from a shell command.
ERROR: Function failed: do_rootf
ๅ่ 20181128_jeffrey
้ๆฏๅ ็บๆ็ docker container - build-m300 ๆฉไธ้ๅปบไบไธๆฌก - ไธๅฐๅฟ็จ root ่ทไบ bitbake...
ๆ้่ฆๅฎ่ฃ mtd-utils - sudo apt install mtd-utils
โ ~ pwd
/home/jeffrey
โ ~ ./300.sh
user@f14571e79bb2:/$ cd /home/user/
user@f14571e79bb2:~$ sudo apt install mtd-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
mtd-utils
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 296 kB of archives.
After this operation, 822 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe mtd-utils amd64 1:1.5.0-1 [296 kB]
Fetched 296 kB in 2s (115 kB/s)
Selecting previously unselected package mtd-utils.
(Reading database ... 80298 files and directories currently installed.)
Preparing to unpack .../mtd-utils_1%3a1.5.0-1_amd64.deb ...
Unpacking mtd-utils (1:1.5.0-1) ...
Setting up mtd-utils (1:1.5.0-1) ...
user@f14571e79bb2:~$
ๅไธๆฌก source proenv.sh - ไนๅฐฑๆฏ source proenv.sh m300 proscend-m300
ไพ setup a Proscend
image for nandflash
ไธๅ้ฒ proscend ็ฎ้
็ดๆฅๅจ build_small ็ฎ้ไธไฝฟ็จ source bimage.sh
้ๅง build image
็ตๆผ่ค่ฃฝๅบๆก็ผ็พๅ ดไบ
ERROR: Error: The image creation script '/home/user/build_small/tmp/work/m300-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.nandflash_mfgtools' returned 1:
cp: cannot stat 'ubifs.img': No such file or directory
WARNING: exit code 1 from a shell command.
็ฎๅ่ฉฆๅบไปฅไธๆญฅ้ฉ่ฝ้่ค่ค่ฃฝๅบๆก็ผ็พๅ ด
user@f14571e79bb2:~/build_small$ rm tmp/deploy/images/m300/ubifs.img
user@f14571e79bb2:~/build_small$ bitbake core-image-minimal
ๅ
ๆๆฉไธ้ๆธกๆๆ็ๆน่ฎ้ๅ - build.sh
โ M300 git:(develop) โ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: build.sh
modified: manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
modified: meta-proscend/classes/image_types_proscend.bbclass
...
โ M300 git:(develop) โ git checkout build.sh
โ M300 git:(develop) โ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: manufacturing_tool/nandflash/mfgtools/Profiles/Linux/OS Firmware/ucl2.xml
modified: meta-proscend/classes/image_types_proscend.bbclass
...
ๅฉ็จ meta-proscend/classes/image_types_proscend.bbclass
echo ไธไบ debug information ๅนซๅฉไบ่งฃๅ้ก็ๆๅ
ๆญ้
ไปฅไธ็ meta-proscend/classes/image_types_proscend.bbclass
diff --git a/meta-proscend/classes/image_types_proscend.bbclass b/meta-proscend/classes/image_types_proscend.bbclass
index 78c8b59..9f6f4cf 100644
--- a/meta-proscend/classes/image_types_proscend.bbclass
+++ b/meta-proscend/classes/image_types_proscend.bbclass
@@ -39,6 +39,9 @@ NANDFLASH_UBI = "${MACHINE}.ubi.img"
NANDFLASH_GENERATION_COMMAND_mx6ul = "generate_imx_nandflash"
generate_imx_nandflash () {
+
+ echo "[j] generate_imx_nandflash - $(date)"
+
# clean up
rm -rf ${FIRMWARE_DIR}
rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH}` `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH_UBI}`
@@ -140,6 +143,8 @@ generate_imx_nandflash () {
echo "mkfs.ubifs -r ./rootfs.x -m 2048 -e 126976 -c 766 -o ubifs.img ..."
mkfs.ubifs -r ./rootfs.x -m 2048 -e 126976 -c 766 -o ubifs.img
+ echo "[j] generate_imx_nandflash - $(date) - $(ls -al ubifs.img)"
+
echo "Encrypt ubifs.img to ubifs.enc ..."
aes_key=`echo 2wsx#EDC | md5sum | cut -b 1-32`
aes_ivv=`echo 70746615 | md5sum | cut -b 1-32`
@@ -158,6 +163,8 @@ generate_imx_nandflash () {
tar -cf ${filename} firmware
ln -s ${filename} ${NANDFLASH_UBI}
cd -
+
+ echo "[j] generate_imx_nandflash - $(date) - return"
}
IMAGE_CMD_nandflash () {
@@ -182,6 +189,8 @@ NANDFLASH_MFGTOOLS= "${MACHINE}_mfgtools.zip"
IMAGE_CMD_nandflash_mfgtools () {
+ echo "[j] IMAGE_CMD_nandflash_mfgtools - $(date)"
+
# clean up
rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}`
rm -f ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}
@@ -202,7 +211,12 @@ IMAGE_CMD_nandflash_mfgtools () {
done
fi
- cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
+ # cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
+
+ echo "[j] IMAGE_CMD_nandflash_mfgtools - $(date) - $(ls -al ubifs.img)"
+
+ # use UBIFS file system image
+ cp ubifs.img ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/ubifs.img
filename=$(date "+${MACHINE}_%Y%m%d%H%M%S_mfgtools.zip")
cd ${MFGTOOLS_DIR}/nandflash
@@ -213,6 +227,8 @@ IMAGE_CMD_nandflash_mfgtools () {
cd ${DEPLOY_DIR_IMAGE}
ln -s ${filename} ${NANDFLASH_MFGTOOLS}
cd -
+
+ echo "[j] IMAGE_CMD_nandflash_mfgtools - $(date) - return"
}
# The nandflash_mfgtools requires the rootfs filesystem to be built before using
ๅฏ็ฑ M300/build_small/tmp/work/m300-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/log.do_rootfs.4885
่งๅฏๅฐ
...
[j] generate_imx_nandflash - Wed Jul 10 07:27:17 UTC 2019
Encrypt rootfs using triple DES in CBC mode with password(2wsx#EDC)
...
[j] generate_imx_nandflash - Wed Jul 10 07:27:33 UTC 2019 - -rw-r--r-- 1 root root 53710848 Jul 10 07:27 ubifs.img
Encrypt ubifs.img to ubifs.enc ...
Gen md5 ...
Gen dummy rootfs.tar.bz2.enc ( so old FirmwareUpgrade.sh will get upgrade error)
/home/user/build_small/tmp/deploy/images/m300
Build Upgrade Ubi Image
/home/user/build_small/tmp/deploy/images/m300
[j] generate_imx_nandflash - Wed Jul 10 07:27:34 UTC 2019 - return
ERROR: Error: The image creation script '/home/user/build_small/tmp/work/m300-poky-linux-gnueabi/core-image-minimal/1.0-r0/temp/create_image.nandflash_mfgtools' returned 1:
[j] IMAGE_CMD_nandflash_mfgtools - Wed Jul 10 07:27:17 UTC 2019
ls: cannot access ubifs.img: No such file or directory
[j] IMAGE_CMD_nandflash_mfgtools - Wed Jul 10 07:27:17 UTC 2019 -
cp: cannot stat 'ubifs.img': No such file or directory
WARNING: exit code 1 from a shell command.
ๅฟฝ็ฅ log ่ฃก็่จๆฏ้ ๅบ
็ไธไธ generate_imx_nandflash()
่ IMAGE_CMD_nandflash_mfgtools()
ๅนพๅๆ้้ป
- generate_imx_nandflash()
- ้ฒๅ
ฅๆ้
- 07:27:17
- ็ข็ ubifs.img ็ๆ้
- 07:27:33
- ็ตๆๆ้
- 07:27:34
- ้ฒๅ
ฅๆ้
- IMAGE_CMD_nandflash_mfgtools()
- ้ฒๅ
ฅๆ้
- 07:27:17
- ้่ฆ ubifs.img ็ๆ้
- 07:27:17
- ้ฒๅ
ฅๆ้
ๅฏไปฅ็ผ็พ IMAGE_CMD_nandflash_mfgtools()
้่ฆ ubifs.img ็ๆ้ ่ฆๆฉๆผ generate_imx_nandflash()
็ข็ๅบ ubifs.img ็ๆ้
ๆๅฏไปฅๆ ubi image ็ธ้็้จๅๅพ generate_imx_nandflash()
ๆฌๅฐ IMAGE_CMD_nandflash_mfgtools()
ไพ
diff --git a/meta-proscend/classes/image_types_proscend.bbclass b/meta-proscend/classes/image_types_proscend.bbclass
index 78c8b59..ff5c2cc 100644
--- a/meta-proscend/classes/image_types_proscend.bbclass
+++ b/meta-proscend/classes/image_types_proscend.bbclass
@@ -39,10 +39,13 @@ NANDFLASH_UBI = "${MACHINE}.ubi.img"
NANDFLASH_GENERATION_COMMAND_mx6ul = "generate_imx_nandflash"
generate_imx_nandflash () {
+
+ echo "[j] generate_imx_nandflash - $(date)"
+
# clean up
rm -rf ${FIRMWARE_DIR}
- rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH}` `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH_UBI}`
- rm -f ${DEPLOY_DIR_IMAGE}/${NANDFLASH} ${DEPLOY_DIR_IMAGE}/${NANDFLASH_UBI}
+ rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH}`
+ rm -f ${DEPLOY_DIR_IMAGE}/${NANDFLASH}
mkdir -p ${FIRMWARE_DIR}
case "${IMAGE_BOOTLOADER}" in
@@ -129,7 +132,43 @@ generate_imx_nandflash () {
ln -s ${filename} ${NANDFLASH}
cd -
+ echo "[j] generate_imx_nandflash - $(date) - return"
+}
+
+IMAGE_CMD_nandflash () {
+ if [ -z "${NANDFLASH_ROOTFS}" ]; then
+ bberror "NANDFLASH_ROOTFS is undefined. To use nandflash image from Proscend it needs to be defined."
+ exit 1
+ fi
+
+ ${NANDFLASH_GENERATION_COMMAND}
+}
+
+# The sdcard requires the rootfs filesystem to be built before using
+# it so we must make this dependency explicit.
+IMAGE_TYPEDEP_nandflash = "${@d.getVar('SDCARD_ROOTFS', 1).split('.')[-1]}"
+
+
+
+
+
+
+NANDFLASH_MFGTOOLS= "${MACHINE}_mfgtools.zip"
+
+IMAGE_CMD_nandflash_mfgtools () {
+
+ echo "[j] IMAGE_CMD_nandflash_mfgtools - $(date)"
+
+ # clean up
+ rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH_UBI}`
+ rm -f ${DEPLOY_DIR_IMAGE}/${NANDFLASH_UBI}
+ rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}`
+ rm -f ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}
+
+
+
echo "===Build Ubi Image File==="
+ filename_base=$(date "+${MACHINE}_%Y%m%d%H%M%S")
filename=$filename_base".ubi.img"
echo "Build ubifs.img ..."
@@ -150,7 +189,7 @@ generate_imx_nandflash () {
rm -f firmware.md5
md5sum * > firmware.md5
echo "Gen dummy rootfs.tar.bz2.enc ( so old FirmwareUpgrade.sh will get upgrade error)"
- cp -f mcsv.enc ${NANDFLASH_ROOTFS_NAME}.enc
+ cp -f mcsv.enc ${NANDFLASH_ROOTFS_NAME}.enc
cd -
echo "Build Upgrade Ubi Image"
@@ -158,34 +197,9 @@ generate_imx_nandflash () {
tar -cf ${filename} firmware
ln -s ${filename} ${NANDFLASH_UBI}
cd -
-}
-
-IMAGE_CMD_nandflash () {
- if [ -z "${NANDFLASH_ROOTFS}" ]; then
- bberror "NANDFLASH_ROOTFS is undefined. To use nandflash image from Proscend it needs to be defined."
- exit 1
- fi
-
- ${NANDFLASH_GENERATION_COMMAND}
-}
-
-# The sdcard requires the rootfs filesystem to be built before using
-# it so we must make this dependency explicit.
-IMAGE_TYPEDEP_nandflash = "${@d.getVar('SDCARD_ROOTFS', 1).split('.')[-1]}"
-
-
-
-NANDFLASH_MFGTOOLS= "${MACHINE}_mfgtools.zip"
-
-IMAGE_CMD_nandflash_mfgtools () {
-
- # clean up
- rm -f `readlink ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}`
- rm -f ${DEPLOY_DIR_IMAGE}/${NANDFLASH_MFGTOOLS}
-
cp ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.${UBOOT_SUFFIX_NANDFLASH} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files
cp "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin" ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/zImage
@@ -202,7 +216,8 @@ IMAGE_CMD_nandflash_mfgtools () {
done
fi
- cp ${NANDFLASH_ROOTFS} ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/${NANDFLASH_ROOTFS_NAME}
+ # use UBIFS file system image
+ cp ubifs.img ${MFGTOOLS_DIR}/nandflash/mfgtools/Profiles/Linux/OS\ Firmware/files/ubifs.img
filename=$(date "+${MACHINE}_%Y%m%d%H%M%S_mfgtools.zip")
cd ${MFGTOOLS_DIR}/nandflash
@@ -213,6 +228,8 @@ IMAGE_CMD_nandflash_mfgtools () {
cd ${DEPLOY_DIR_IMAGE}
ln -s ${filename} ${NANDFLASH_MFGTOOLS}
cd -
+
+ echo "[j] IMAGE_CMD_nandflash_mfgtools - $(date) - return"
}
# The nandflash_mfgtools requires the rootfs filesystem to be built before using
ๆๅไบ
็ไธไธ log
...
NOTE: Script output:
[j] generate_imx_nandflash - Wed Jul 10 08:02:48 UTC 2019
Encrypt rootfs using triple DES in CBC mode with password(2wsx#EDC)
/home/user/build_small/tmp/deploy/images/m300
/home/user/build_small/tmp/deploy/images/m300
[j] generate_imx_nandflash - Wed Jul 10 08:02:51 UTC 2019 - return
NOTE: Script output:
[j] IMAGE_CMD_nandflash_mfgtools - Wed Jul 10 08:02:48 UTC 2019
===Build Ubi Image File===
Build ubifs.img ...
...
[j] IMAGE_CMD_nandflash_mfgtools - Wed Jul 10 08:03:07 UTC 2019 - return
NOTE: Creating symlinks for nandflash image ...
NOTE: Creating symlinks for nandflash_mfgtools image ...
NOTE: Creating symlinks for sdcard image ...
NOTE: Creating symlink: core-image-minimal-m300.sdcard -> core-image-minimal-m300-20190710075924.rootfs.sdcard
NOTE: Executing buildhistory_get_imageinfo ...
DEBUG: Executing shell function buildhistory_get_imageinfo
DEBUG: Shell function buildhistory_get_imageinfo finished
DEBUG: Python function do_rootfs finished
generate_imx_nandflash()
่ IMAGE_CMD_nandflash_mfgtools()
ๅนพๅๆ้้ป
- generate_imx_nandflash()
- ้ฒๅ
ฅๆ้
- 08:02:48
- ็ตๆๆ้
- 08:02:51
- ้ฒๅ
ฅๆ้
- IMAGE_CMD_nandflash_mfgtools()
- ้ฒๅ
ฅๆ้
- 08:02:48
- ็ตๆๆ้
- 08:03:07
- ้ฒๅ
ฅๆ้
ๆ meta-proscend/classes/image_types_proscend.bbclass
่ฃกๅๅๅ ็ debug information ๆฟๆ
ๅๆฌกๅฉ็จ็ธๅ็ๆญฅ้ฉ ่ฉฆ่่ค่ฃฝๅบๆก็ผ็พๅ ด - ็ถ็ถ้ๆฌกๆฒๆๆกๆ ไบๆๅฐ
user@f14571e79bb2:~/build_small$ rm tmp/deploy/images/m300/ubifs.img
user@f14571e79bb2:~/build_small$ bitbake core-image-minimal
ๆๅ
ๆ /build_small/tmp/ ๅชๆ - ่ฉฆ่ๆจกๆฌ daily build server ็่ก็บ
user@f14571e79bb2:~/build_small$ rm -rf ~/build_small/tmp/
user@f14571e79bb2:~/build_small$ source bimage.sh
...
ๆๅ
ๅไธไธ ariel ๅ็็้ๆฌก็ๆน่ฎ่ฆ commit ๅฐๅชๅ branch
ariel ่ฆๅไธไธ DQA ็ๆฏๆๅคๆฅ่่ฆ
ๆไพ่ฉฆไธไธ ubi ็ๆฌ mfgtool ็็้ๆ้่ท ไนๅ็็ธๆฏๅฟซไบๅคๅฐ
ๅ
ไฝไธไธไนๅ็ M300-S_012C00002002E8F3_mfgtools.zip
- 04:12
ๅไฝ้ๆฌก็ ubi format - m300_20190710084342_mfgtools.zip
- 01:45
ๅฟซๅคๅฐๅข?
ไนๅ 252 ็ง
็พๅจ 105 ็ง
็ธฎ็ญไบ 147 ็ง - 147/252 ็ด 58 %
ไนๅฐฑๆฏ่ชชๅฟซไบ็ด 60 %
ๆๅฅ่ฉฑ่ชชๅฐฑๆฏๅช่ฆไปฅๅ็ 42 %
้ๆ่ฉฒ่ฝๅนซ M300 ็็ข็ไธไธไบ้ข
็ขบ่ชไธไธ mfgtool ็้ๅพ็้ๆฉ็ๆณ
้ ๅฉ login
้้ HTTPS ๅญๅ web ui ๆฏไธ้ ้ฝ่ฝๆญฃๅธธ้ๅ
DQA ่กจ็คบ้ๅ fix ไธๆฅ
ๅฏไปฅ็ญๅฐไธๅ็ๆฌ
ๆไปฅๆๅฐฑ่ฝๅ ไธๅฐ develop ๅป
M300 - develop - use UBIFS file system image in mfgtools
commit f4437c3b174ba51d856d12b33af652184801df0c
Refs: [develop], {origin/develop}
Author: jeffrey <[email protected]>
Date: Wed Jul 10 17:56:22 2019 +0800
use UBIFS file system image in mfgtools
- move the ubi image building process from generate_imx_nandflash() to IMAGE_CMD_nandflash_mfgtools()
- because IMAGE_CMD_nandflash_mfgtools() need the output file from ubi image building process
note the time needed while mfgtool
- non ubi format - 252 seconds
- ubi format - 105 seconds
mfgtool with ubi format can save 147 seconds per device while manufacturing
- time is money
.../mfgtools/Profiles/Linux/OS Firmware/ucl2.xml | 23 +++-----
meta-proscend/classes/image_types_proscend.bbclass | 67 ++++++++++++----------
2 files changed, 45 insertions(+), 45 deletions(-)