20200207_jeffrey - silenceuncrio/diary GitHub Wiki

0850

jubuntu 昨天下班時 proscend 外層的 build

早上看還是 fail 了

ICENSE         Makefile   artifact  build-image.sh  build_dir  dl    feeds       feeds.conf.default  include    key-build.pub  pre-commit.hook  proenv.sh  qca       scripts      target  toolchain
Config.in    M350_defconfig  README.md  bin       build.sh        config     docs  feeds.conf  full_image          key-build  package        prebuilt         proscend   rules.mk  staging_dir  tmp     tools
user@5de2e7d6975e:~$ make
Checking 'uuencode'... ok.
 make[1] world
 make[2] toolchain/install
 make[3] -C toolchain/gdb prepare
 make[3] -C toolchain/gdb compile
 make[3] -C toolchain/gdb install
 make[3] -C toolchain/binutils prepare
 make[3] -C toolchain/binutils compile
 make[3] -C toolchain/binutils install
 make[3] -C toolchain/gcc/minimal prepare
 make[3] -C toolchain/gcc/minimal compile
 make[3] -C toolchain/gcc/minimal install
 make[3] -C toolchain/kernel-headers prepare
 make[3] -C toolchain/kernel-headers compile
 make[3] -C toolchain/kernel-headers install
 make[3] -C toolchain/uClibc/headers prepare
 make[3] -C toolchain/uClibc/headers compile
 make[3] -C toolchain/uClibc/headers install
 make[3] -C toolchain/gcc/initial prepare
 make[3] -C toolchain/gcc/initial compile
 make[3] -C toolchain/gcc/initial install
 make[3] -C toolchain/uClibc prepare
 make[3] -C toolchain/uClibc compile
 make[3] -C toolchain/uClibc install
 make[3] -C toolchain/gcc/final prepare
 make[3] -C toolchain/gcc/final compile
 make[3] -C toolchain/gcc/final install
 make[3] -C toolchain/uClibc/utils prepare
 make[3] -C toolchain/uClibc/utils compile
 make[3] -C toolchain/uClibc/utils install
 make[2] target/compile
 make[3] -C target/linux compile
 make[2] package/cleanup
 make[2] package/compile
 make[3] -C package/libs/toolchain compile
 make[3] -C package/libs/libnl-tiny compile
 make[3] -C package/libs/libjson-c compile
 make[3] -C package/utils/lua compile
 make[3] -C package/libs/libubox compile
 make[3] -C package/system/ubus compile
 make[3] -C package/system/uci compile
 make[3] -C package/network/config/netifd compile
 make[3] -C package/system/opkg host-compile
 make[3] -C package/system/ubox compile
 make[3] -C package/libs/gettext compile
 make[3] -C package/libs/libiconv compile
 make[3] -C package/libs/libtool compile
 make[3] -C package/libs/lzo compile
 make[3] -C package/libs/zlib compile
 make[3] -C package/libs/ncurses host-compile
 make[3] -C package/libs/ncurses compile
 make[3] -C package/libs/ncurses compile
 make[3] -C package/libs/ncurses compile
 make[3] -C package/utils/util-linux compile
 make[3] -C package/utils/ubi-utils compile
 make[3] -C package/system/procd compile
 make[3] -C package/system/usign host-compile
 make[3] -C package/utils/jsonfilter compile
 make[3] -C package/system/usign compile
 make[3] -C package/base-files compile
 make[3] -C package/boot/lk-qca compile
 make[3] -C package/boot/lk-qca compile
 make[3] -C package/system/fstools compile
 make[3] -C package/boot/uboot-envtools compile
 make[3] -C package/boot/uboot-ipq40xx compile
 make[3] -C package/boot/uboot-ipq806x compile
 make[3] -C package/devel/binutils compile
 make[3] -C package/libs/libreadline compile
 make[3] -C package/devel/gdb compile
 make[3] -C package/libs/argp-standalone compile
 make[3] -C package/utils/bzip2 compile
 make[3] -C package/libs/elfutils compile
 make[3] -C package/devel/perf compile
 make[3] -C package/devel/trace-cmd compile
 make[3] -C package/devel/valgrind compile
 make[3] -C qca/feeds/qca/net/qca-wifi-fw-10.2.4 compile
 make[3] -C qca/feeds/qca/net/qca-wifi-fw-10.2.4 compile
 make[3] -C qca/feeds/qca/net/qca-wifi-fw-10.4-ar71xx compile
 make[3] -C qca/feeds/qca/net/qca-wifi-fw-10.4 compile
 make[3] -C qca/feeds/qca/net/qca-wifi-fw-10.4 compile
 make[3] -C qca/feeds/qca/net/qca-wifi-fw-10.4 compile
 make[3] -C package/firmware/linux-firmware compile
 make[3] -C package/network/utils/iw compile
 make[3] -C package/kernel/linux compile
 make[3] -C package/network/utils/iproute2 compile
 make[3] -C package/network/utils/iproute2 compile
 make[3] -C package/network/utils/wireless-tools compile
 make[3] -C qca/feeds/nss-host/qca-nss-gmac compile
 make[3] -C qca/feeds/nss-host/qca-nss-drv compile
 make[3] -C qca/feeds/qca/net/qca-wifi compile
 make[3] -C qca/feeds/qca/net/qca-wifi compile
 make[3] -C qca/feeds/qca/net/qca-wifi compile
 make[3] -C qca/feeds/athdiag/athdiag compile
 make[3] -C qca/feeds/bluetopia/bluetopia compile
 make[3] -C qca/feeds/luci/modules/luci-base host-compile
 make[3] -C package/network/utils/iptables compile
 make[3] -C package/network/config/firewall compile
 make[3] -C package/utils/lua host-compile
 make[3] -C qca/feeds/luci/applications/luci-app-firewall compile
 make[3] -C qca/feeds/luci/libs/luci-lib-ip compile
 make[3] -C qca/feeds/luci/libs/luci-lib-nixio compile
 make[3] -C package/network/utils/iwinfo compile
 make[3] -C package/system/rpcd compile
 make[3] -C qca/feeds/luci/modules/luci-base compile
 make[3] -C qca/feeds/luci/modules/luci-mod-admin-full compile
 make[3] -C qca/feeds/luci/protocols/luci-proto-ppp compile
 make[3] -C qca/feeds/luci/themes/luci-theme-bootstrap compile
 make[3] -C package/libs/polarssl compile
 make[3] -C package/libs/ustream-ssl compile
 make[3] -C package/network/services/uhttpd compile
 make[3] -C qca/feeds/luci/protocols/luci-proto-ipv6 compile
 make[3] -C qca/feeds/luci/collections/luci compile
 make[3] -C package/libs/ocf-crypto-headers compile
 make[3] -C package/libs/openssl compile
 make[3] -C qca/feeds/packages/net/bind compile
 make[3] -C package/libs/mbedtls compile
 make[3] -C package/libs/nghttp2 compile
 make[3] -C package/network/utils/curl compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/user/include/toplevel.mk:186: recipe for target 'world' failed
