ubuntu Booting시 ethernet이 잡혀있지 않고, gateway default가 없어서 내부,외부망 모두 ping test 안됨.
$ ifconfig enp3s0 192.168.10.201
내부망 가능, 외부망 불가
$ route add default gw 192.168.10.1
내부망, 외부망 가능
* 부팅시 적용 시키기 위한 작업
1. New Netplan setup - netplan: fatal error: cannot bind to port 2983, is another daemon 문제
기존에는 systemd에 의해 netplan 사용하여 ethernet이 적용됨
$ vi /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
version: 2
ethernets:
enp0s3:
addresses: [192.168.10.201/24]
dhcp4: no
dhcp6: no
gateway4: 192.168.10.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
$ netplan apply정상일 경우 적용됨.
* New Netplan setup - netplan: fatal error: cannot bind to port 2983, is another daemon 문재 나왔을 경우
현재까지 v3.0.0 version으로 trusted mode booting으로 진행하였다. 이번 장은 basic mode로 실행해보려고 한다.
결론을 먼저 말하면, v2.0.0 이상 version에서는 basic mode로 부팅되지 않는다. ST에서 v2.0.0부터 trusted mode에 중점으로 update를 하면서 basic mode에 관한 update되지 않고 있다. STM32MP1 OpenSTLinux Starter Package만 봐도 v2.0.0부터 basic mode에 관한 내용이나 image file을 제공하지 않는다.
$ tar -xvf en.SDK-x86_64-stm32mp1-openstlinux-20-02-19.tar_v1.2.0.xz
$ cd stm32mp1-openstlinux-20-02-19/sdk
$ ./st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.6-openstlinux-20-02-19.sh -d ../../SDK
3. u-boot build
- 압축풀기 및 패치
$ cd ~/STM_v1.2/Developer-Package
$ tar -xvf en.SOURCES-u-boot-stm32mp1-openstlinux-20-02-19.tar.xz
$ $ cd stm32mp1-openstlinux-20-02-19/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-2018.11-r0
$ tar -xvf v2018.11.tar.gz
$ cd u-boot-2018.11
$ for p in `ls -1 ../*.patch`; do patch -p1 < $p; done
- 소스 변경 및 추가
$ vi arch/arm/dts/Makefile
$ # Makefile에 stm32mp157f-whatmam-ev1 추가
$ cp -rfvp arch/arm/dts/stm32mp157c-ev1.dts arch/arm/dts/stm32mp157f-whatmam-ev1.dts
$ cp -rfvp arch/arm/dts/stm32mp157c-ev1-u-boot.dtsi arch/arm/dts/stm32mp157f-whatmam-ev1-u-boot.dtsi
- Makefile 사용
$ source ~/STM_v1.2/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
$ make stm32mp15_basic_defconfig
$ make DEVICE_TREE=stm32mp157f-whatmam-ev1 all
$ $ cd ~/STM_v1.2/Developer-Package
$ tar -xvf en.SOURCES-kernel-stm32mp1-openstlinux-20-02-19.tar.xz
$ cd stm32mp1-openstlinux-20-02-19/sources/arm-ostl-linux-gnueabi/linux-stm32mp-4.19-r0
$ tar -xvf linux-4.19.94.tar.xz
$ cd linux-4.19.94
$ for p in `ls -1 ../*.patch`; do patch -p1 < $p; done
$ make ARCH=arm multi_v7_defconfig "fragment*.config"
$ for f in `ls -1 ../fragment*.config`; do scripts/kconfig/merge_config.sh -m -r .config $f; done
$ yes '' | make ARCH=arm oldconfig
$ wget https://download.qt.io/archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
$ tar -xvf qt-everywhere-opensource-src-4.8.7.tar.gz
$ cd qt-everywhere-opensource-src-4.8.7
5. qmake.conf 생성
$ cp -rfvp mkspecs/qws/linux-arm-gnueabi-g++ mkspecs/qws/linux-arm-gnueabihf-g++
$ vi mkspecs/qws/linux-arm-gnueabihf-g++/qmake.conf