Commit fd4458f7d1d14394858b17f52eb917fd33165930
Exists in
master
and in
2 other branches
Merge branch 'master' of 192.168.10.12:falinux/1611_0007_prime_oven
Showing
23 changed files
Show diff stats
README.md
| ... | ... | @@ -5,23 +5,24 @@ |
| 5 | 5 | * Fusing SD 만드는 법(Boot SD 겸용) |
| 6 | 6 | |
| 7 | 7 | release 폴더의 mk-fusingsd.sh 실행 ( Default DEV_NAME : /dev/mmcblk0 ) 인자로 DEV_NAME 변경 가능함 |
| 8 | - | |
| 9 | -* Bootcmd 모드에서 아래 명령을 입력하면 Fusing Mode로 SD부팅함. | |
| 8 | + ex) $ sudo ./mk-fusingsd.sh mmcblk0 | |
| 9 | + | |
| 10 | +* 부트로더의 Bootcmd 모드에서 아래 명령을 입력하면 Fusing Mode로 SD부팅함. | |
| 10 | 11 | |
| 11 | 12 | # run fw |
| 12 | 13 | |
| 13 | -* run fw 를 안하면 보통의 부팅가능한 SD카드로 사용가능하다. run fw시 bootargs_ram 에 fusing=1 이라는 값이 추가되어 커널에서 해당 내용을 파싱하여 /root/.falinux/mk-emmc-fusing.sh 실행함 | |
| 14 | +* run fw 시 부트로더의 환경변수인 autoexec의 값이 emmc Fusing 스크립트로 변경되어 실행됨 | |
| 14 | 15 | |
| 15 | 16 | |
| 16 | -## [Fusing SD] | |
| 17 | +## [Test Mode(=JIG)] | |
| 17 | 18 | --------------------------- |
| 18 | 19 | |
| 19 | -* JIG (Test 관련) | |
| 20 | +* JIG (Test 관련) 보드 부팅 시 부트로더의 Bootcmd 모드에서 아래 명령을 입력하면 Test 모드로 부팅한다. | |
| 21 | + | |
| 22 | + # run jig | |
| 23 | + | |
| 24 | +* run jig 명령으로 부팅 시 부트로더의 환경변수인 autoexec의 값이 jig 실행 스크립트로 변경되어 실행된다. | |
| 20 | 25 | |
| 21 | - eMMC 에 부트이미지를 Fusing 후 처음 부팅을 하게 되면 /etc/init.d/S83fusing 에서 | |
| 22 | - /root/.falinux/prime_jig/.complete 파일의 유무를 체크 하여 /root/.falinux/prime_jig/prime_jig.sh 스크립트를 실행하게 된다. | |
| 23 | - (.complete 가 없으면 Prime JIG 스크립트를 실행하며 완료되면 .complete 파일을 생성하여 다음 부팅부터는 JIG 가 실행되지 않도록 한다.) | |
| 24 | - JIG 결과는 /root/.falinux/prime_jig/result_log 파일로 저장된다. | |
| 25 | 26 | |
| 26 | 27 | |
| 27 | 28 | ... | ... |
app/gui/oven_control/configinfodlg.cpp
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | #include "ui_configinfodlg.h" |
| 6 | 6 | #include "soundplayer.h" |
| 7 | 7 | #include "config.h" |
| 8 | +#include "define.h" | |
| 8 | 9 | |
| 9 | 10 | |
| 10 | 11 | |
| ... | ... | @@ -74,11 +75,15 @@ bool ConfigInfoDlg::readFromInfoFile(QMap<QString, QString> &info_map, const QSt |
| 74 | 75 | qDebug() << "orgin size " << info_map.size(); |
| 75 | 76 | if(file.open(QIODevice::ReadOnly | QIODevice::Text)){ |
| 76 | 77 | while(!file.atEnd()){ |
| 77 | - QString line = QString::fromUtf8(file.readLine()); | |
| 78 | + QString line = (QString::fromUtf8(file.readLine())).remove(QChar('\n')); | |
| 78 | 79 | info_map[line.section(',',0,0)] = line.section(',',1,1); |
| 79 | 80 | } |
| 80 | 81 | qDebug() << file.fileName() << "read OK!"; |
| 81 | 82 | qDebug() << "final size " << info_map.size(); |
| 83 | + QList<QString> list = info_map.keys(); | |
| 84 | + for(int i=0; i< info_map.size() ;i++){ | |
| 85 | + qDebug() << list[i] << info_map[list[i]]; | |
| 86 | + } | |
| 82 | 87 | return true; |
| 83 | 88 | } |
| 84 | 89 | else { |
| ... | ... | @@ -87,6 +92,13 @@ bool ConfigInfoDlg::readFromInfoFile(QMap<QString, QString> &info_map, const QSt |
| 87 | 92 | return false; |
| 88 | 93 | } |
| 89 | 94 | |
| 95 | +QString ConfigInfoDlg::getSoftwareVerString() | |
| 96 | +{ | |
| 97 | + if(MAJOR_VER == 0) | |
| 98 | + return QString("V%1.%2.%3 BETA").arg(MAJOR_VER).arg(MINOR_VER).arg(HOTFIX_VER); | |
| 99 | + else return QString("V%1.%2.%3").arg(MAJOR_VER).arg(MINOR_VER).arg(HOTFIX_VER); | |
| 100 | +} | |
| 101 | + | |
| 90 | 102 | |
| 91 | 103 | void ConfigInfoDlg::loadSoftwareInfo(){ |
| 92 | 104 | Config* cfg = Config::getInstance(); |
| ... | ... | @@ -102,14 +114,14 @@ void ConfigInfoDlg::loadSoftwareInfo(){ |
| 102 | 114 | mapInfos[tr("제조국")] = "Korea"; |
| 103 | 115 | mapInfos[tr("제조사")] = "프라임"; |
| 104 | 116 | mapInfos[tr("제품번호")] = "01"; |
| 105 | - mapInfos[tr("소프트웨어 버전")] ="0.1 BETA"; | |
| 106 | - | |
| 117 | + mapInfos[tr("소프트웨어 버전")] = getSoftwareVerString(); | |
| 107 | 118 | mapInfos[tr("현재모델")] = tr(g_strModelTypeName[cfg->getConfigValue(Define::config_model).d32]); |
| 108 | 119 | |
| 109 | 120 | readFromInfoFile(mapInfos, QString(MODEL_INFO_FILE_NAME)); |
| 110 | 121 | |
| 111 | 122 | for(int i =0;i<MAX_SOFTWARE_INFO_CNT;i++){ |
| 112 | 123 | strTemp = mapInfos[tr(software_item_name[i])]; |
| 124 | + | |
| 113 | 125 | label = new QLabel(this); |
| 114 | 126 | label ->setText(tr(software_item_name[i]).append(" :")); |
| 115 | 127 | ui->gridLayout_info->addWidget(label,i,0); |
| ... | ... | @@ -138,6 +150,7 @@ void ConfigInfoDlg::loadHotlineChefInfo(){ |
| 138 | 150 | label ->setText(tr(hotline_chef_item_name[i]).append(":")); |
| 139 | 151 | ui->gridLayout_info->addWidget(label,i,0); |
| 140 | 152 | label = new QLabel(this); |
| 153 | + label->setWordWrap(true); | |
| 141 | 154 | label->setText(strTemp); |
| 142 | 155 | ui->gridLayout_info->addWidget(label,i,1); |
| 143 | 156 | } |
| ... | ... | @@ -160,6 +173,7 @@ void ConfigInfoDlg::loadHotlineServiceInfo(){ |
| 160 | 173 | label ->setText(tr(hotline_service_item_name[i]).append(":")); |
| 161 | 174 | ui->gridLayout_info->addWidget(label,i,0); |
| 162 | 175 | label = new QLabel(this); |
| 176 | + label->setWordWrap(true); | |
| 163 | 177 | label->setText(strTemp); |
| 164 | 178 | ui->gridLayout_info->addWidget(label,i,1); |
| 165 | 179 | } | ... | ... |
app/gui/oven_control/configinfodlg.h
app/gui/oven_control/define.h
app/gui/oven_control/fileprocessdlg.cpp
| ... | ... | @@ -585,16 +585,19 @@ void FileProcessDlg::programUpload(){ |
| 585 | 585 | QString strSrcPath; |
| 586 | 586 | |
| 587 | 587 | if(FileProcessor::detectUSB(strSrcPath)){ |
| 588 | - worker.addSrcFile(QString("%1/prime/falinux/run.sh,/falinux").arg(strSrcPath)); | |
| 589 | - worker.addSrcFile(QString("%1/prime/falinux/app-prime-modbus,/falinux").arg(strSrcPath)); | |
| 590 | - worker.addSrcFile(QString("%1/prime/falinux/app-prime-gui,/falinux").arg(strSrcPath)); | |
| 591 | - worker.addSrcFile(QString("%1/prime/falinux/service-web,/falinux").arg(strSrcPath)); | |
| 592 | - worker.addSrcFile(QString("%1/prime/falinux/templates/main.tmpl,/falinux/templates").arg(strSrcPath)); | |
| 593 | - worker.addSrcFile(QString("%1/prime/falinux/system.ini,/falinux").arg(strSrcPath)); | |
| 594 | - //worker.addSrcFile(QString("%1/prime/falinux/superdaemon,/falinux").arg(strSrcPath)); | |
| 595 | - //worker.addSrcFile(QString("%1/prime/falinux/superdaemon.ini,/falinux").arg(strSrcPath)); | |
| 596 | - worker.setDestPath("/prime"); | |
| 588 | + worker.addSrcFile(QString("%1/prime/superdaemon,/prime").arg(strSrcPath)); | |
| 589 | + worker.addSrcFile(QString("%1/prime/superdaemon.ini,/prime").arg(strSrcPath)); | |
| 590 | + worker.addSrcFile(QString("%1/prime/app-prime-gui,/prime").arg(strSrcPath)); | |
| 591 | + worker.addSrcFile(QString("%1/prime/app-prime-modbus,/prime").arg(strSrcPath)); | |
| 592 | + worker.addSrcFile(QString("%1/prime/service-web,/prime").arg(strSrcPath)); | |
| 593 | + worker.addSrcFile(QString("%1/prime/app-prime-gui.md5,/prime").arg(strSrcPath)); | |
| 594 | + worker.addSrcFile(QString("%1/prime/app-prime-modbus.md5,/prime").arg(strSrcPath)); | |
| 595 | + worker.addSrcFile(QString("%1/prime/superdaemon.ini.md5,/prime").arg(strSrcPath)); | |
| 596 | + worker.addSrcFile(QString("%1/prime/superdaemon.md5,/prime").arg(strSrcPath)); | |
| 597 | + worker.setDestPath("/prime"); | |
| 597 | 598 | worker.addSrcDir(QString("%1/%2").arg(strSrcPath,"prime/cookbook")); |
| 599 | + worker.addSrcDir(QString("%1/%2").arg(strSrcPath,"prime/templates")); | |
| 600 | + worker.addSrcDir(QString("%1/%2").arg(strSrcPath,"prime/sounds")); | |
| 598 | 601 | worker.moveToThread(&programCopyThd); |
| 599 | 602 | |
| 600 | 603 | connect(&programCopyThd,SIGNAL(started()), &worker, SLOT(workerMain())); |
| ... | ... | @@ -721,9 +724,11 @@ void FileProcessDlg::standardInfoUpload() |
| 721 | 724 | QString strUsbPath; |
| 722 | 725 | QString strSrcPath; |
| 723 | 726 | if(FileProcessor::detectUSB(strUsbPath)){ |
| 724 | - strSrcPath = QString("%1/%2").arg(strUsbPath).arg(MODEL_INFO_FILE_NAME); | |
| 727 | + strSrcPath = QString("%1%2").arg(strUsbPath).arg(MODEL_INFO_FILE_NAME); | |
| 728 | + qDebug() <<strSrcPath; | |
| 725 | 729 | QFile file(MODEL_INFO_FILE_NAME); |
| 726 | 730 | file.remove(); |
| 731 | + sync(); | |
| 727 | 732 | if(QFile::copy( strSrcPath ,MODEL_INFO_FILE_NAME)){ |
| 728 | 733 | sync(); |
| 729 | 734 | ui->ctrWjProcess->setValue(40); |
| ... | ... | @@ -737,7 +742,8 @@ void FileProcessDlg::standardInfoUpload() |
| 737 | 742 | //QThread::msleep(800); |
| 738 | 743 | file.setFileName(CHEF_INFO_FILE_NAME); |
| 739 | 744 | file.remove(); |
| 740 | - strSrcPath = QString("%1/%2").arg(strUsbPath).arg(CHEF_INFO_FILE_NAME); | |
| 745 | + sync(); | |
| 746 | + strSrcPath = QString("%1%2").arg(strUsbPath).arg(CHEF_INFO_FILE_NAME); | |
| 741 | 747 | qDebug() << strSrcPath; |
| 742 | 748 | if(QFile::copy( strSrcPath ,CHEF_INFO_FILE_NAME)){ |
| 743 | 749 | sync(); |
| ... | ... | @@ -752,7 +758,8 @@ void FileProcessDlg::standardInfoUpload() |
| 752 | 758 | //QThread::msleep(800); |
| 753 | 759 | file.setFileName(SERVICE_INFO_FILE_NAME); |
| 754 | 760 | file.remove(); |
| 755 | - strSrcPath = QString("%1/%2").arg(strUsbPath).arg(SERVICE_INFO_FILE_NAME); | |
| 761 | + sync(); | |
| 762 | + strSrcPath = QString("%1%2").arg(strUsbPath).arg(SERVICE_INFO_FILE_NAME); | |
| 756 | 763 | qDebug() << strSrcPath; |
| 757 | 764 | if(QFile::copy( strSrcPath ,SERVICE_INFO_FILE_NAME)){ |
| 758 | 765 | sync(); | ... | ... |
app/gui/oven_control/images/symbol/main_logo.png
35.8 KB
app/gui/oven_control/lang_en.qm
No preview for this file type
app/gui/oven_control/lang_en.ts
| ... | ... | @@ -457,7 +457,7 @@ to factory setting values?</translation> |
| 457 | 457 | <message> |
| 458 | 458 | <location filename="config.h" line="95"/> |
| 459 | 459 | <source>제조일자</source> |
| 460 | - <translation>Date of Manufacturing </translation> | |
| 460 | + <translation>Date of Manufacturing</translation> | |
| 461 | 461 | </message> |
| 462 | 462 | <message> |
| 463 | 463 | <location filename="config.h" line="96"/> |
| ... | ... | @@ -1066,9 +1066,7 @@ Value</translation> |
| 1066 | 1066 | <message> |
| 1067 | 1067 | <location filename="configinfodlg.ui" line="144"/> |
| 1068 | 1068 | <source>확인</source> |
| 1069 | - <translation>Confirm | |
| 1070 | - | |
| 1071 | -Confirm</translation> | |
| 1069 | + <translation>Confirm</translation> | |
| 1072 | 1070 | </message> |
| 1073 | 1071 | <message> |
| 1074 | 1072 | <location filename="configinfodlg.cpp" line="12"/> |
| ... | ... | @@ -1138,7 +1136,7 @@ Confirm</translation> |
| 1138 | 1136 | <message> |
| 1139 | 1137 | <location filename="configinfodlg.cpp" line="101"/> |
| 1140 | 1138 | <source>제조일자</source> |
| 1141 | - <translation>Date of Manufacturing </translation> | |
| 1139 | + <translation>Date of Manufacturing</translation> | |
| 1142 | 1140 | </message> |
| 1143 | 1141 | <message> |
| 1144 | 1142 | <location filename="configinfodlg.cpp" line="102"/> | ... | ... |
app/gui/oven_control/mainwindow.ui
| ... | ... | @@ -646,71 +646,6 @@ QPushButton:pressed, QPushButton:focus { background-image: url(:/images/cook_typ |
| 646 | 646 | </property> |
| 647 | 647 | </widget> |
| 648 | 648 | </widget> |
| 649 | - <widget class="QLabel" name="steamLabel_13"> | |
| 650 | - <property name="enabled"> | |
| 651 | - <bool>true</bool> | |
| 652 | - </property> | |
| 653 | - <property name="geometry"> | |
| 654 | - <rect> | |
| 655 | - <x>750</x> | |
| 656 | - <y>1550</y> | |
| 657 | - <width>150</width> | |
| 658 | - <height>50</height> | |
| 659 | - </rect> | |
| 660 | - </property> | |
| 661 | - <property name="palette"> | |
| 662 | - <palette> | |
| 663 | - <active> | |
| 664 | - <colorrole role="WindowText"> | |
| 665 | - <brush brushstyle="SolidPattern"> | |
| 666 | - <color alpha="255"> | |
| 667 | - <red>255</red> | |
| 668 | - <green>255</green> | |
| 669 | - <blue>255</blue> | |
| 670 | - </color> | |
| 671 | - </brush> | |
| 672 | - </colorrole> | |
| 673 | - </active> | |
| 674 | - <inactive> | |
| 675 | - <colorrole role="WindowText"> | |
| 676 | - <brush brushstyle="SolidPattern"> | |
| 677 | - <color alpha="255"> | |
| 678 | - <red>255</red> | |
| 679 | - <green>255</green> | |
| 680 | - <blue>255</blue> | |
| 681 | - </color> | |
| 682 | - </brush> | |
| 683 | - </colorrole> | |
| 684 | - </inactive> | |
| 685 | - <disabled> | |
| 686 | - <colorrole role="WindowText"> | |
| 687 | - <brush brushstyle="SolidPattern"> | |
| 688 | - <color alpha="255"> | |
| 689 | - <red>123</red> | |
| 690 | - <green>123</green> | |
| 691 | - <blue>123</blue> | |
| 692 | - </color> | |
| 693 | - </brush> | |
| 694 | - </colorrole> | |
| 695 | - </disabled> | |
| 696 | - </palette> | |
| 697 | - </property> | |
| 698 | - <property name="font"> | |
| 699 | - <font> | |
| 700 | - <family>Malgun Gothic</family> | |
| 701 | - <pointsize>10</pointsize> | |
| 702 | - </font> | |
| 703 | - </property> | |
| 704 | - <property name="text"> | |
| 705 | - <string>V0.3.12</string> | |
| 706 | - </property> | |
| 707 | - <property name="alignment"> | |
| 708 | - <set>Qt::AlignBottom|Qt::AlignRight|Qt::AlignTrailing</set> | |
| 709 | - </property> | |
| 710 | - <property name="margin"> | |
| 711 | - <number>10</number> | |
| 712 | - </property> | |
| 713 | - </widget> | |
| 714 | 649 | <widget class="Line" name="line_7"> |
| 715 | 650 | <property name="geometry"> |
| 716 | 651 | <rect> |
| ... | ... | @@ -724,6 +659,22 @@ QPushButton:pressed, QPushButton:focus { background-image: url(:/images/cook_typ |
| 724 | 659 | <enum>Qt::Horizontal</enum> |
| 725 | 660 | </property> |
| 726 | 661 | </widget> |
| 662 | + <widget class="QLabel" name="label_5"> | |
| 663 | + <property name="geometry"> | |
| 664 | + <rect> | |
| 665 | + <x>0</x> | |
| 666 | + <y>1164</y> | |
| 667 | + <width>600</width> | |
| 668 | + <height>286</height> | |
| 669 | + </rect> | |
| 670 | + </property> | |
| 671 | + <property name="pixmap"> | |
| 672 | + <pixmap resource="resources.qrc">:/images/symbol/main_logo.png</pixmap> | |
| 673 | + </property> | |
| 674 | + <property name="alignment"> | |
| 675 | + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> | |
| 676 | + </property> | |
| 677 | + </widget> | |
| 727 | 678 | </widget> |
| 728 | 679 | </widget> |
| 729 | 680 | <layoutdefault spacing="6" margin="11"/> |
| ... | ... | @@ -773,6 +724,8 @@ QPushButton:pressed, QPushButton:focus { background-image: url(:/images/cook_typ |
| 773 | 724 | <tabstop>configButton</tabstop> |
| 774 | 725 | <tabstop>helpButton</tabstop> |
| 775 | 726 | </tabstops> |
| 776 | - <resources/> | |
| 727 | + <resources> | |
| 728 | + <include location="resources.qrc"/> | |
| 729 | + </resources> | |
| 777 | 730 | <connections/> |
| 778 | 731 | </ui> | ... | ... |
app/gui/oven_control/resources.qrc
| ... | ... | @@ -614,5 +614,6 @@ |
| 614 | 614 | <file>images/manual_button/013_sys_icon_06_03_active.png</file> |
| 615 | 615 | <file>images/manual_button/013_sys_icon_06_04_active.png</file> |
| 616 | 616 | <file>images/manual_button/013_sys_icon_06_active.png</file> |
| 617 | + <file>images/symbol/main_logo.png</file> | |
| 617 | 618 | </qresource> |
| 618 | 619 | </RCC> | ... | ... |
release.sh
release/application.tar
No preview for this file type
release/ramdisk-prime_oven-128M.gz
No preview for this file type
release/ramdisk-prime_oven-64M.gz
No preview for this file type
release/ramdisk-prime_oven.uboot
No preview for this file type
release/rootfs.tar
No preview for this file type
release/u-boot.imx
No preview for this file type
release/uImage
No preview for this file type
scripts/mk-app.sh
| 1 | 1 | #!/bin/sh |
| 2 | 2 | |
| 3 | 3 | FILES="superdaemon superdaemon.ini app-prime-modbus app-prime-gui" |
| 4 | +PACK="${FILES}" | |
| 4 | 5 | for FILE in ${FILES} |
| 5 | 6 | do |
| 6 | 7 | md5sum ${FILE} | awk '{print $1}' > ${FILE}.md5 |
| 8 | + PACK="${PACK} ${FILE}.md5" | |
| 7 | 9 | done |
| 10 | + | |
| 11 | +tar cf application.tar ${PACK} config cookbook history program run.sh sounds | ... | ... |
scripts/mk-emmc-fusing.sh
| ... | ... | @@ -1,192 +0,0 @@ |
| 1 | -#!/bin/bash | |
| 2 | - | |
| 3 | -C_NC='\033[0m' | |
| 4 | -C_LRED='\033[1;31m' | |
| 5 | - | |
| 6 | - | |
| 7 | -EMMC_DEV_PATH="/dev/mmcblk3" | |
| 8 | -SD_DEV_PATH="/dev/mmcblk2" | |
| 9 | -PART1=p1 | |
| 10 | -PART2=p2 | |
| 11 | -PART3=p3 | |
| 12 | -PART4=p4 | |
| 13 | - | |
| 14 | -FNAME_UBOOT="u-boot.imx" | |
| 15 | -FNAME_LOGO="init.bmp" | |
| 16 | -FNAME_DTB="imx6s-prime-oven.dtb" | |
| 17 | -FNAME_KERNEL="uImage" | |
| 18 | -FNAME_FSCPIO="ramdisk-prime_oven.uboot" | |
| 19 | -FNAME_RFS="rootfs.tar" | |
| 20 | -FNAME_APP="application.tar" | |
| 21 | - | |
| 22 | -SD_MOUNT_PATH_P1="/tmp/mmcblk2p1" | |
| 23 | -EMMC_MOUNT_PATH_P1="/tmp/mmcblk3p1" | |
| 24 | -EMMC_MOUNT_PATH_P2="/tmp/mmcblk3p2" | |
| 25 | -EMMC_MOUNT_PATH_P3="/tmp/mmcblk3p3" | |
| 26 | -EMMC_MOUNT_PATH_P4="/tmp/mmcblk3p4" | |
| 27 | - | |
| 28 | -function Init_Unmount() | |
| 29 | -{ | |
| 30 | - echo "" | |
| 31 | - echo -e "${C_LRED}### UnMount - Init_Unmount() ### ${C_NC}" | |
| 32 | - echo "" | |
| 33 | - umount ${EMMC_DEV_PATH}${PART1} | |
| 34 | - umount ${EMMC_DEV_PATH}${PART2} | |
| 35 | - umount ${EMMC_DEV_PATH}${PART3} | |
| 36 | - umount ${EMMC_DEV_PATH}${PART4} | |
| 37 | - umount ${SD_DEV_PATH}${PART1} | |
| 38 | - umount ${SD_DEV_PATH}${PART2} | |
| 39 | -} | |
| 40 | - | |
| 41 | -function create_partition() | |
| 42 | -{ | |
| 43 | - echo "" | |
| 44 | - echo -e "${C_LRED}### Fdisk Create Partition - create_partition() ###${C_NC}" | |
| 45 | - echo "" | |
| 46 | -fdisk ${EMMC_DEV_PATH} << EOF | |
| 47 | -o | |
| 48 | -n | |
| 49 | -p | |
| 50 | -1 | |
| 51 | -4096 | |
| 52 | -8191 | |
| 53 | -n | |
| 54 | -p | |
| 55 | -2 | |
| 56 | -8192 | |
| 57 | -16383 | |
| 58 | -n | |
| 59 | -p | |
| 60 | -3 | |
| 61 | -16384 | |
| 62 | -32767 | |
| 63 | -n | |
| 64 | -p | |
| 65 | -32768 | |
| 66 | - | |
| 67 | -p | |
| 68 | -w | |
| 69 | -EOF | |
| 70 | -} | |
| 71 | - | |
| 72 | -function run_format() | |
| 73 | -{ | |
| 74 | - echo "" | |
| 75 | - echo -e "${C_LRED}### Format eMMC - run_format() ###${C_NC}" | |
| 76 | - echo "" | |
| 77 | - mkfs.ext3 -F ${EMMC_DEV_PATH}${PART1} -L BOOT0 | |
| 78 | - mkfs.ext4 -j -F ${EMMC_DEV_PATH}${PART2} -L SYSTEM | |
| 79 | - mkfs.ext4 -j -F ${EMMC_DEV_PATH}${PART3} -L FALINUX | |
| 80 | - mkfs.ext4 -j -F ${EMMC_DEV_PATH}${PART4} -L PRIME | |
| 81 | -} | |
| 82 | - | |
| 83 | -function run_mount() | |
| 84 | -{ | |
| 85 | - echo "" | |
| 86 | - echo -e "${C_LRED}### Mount SD/eMMC - run_mount() ###${C_NC}" | |
| 87 | - echo "" | |
| 88 | - | |
| 89 | - if [ ! -d ${SD_MOUNT_PATH_P1} ]; then | |
| 90 | - mkdir ${SD_MOUNT_PATH_P1} | |
| 91 | - fi | |
| 92 | - | |
| 93 | - if [ ! -d ${EMMC_MOUNT_PATH_P1} ]; then | |
| 94 | - mkdir ${EMMC_MOUNT_PATH_P1} | |
| 95 | - fi | |
| 96 | - | |
| 97 | - if [ ! -d ${EMMC_MOUNT_PATH_P2} ]; then | |
| 98 | - mkdir ${EMMC_MOUNT_PATH_P2} | |
| 99 | - fi | |
| 100 | - | |
| 101 | - if [ ! -d ${EMMC_MOUNT_PATH_P3} ]; then | |
| 102 | - mkdir ${EMMC_MOUNT_PATH_P3} | |
| 103 | - fi | |
| 104 | - | |
| 105 | - if [ ! -d ${EMMC_MOUNT_PATH_P4} ]; then | |
| 106 | - mkdir ${EMMC_MOUNT_PATH_P4} | |
| 107 | - fi | |
| 108 | - | |
| 109 | - mount -t ext4 ${SD_DEV_PATH}${PART1} ${SD_MOUNT_PATH_P1} | |
| 110 | - mount -t ext3 ${EMMC_DEV_PATH}${PART1} ${EMMC_MOUNT_PATH_P1} | |
| 111 | - mount -t ext4 ${EMMC_DEV_PATH}${PART2} ${EMMC_MOUNT_PATH_P2} | |
| 112 | - mount -t ext4 ${EMMC_DEV_PATH}${PART3} ${EMMC_MOUNT_PATH_P3} | |
| 113 | - mount -t ext4 ${EMMC_DEV_PATH}${PART4} ${EMMC_MOUNT_PATH_P4} | |
| 114 | -} | |
| 115 | - | |
| 116 | -function run_copy_image() | |
| 117 | -{ | |
| 118 | - echo "" | |
| 119 | - echo -e "${C_LRED}### Write SD Boot Image - run_copy_image() ###${C_NC}" | |
| 120 | - echo "" | |
| 121 | - | |
| 122 | - if [ ! -d ${EMMC_MOUNT_PATH_P1}/boot ]; then | |
| 123 | - mkdir ${EMMC_MOUNT_PATH_P1}/boot | |
| 124 | - fi | |
| 125 | - | |
| 126 | - cp -v ${SD_MOUNT_PATH_P1}/boot/${FNAME_UBOOT} ${EMMC_MOUNT_PATH_P1}/boot/ | |
| 127 | - cp -v ${SD_MOUNT_PATH_P1}/boot/${FNAME_LOGO} ${EMMC_MOUNT_PATH_P1}/boot/ | |
| 128 | - cp -v ${SD_MOUNT_PATH_P1}/boot/${FNAME_DTB} ${EMMC_MOUNT_PATH_P1}/boot/ | |
| 129 | - cp -v ${SD_MOUNT_PATH_P1}/boot/${FNAME_KERNEL} ${EMMC_MOUNT_PATH_P1}/boot/ | |
| 130 | - cp -v ${SD_MOUNT_PATH_P1}/boot/${FNAME_FSCPIO} ${EMMC_MOUNT_PATH_P1}/boot/ | |
| 131 | - run_copy_rootfs | |
| 132 | - sleep 1 | |
| 133 | - sync | |
| 134 | -} | |
| 135 | - | |
| 136 | -function run_copy_rootfs() | |
| 137 | -{ | |
| 138 | - echo "" | |
| 139 | - echo -e "${C_LRED}### Make MMC Filesystem ###${C_NC}" | |
| 140 | - echo "" | |
| 141 | - | |
| 142 | - tar -xf ${SD_MOUNT_PATH_P1}/boot/${FNAME_RFS} -C ${EMMC_MOUNT_PATH_P2} | |
| 143 | - | |
| 144 | - cp /etc/ssh/ssh_host_ed25519_key ${EMMC_MOUNT_PATH_P2}/etc/ssh/ | |
| 145 | - | |
| 146 | - tar -xf ${SD_MOUNT_PATH_P1}/boot/${FNAME_APP} -C ${EMMC_MOUNT_PATH_P3} | |
| 147 | - tar -xf ${SD_MOUNT_PATH_P1}/boot/${FNAME_APP} -C ${EMMC_MOUNT_PATH_P4} | |
| 148 | -} | |
| 149 | - | |
| 150 | -function run_raw_write() | |
| 151 | -{ | |
| 152 | - echo "" | |
| 153 | - echo -e "${C_LRED}### Write SD Boot Image to RAW - run_raw_write() ###${C_NC}" | |
| 154 | - echo "" | |
| 155 | - dd if=${SD_MOUNT_PATH_P1}/boot/${FNAME_UBOOT} of=${EMMC_DEV_PATH} bs=512 seek=2 | |
| 156 | - dd if=${SD_MOUNT_PATH_P1}/boot/${FNAME_LOGO} of=${EMMC_DEV_PATH} bs=512 seek=2048 | |
| 157 | - dd if=${SD_MOUNT_PATH_P1}/boot/${FNAME_DTB} of=${EMMC_DEV_PATH} bs=512 seek=11264 | |
| 158 | - dd if=${SD_MOUNT_PATH_P1}/boot/${FNAME_KERNEL} of=${EMMC_DEV_PATH} bs=512 seek=12288 | |
| 159 | - dd if=${SD_MOUNT_PATH_P1}/boot/${FNAME_FSCPIO} of=${EMMC_DEV_PATH} bs=512 seek=28672 | |
| 160 | - sleep 1 | |
| 161 | - sync | |
| 162 | -} | |
| 163 | - | |
| 164 | -function run_umount() | |
| 165 | -{ | |
| 166 | - echo "" | |
| 167 | - echo -e "${C_LRED}### UnMount - run_umount() ###${C_NC}" | |
| 168 | - echo "" | |
| 169 | - umount ${SD_MOUNT_PATH_P1} | |
| 170 | - umount ${EMMC_MOUNT_PATH_P1} | |
| 171 | - umount ${EMMC_MOUNT_PATH_P2} | |
| 172 | - umount ${EMMC_MOUNT_PATH_P3} | |
| 173 | - umount ${EMMC_MOUNT_PATH_P4} | |
| 174 | -} | |
| 175 | - | |
| 176 | - | |
| 177 | -function main() | |
| 178 | -{ | |
| 179 | - echo "" | |
| 180 | - echo -e "${C_LRED}#### Start - main() ####${C_NC}" | |
| 181 | - echo "" | |
| 182 | - | |
| 183 | - Init_Unmount | |
| 184 | - create_partition | |
| 185 | - run_format | |
| 186 | - run_mount | |
| 187 | - run_copy_image | |
| 188 | - run_raw_write | |
| 189 | - run_umount | |
| 190 | -} | |
| 191 | - | |
| 192 | -main |
scripts/mk-emmc-fusing.sh
scripts/mk-fusingsd.sh
| ... | ... | @@ -1,180 +0,0 @@ |
| 1 | -#!/bin/bash | |
| 2 | - | |
| 3 | -C_NC='\033[0m' | |
| 4 | -C_LRED='\033[1;31m' | |
| 5 | - | |
| 6 | -#### Partition Number #### | |
| 7 | -P1_NUM="1" | |
| 8 | - | |
| 9 | -DEVNAME="mmcblk0" | |
| 10 | -DEV_PATH="/dev/mmcblk0" | |
| 11 | -DEV_PATH_P1="/dev/mmcblk0p1" | |
| 12 | -INPUT="/tmp/input" | |
| 13 | - | |
| 14 | -FNAME_UBOOT="u-boot.imx" | |
| 15 | -FNAME_LOGO="init.bmp" | |
| 16 | -FNAME_DTB="imx6s-prime-oven.dtb" | |
| 17 | -FNAME_KERNEL="uImage" | |
| 18 | -FNAME_FSCPIO="ramdisk-prime_oven.uboot" | |
| 19 | -FNAME_RFS="rootfs.tar" | |
| 20 | -FNAME_APP="application.tar" | |
| 21 | - | |
| 22 | -MOUNT_PATH_P1="/tmp/mmcblk0p1" | |
| 23 | - | |
| 24 | - | |
| 25 | -function create_partition() | |
| 26 | -{ | |
| 27 | - echo "" | |
| 28 | - echo -e "${C_LRED}### Fdisk Create Partition - create_partition() ###${C_NC}" | |
| 29 | - echo "" | |
| 30 | -fdisk $DEV_PATH << EOF | |
| 31 | -o | |
| 32 | -n | |
| 33 | -p | |
| 34 | -1 | |
| 35 | -262144 | |
| 36 | - | |
| 37 | -p | |
| 38 | -w | |
| 39 | -EOF | |
| 40 | -} | |
| 41 | - | |
| 42 | -function run_format() | |
| 43 | -{ | |
| 44 | - echo "" | |
| 45 | - echo -e "${C_LRED}### Format SDCARD - run_format() ###${C_NC}" | |
| 46 | - echo "" | |
| 47 | - echo "y" | mkfs.ext4 ${DEV_PATH}${P1_NUM} -L BOOT0 | |
| 48 | -} | |
| 49 | - | |
| 50 | -function run_mount() | |
| 51 | -{ | |
| 52 | - echo "" | |
| 53 | - echo -e "${C_LRED}### Mount SD - run_mount() ###${C_NC}" | |
| 54 | - echo "" | |
| 55 | - if [ ! -d ${MOUNT_PATH_P1} ]; then | |
| 56 | - mkdir ${MOUNT_PATH_P1} | |
| 57 | - fi | |
| 58 | - | |
| 59 | - mount ${DEV_PATH}${P1_NUM} ${MOUNT_PATH_P1} | |
| 60 | -} | |
| 61 | - | |
| 62 | -function run_umount() | |
| 63 | -{ | |
| 64 | - echo "" | |
| 65 | - echo -e "${C_LRED}### UnMount - run_umount() ###${C_NC}" | |
| 66 | - echo "" | |
| 67 | - umount ${MOUNT_PATH_P1} | |
| 68 | -} | |
| 69 | - | |
| 70 | -function run_copy_image() | |
| 71 | -{ | |
| 72 | - # SD Boot Image(SD 카드 부팅용 이미지) | |
| 73 | - echo "" | |
| 74 | - echo -e "${C_LRED}### Write SD Boot Image - run_copy_image() ###${C_NC}" | |
| 75 | - echo "" | |
| 76 | - if [ ! -d ${MOUNT_PATH_P1}/boot ]; then | |
| 77 | - mkdir ${MOUNT_PATH_P1}/boot | |
| 78 | - fi | |
| 79 | - cp -v ./$FNAME_UBOOT ${MOUNT_PATH_P1}/boot/ | |
| 80 | - cp -v ./$FNAME_LOGO ${MOUNT_PATH_P1}/boot/ | |
| 81 | - cp -v ./$FNAME_DTB ${MOUNT_PATH_P1}/boot/ | |
| 82 | - cp -v ./$FNAME_KERNEL ${MOUNT_PATH_P1}/boot/ | |
| 83 | - cp -v ./$FNAME_FSCPIO ${MOUNT_PATH_P1}/boot/ | |
| 84 | - cp -v ./$FNAME_RFS ${MOUNT_PATH_P1}/boot/ | |
| 85 | - cp -v ./$FNAME_APP ${MOUNT_PATH_P1}/boot/ | |
| 86 | - sleep 1 | |
| 87 | - sync | |
| 88 | -} | |
| 89 | - | |
| 90 | -function run_raw_write() | |
| 91 | -{ | |
| 92 | - echo "" | |
| 93 | - echo -e "${C_LRED}### Write SD Boot Image to RAW - run_raw_write() ###${C_NC}" | |
| 94 | - echo "" | |
| 95 | - dd if=./$FNAME_UBOOT of=$DEV_PATH bs=512 seek=2 | |
| 96 | - dd if=./$FNAME_LOGO of=$DEV_PATH bs=512 seek=2048 | |
| 97 | - dd if=./$FNAME_DTB of=$DEV_PATH bs=512 seek=11264 | |
| 98 | - dd if=./$FNAME_KERNEL of=$DEV_PATH bs=512 seek=12288 | |
| 99 | - dd if=./$FNAME_FSCPIO of=$DEV_PATH bs=512 seek=28672 | |
| 100 | - sleep 1 | |
| 101 | - sync | |
| 102 | -} | |
| 103 | - | |
| 104 | -function Init_Unmount() | |
| 105 | -{ | |
| 106 | - echo "" | |
| 107 | - echo -e "${C_LRED}### Unmount SD - Init_Unmount() ###${C_NC}" | |
| 108 | - echo "" | |
| 109 | -# umount $DEV_PATH_P1 | |
| 110 | - umount $DEV_PATH* | |
| 111 | -} | |
| 112 | - | |
| 113 | -function main() | |
| 114 | -{ | |
| 115 | - echo "" | |
| 116 | - echo -e "${C_LRED}#### Start - main() ####${C_NC}" | |
| 117 | - echo "" | |
| 118 | - Init_Unmount | |
| 119 | - create_partition | |
| 120 | - | |
| 121 | - run_format | |
| 122 | - run_mount | |
| 123 | - run_raw_write | |
| 124 | - run_copy_image | |
| 125 | - run_umount | |
| 126 | - sync | |
| 127 | -} | |
| 128 | - | |
| 129 | -if [[ "$1" == "sd"* ]]; then | |
| 130 | - if [ "$1" != "sd" ]; then | |
| 131 | - P1_NUM="1" | |
| 132 | - else | |
| 133 | - echo "Missing Partition Number" | |
| 134 | - exit | |
| 135 | - fi | |
| 136 | - | |
| 137 | -elif [[ "$1" == "mmcblk"* ]]; then | |
| 138 | - if [ "$1" != "mmcblk" ]; then | |
| 139 | - P1_NUM="p1" | |
| 140 | - else | |
| 141 | - echo "Missing Partition Number" | |
| 142 | - exit | |
| 143 | - fi | |
| 144 | -else | |
| 145 | - echo "Wrong Device Name" | |
| 146 | - exit | |
| 147 | -fi | |
| 148 | - | |
| 149 | - | |
| 150 | -if [ "$1" != "" ]; then | |
| 151 | - DEVNAME=$1 | |
| 152 | -fi | |
| 153 | - | |
| 154 | -DEV_PATH="/dev/${DEVNAME}" | |
| 155 | -DEV_PATH_P1="${DEV_PATH}${P1_NUM}" | |
| 156 | -MOUNT_PATH_P1="/tmp/${DEVNAME}${P1_NUM}" | |
| 157 | - | |
| 158 | -echo "" | |
| 159 | -echo "================================" | |
| 160 | -echo "DEV_Name: $DEVNAME" | |
| 161 | -echo "DEV_Path: $DEV_PATH" | |
| 162 | -echo "P1 MountPath: $MOUNT_PATH_P1" | |
| 163 | -echo "================================" | |
| 164 | -echo "" | |
| 165 | - | |
| 166 | -read -p "IS Right? (y/n): " -n 2 -e IS_RIGHT | |
| 167 | - | |
| 168 | -if [ "$IS_RIGHT" == "y" ]; then | |
| 169 | - main | |
| 170 | -elif [ "$IS_RIGHT" == "Y" ]; then | |
| 171 | - main | |
| 172 | -else | |
| 173 | - echo -e "Exit This Script" | |
| 174 | - exit | |
| 175 | -fi | |
| 176 | - | |
| 177 | - | |
| 178 | - | |
| 179 | - | |
| 180 | - |
scripts/mk-fusingsd.sh