make: *** [world] Error 1
user@5de2e7d6975e:~$

先退出 jubuntu 吧


開啟 jjbox


review task


this week

M300:

  • porting gre from m330 to m300
    • Makefile of grek need CFLAGS += -D_DEFAULT_SOURCE
  • in customer profile, no more PROSRC_GRE_2G or PROSRC_GRE_3G, only PROSRC_GRE
  • set /proc/sys/net/ipv4/conf/gre1/accept_local to 1; unable response to gre keepalive request
  • application note: BGP over GRE for customer ADVICE M300[develop]
  • porting new gre module from m330 M300[release/v2.03]
  • remove keepalive function from gre
  • no more greK needed
    • grek is the service offer the gre tunnel keepalive
  • no more iweb needed
    • web server: iweb is already replaced by lighttpd
  • correct the path of 'ip'

m330[release/v0.09]

  • more user friendly the 'WAN > Priority' page
    • while applying, disabled all configurable fields
    • even user press 'Esc' to escape the 'Reboot' after apply, keep the last apply values
      • then the 'Reboot' verification logic works fine
  • add 'Diagnosis > TTY2TCP' for all profile
  • use ntohs and htons correctly to ignore the Big/Little-Endian effect

m350:

  • testing m350 response to gre keepalive with accept_local=1
    • yes
  • let the web getting better in new project m350[develop]
  • porting gre from m330
    • in grek, also concern with htons and ntohs
    • these concern should apply to m330
  • update Font Awesome from version 4.6.3 to 5.12.1
    • then we have more icon to use; like icon for see/un-see the password
  • give all types of webfonts for fontawsome
    • ie browser is not like chrome; we should use different browser when implementing web related jobs
  • at online manual, use the same source of font awesome as main application
    • save some image size

task list

M300

  • P2 - BGP over GRE
    • done M330
  • P3 - Web UI; GPS Track drawing(Server)

M350

  • GRE
    • done
  • GRE keepalive
    • done

M360

  • P2 - BGP with MD5

順手寫 week report

1115

RD 週會剛結束

接下來檯面上的 task 為 M360 - P2 - BGP with MD5

希望可以爭取一些訂單

1310

DQA jason 讓我知道 BGP over GRE 要注意到 update source 的重要性

沒設定的話 bgp 是沒有作用的

參考資料如下

1425

M360 - P2 - BGP with MD5 開工

回到 jbox...

