Browse Source

Merge branch 'master' of gitee.com:openLuat/luatos-soc-air101

Wendal Chen 4 years ago
parent
commit
0ce963739a
6 changed files with 5 additions and 102 deletions
  1. 0 3
      build_xmake.bat
  2. 5 12
      readme.md
  3. 0 0
      tools/abc
  4. BIN
      tools/xt804/wm_getver
  5. 0 87
      tools/xt804/wm_getver.c
  6. BIN
      tools/xt804/wm_tool

+ 0 - 3
build_xmake.bat

@@ -1,3 +0,0 @@
-@echo off
-xmake
-pause

+ 5 - 12
readme.md

@@ -1,22 +1,15 @@
-
 # Air101/Air103 固件源码库
 # Air101/Air103 固件源码库
 
 
-## 编译说明
-自行下载平头哥[编译器](https://occ.t-head.cn/community/download?id=3885366095506644992)解压命名为csky-elfabiv2-tools-mingw-minilibc
-windows放在E盘根目录下并配置好环境变量
-linux放在opt根目录下并配置好环境变量
-
-详细安装见[ReleaseNotes.pdf](https://occ-oss-prod.oss-cn-hangzhou.aliyuncs.com/resource/null/1614234913073/ReleaseNotes.pdf)
+Air101和Air103是基于平头哥XT804内核设计的soc,使用相同内核的W800和W806同样可以使用本仓库代码。
 
 
-release模式会编译出.soc格式,需安装[7z](https://www.7-zip.org/)
+W806对应Air103,可以看Air103相关教程
 
 
-## windows环境下
-
-下载xmake[安装包](https://github.com/xmake-io/xmake/releases)安装,在命令行下cd到代码所在目录,执行xmake即可
+## 编译说明
+见wiki编译教程[Air101 / Air103 - LuatOS 文档](https://wiki.luatos.com/develop/compile/Air101.html)
 
 
 ## lib编译
 ## lib编译
 
 
-在lib目录下执行xmake -j1 -P即可
+全部编译比较耗时,因此将lib部分预编译进行使用,平时仅编译app部分即可,当需要改动lib部分时需要在lib目录下执行xmake -j1 -P即可。**注意:编译lib后一定要将build删掉重新编译app**
 
 
 
 
 
 

+ 0 - 0
tools/abc


BIN
tools/xt804/wm_getver


+ 0 - 87
tools/xt804/wm_getver.c

@@ -1,87 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define LINE_LEN_MAX    1024
-
-int main(int argc, char *argv[])
-{
-    FILE *fp;
-    char buf[LINE_LEN_MAX];
-    char *pos;
-    unsigned char major = 0;
-    unsigned char minor = 0;
-    unsigned char patch = 0;
-    int done = 0;
-
-    if (2 != argc)
-    {
-        printf("error: parameters please pass wm_main.c path\r\n");
-        return -1;
-    }
-
-    fp = fopen(argv[1], "rb");
-    if (!fp)
-    {
-        printf("error: failed to open %s\r\n", argv[1]);
-        return -2;
-    }
-
-    while (fgets(buf, LINE_LEN_MAX, fp))
-    {
-        if (0 == done)
-        {
-            pos = strstr(buf, "FW_MAJOR_VER");
-            if (pos)
-            {
-                pos = strchr(pos, '0');
-                if (pos)
-                {
-                    major = strtol(pos, NULL, 16);
-                    done = 1;
-                }
-            }
-        }
-
-        if (1 == done)
-        {
-            pos = strstr(buf, "FW_MINOR_VER");
-            if (pos)
-            {
-                pos = strchr(pos, '0');
-                if (pos)
-                {
-                    minor = strtol(pos, NULL, 16);
-                    done = 2;
-                }
-            }
-        }
-
-        if (2 == done)
-        {
-            pos = strstr(buf, "FW_PATCH_VER");
-            if (pos)
-            {
-                pos = strchr(pos, '0');
-                if (pos)
-                {
-                    patch = strtol(pos, NULL, 16);
-                    done = 3;
-                    break;
-                }
-            }
-        }
-    }
-
-    fclose(fp);
-
-    if (3 == done)
-    {
-        sprintf(buf, "G%02X.%02X.%02X", major, minor, patch);
-        printf("%s", buf);
-        return 0;
-    }
-
-    return -4;
-}
-

BIN
tools/xt804/wm_tool