還是想要把 jubuntu 搞起來

然後每個 project 各自都有自己的 vmdk

然後用 mount 的方式

才不會像 jbox 現在這樣 - 擁腫 - 容易出問題

現在來試試 jubuntu 吧

1510

開機後 putty 進 shell

先 mount D:\vmdk\m350.vmdk 這個 hard disk

mkdir -p /home/jeffrey/m350
sudo mount UUID="7e970ddc-986b-4246-bbcf-f6eb90ed93b5" /home/jeffrey/m350

mount 後的 m350 source code 在 /home/jeffrey/m350/m350

➜  m350 git:(develop) ✗ pwd
/home/jeffrey/m350/m350

在該目錄下 run container

docker run --detach --interactive --tty \
  --name build-m350 \
  --env LOCAL_USER_ID=`id -u $USER` \
  --env LOCAL_GROUP_ID=`id -g $USER` \
  --volume `pwd`:/home/user \
  build-m350 /bin/bash

進入該 container

docker exec -it -u user build-m350

進入該 container 後 cd 到 source code 所在 - /home/user

執行 source proenv.sh

執行 make

...
 make[3] -C package/network/utils/curl compile
make -r world: build failed. Please re-run make with -j1 V=s to see what's going on
/home/user/include/toplevel.mk:186: recipe for target 'world' failed
make: *** [world] Error 1
user@7ce0332cbc48:~$

跟早上一樣的錯誤

照著提示改 run make -j1 V=s

...
make[3]: Entering directory '/home/user/package/network/utils/curl'
make   -C /home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0 DESTDIR="/home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0/ipkg-install" CC="arm-openwrt-linux-uclibcgnueabi-gcc" install
make[4]: Entering directory '/home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0'
Making install in lib
make[5]: Entering directory '/home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0/lib'
  CCLD     libcurl.la
OpenWrt-libtool: link: `libcurl_la-http.lo' is not a valid libtool object
Makefile:894: recipe for target 'libcurl.la' failed
make[5]: *** [libcurl.la] Error 1
make[5]: Leaving directory '/home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0/lib'
Makefile:907: recipe for target 'install-recursive' failed
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory '/home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0'
Makefile:179: recipe for target '/home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0/.built' failed
make[3]: *** [/home/user/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/curl-7.57.0/.built] Error 2
make[3]: Leaving directory '/home/user/package/network/utils/curl'
package/Makefile:191: recipe for target 'package/network/utils/curl/compile' failed
make[2]: *** [package/network/utils/curl/compile] Error 2
make[2]: Leaving directory '/home/user'
package/Makefile:188: recipe for target '/home/user/staging_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/stamp/.package_compile' failed
make[1]: *** [/home/user/staging_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/user'
/home/user/include/toplevel.mk:186: recipe for target 'world' failed
make: *** [world] Error 2
user@7ce0332cbc48:~$

看來是 package/network/utils/curl 出了問題

clean - make package/network/utils/curl/clean V=s

再 make - make package/network/utils/curl/make V=s

好了???

再來 make 吧

1625

還再 build... 看來 jubuntu 有譜了

今天下班前再幫 m360 搞個專屬的 vmdk

1720

build 好囉

proscend 內層等下禮拜再說

趕緊準備 m360.vmdk


一樣是參考以下搞定了 m360.vmdk

ubuntu新增新硬碟 ubuntu 新增硬碟(磁碟分割、格式化與掛載)


mount D:\vmdk\m360.vmdk 這個 hard disk

mkdir -p /home/jeffrey/m360
sudo mount UUID="c0386d28-334c-4729-9e93-669b8515aa27" /home/jeffrey/m360
sudo chown -R jeffrey:jeffrey /home/jeffrey/m360

build-m360 docker image 準備好了

➜  M360P git:(master) docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED              SIZE
build-m360          latest              41a509204899        About a minute ago   798MB
build-m350          latest              9a28ca31bd0f        2 days ago           719MB
i386/ubuntu         16.04               faf5784ef367        3 weeks ago          120MB
ubuntu              14.04               6e4f1fe62ff1        7 weeks ago          197MB
hello-world         latest              fce289e99eb9        13 months ago        1.84kB

check out M360P source code - 在 /home/jeffrey/m360/M360P

➜  M360P git:(master) pwd
/home/jeffrey/m360/M360P

在該目錄下 run container

docker run --detach --interactive --tty \
  --name build-m360 \
  --env LOCAL_USER_ID=`id -u $USER` \
  --env LOCAL_GROUP_ID=`id -g $USER` \
  --volume `pwd`:/home/user \
  build-m360 /bin/bash

進入該 container

docker exec -it -u user build-m360 bash

進入該 container 後 cd 到 source code 所在 - /home/user

執行 source proenv.sh

執行 make