2022-12-12
2022-12-10
[GIT] 서브모듈까지 포함해서 파일 익스포트.
2022-12-07
2022-12-05
[개발상식] Classless Inter Domain Routing ==> CIDR 표기법
2022-11-29
disable systemd service in yocto?
in file meta-xxx/recipes-core/systemd/systemd_%.bbappend
do_configure_append() {
#disabling autostart of systemd-timesyncd sed -i -e "s/enable systemd-timesyncd.service/disable systemd-timesyncd.service/g" ${S}/presets/90-systemd.preset #disabling autostart of systemd-resolved sed -i -e "s/enable systemd-resolved.service/disable systemd-resolved.service/g" ${S}/presets/90-systemd.preset }
2022-11-16
2022-11-07
리눅스 노트북 빌드가 느릴때 확인사항.
sudo add-apt-repository ppa:linrunner/tlp sudo apt update
sudo apt install tlp tlp-rdw
sudo apt install acpi-call-dkms
sudo apt install auto-cpufreq
2022-11-04
Errno=No space left on device (ENOSPC) 해결법
2022-10-14
[개발노트] sd카드 만들기.
DEFAULT_SDCARD_PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582
sudo partx -d ${DEVSDCARD}
sudo sgdisk -o ${DEVSDCARD}
sudo sgdisk --resize-table=128 -a 1 \
-n 1:34:545 -c 1:fsbl1 \
-n 2:546:1057 -c 2:fsbl2 \
-n 3:1058:5153 -c 3:fip \
-n 4:5154:136225 -c 4:bootfs -A 4:set:2 \
-n 5:136226:2233377 -c 5:rootfs -u 5:${DEFAULT_SDCARD_PARTUUID} \
-n 6:2233378:4330529 -c 6:userfs \
-n 7:4330530:8524833 -c 7:raw \
-p ${DEVSDCARD}
sudo dd if=arm-trusted-firmware/tf-a-stm32mp153d-ssonic-sdcard.stm32 of=${DEVSDCARD}1 conv=fdatasync bs=8M
sudo dd if=arm-trusted-firmware/tf-a-stm32mp153d-ssonic-sdcard.stm32 of=${DEVSDCARD}2 conv=fdatasync bs=8M
sudo dd if=fip/fip-stm32mp153d-ssonic-trusted.bin of=${DEVSDCARD}3 conv=fdatasync bs=8M
sudo dd if=st-image-bootfs-openstlinux-weston-stm32mp153d-ssonic.ext4 of=${DEVSDCARD}4 conv=fdatasync bs=8M
sudo dd if=st-image-core-openstlinux-weston-stm32mp153d-ssonic.ext4 of=${DEVSDCARD}5 conv=fdatasync bs=8M
sudo dd if=st-image-userfs-openstlinux-weston-stm32mp153d-ssonic.ext4 of=${DEVSDCARD}6 conv=fdatasync bs=8M
sudo dd if=/dev/null of=${DEVSDCARD}7 conv=fdatasync bs=8M count=4
2022-10-02
[개발노트] eeprom에 mac address 넣기 참고용.
^^
macb1: ethernet@f802c000 {
compatible = "atmel,sama5d3-macb", "cdns,at91sam9260-macb", "cdns,macb";
status = "okay";
phy-mode = "rmii";
#address-cells = <1>;
#size-cells = <0>;
nvmem-cells = <ð0_addr>;
nvmem-cell-names = "mac-address";
phy0: ethernet-phy@1 {
interrupt-parent = <&pioE>;
interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
reg = <1>;
};
/*ethernet-phy@1 {
reg = <0x1>;
};*/
};
/* Bit banging internal I2C to manage the AT24MAC402 chip */
i2c3@ {
compatible = "i2c-gpio";
gpios = <&pioE 1 0 /* SDA */
&pioE 2 0 /* SCK */
>;
i2c-gpio,delay-us = <4>; /* ~178 kHz */
#address-cells = <1>;
#size-cells = <0>;
/* EEPROM contains the eth0 MAC address */
eeprom@58 {
compatible = "atmel,24mac402";
pagesize = <256>;
read-only;
reg = <0x58>;
#address-cells = <1>;
#size-cells = <1>;
eth0_addr: eth-mac-addr@9A {
reg = <0x0 0x06>;
};
};
};
2022-09-19
[삽질메모] nmcli
#ipv6 off
nmcli con modify br0 ipv6.method "disabled"
systemctl stop NetworkManager
systemctl restart NetworkManager
#static ip and bridge mode.
nmcli con add type bridge ifname br0 con-name br0
nmcli con add type bridge-slave ifname lan1 master br0 con-name lan1
nmcli con add type bridge-slave ifname lan2 master br0 con-name lan2
nmcli con modify br0 ipv4.addresses '192.168.222.77/24'
nmcli con modify br0 ipv4.gateway '192.168.222.1'
nmcli con modify br0 ipv4.dns '8.8.8.8 8.8.4.4'
nmcli con modify br0 ipv6.method disabled
nmcli con modify br0 ipv4.method manual
systemctl daemon-reload
systemctl restart NetworkManager
#delete connection.
nmcli -f bridge con delete br0
nmcli -f bridge-slave con delete lan1
nmcli -f bridge-slave con delete lan2
nmcli -f ethernet con delete lan1
?? default gateway setup.
#gateway mode.
nmcli con add type ethernet ifname lan1 con-name lan1
nmcli con modify lan1 ipv4.addresses '192.168.222.77/24'
nmcli con modify lan1 ipv4.gateway '192.168.222.1'
nmcli con modify lan1 ipv4.dns '8.8.8.8 8.8.4.4'
nmcli con modify lan1 ipv4.method manual && \
nmcli con up id lan1 && \
nmcli con down id lan1 && \
nmcli con up id lan1
# nmcli connection modify bridge0 ipv4.addresses '192.0.2.1/24'
# nmcli connection modify bridge0 ipv4.gateway '192.0.2.254'
# nmcli connection modify bridge0 ipv4.dns '192.0.2.253'
# nmcli connection modify bridge0 ipv4.dns-search 'example.com'
# nmcli connection modify bridge0 ipv4.method manual // auto
nmcli connection modify bridge-br0 ipv4.method manual
nmcli con down id bridge-br0
nmcli con up id bridge-br0
route delete default gw 192.1678.225.1 lte0
nmcli con down id bridge-br0
nmcli con up id bridge-br0
nmcli con mod bridge-br0 ipv4.route-metric 1
nmcli con add con-name lan1 type ethernet ifname lan1 ipv4.method auto
nmcli con up id lan1
nmcli con add con-name lan2 type ethernet ifname lan2 ipv4.method shared
nmcli con up id lan2
nmcli -f ethernet con delete lan1
nmcli -f ethernet con delete lan2
nmcli connection add type ethernet ifname lan2 ipv4.method shared con-name local
nmcli c add con-name lan2 type ethernet ifname lan2 ipv4.method shared ipv6.method ignore
nmcli c up local
ip route add default via 192.168.225.1 dev lte0
ip route replace default via 192.0.2.1 dev eth0
ip route del default via 1.2.3.4 dev eth0 proto static metric 100
ip route add default via 1.2.3.4 dev eth0 proto static metric 90
2022-09-18
[개발노트] overlay.txt란 이런것.
Enable/Disable a Device Tree Overlay
To enable or disable applying a pre-built overlay on a Toradex SoM just add/remove it to/from the file overlays.txt located on the boot partition, and reboot the system.
For example, one wants to disable a parallel RGB interface and display on Colibri-iMX8X and enable an HDMI interface (using DSI-to-HDMI adapter). The initial overlays.txt file looks like:
# cat /boot/overlays.txt
fdt_overlays=colibri-imx8x_parallel-rgb_overlay.dtbo colibri-imx8x_ad7879_overlay.dtbo display-edt7_overlay.dtbo
Steps to disable a parallel RGB and enable an HDMI:
Open the overlays.txt file with any text editor, e.g. vi:
# vi /boot/overlays.txt
Remove overlays, that is needed for Resistive Touch Display 7" Parallel and add one for DSI-to-HDMI adapter. The file should look like:
# cat /boot/overlays.txt
fdt_overlays=colibri-imx8x_dsihdmi_overlay.dtbo
Synchronize them filesystems:
# sync
Reboot the system:
# reboot
2022-09-16
[잡시식] 시스템에 할당된(연결된?) 공인아이피 알아내기.
2022-09-14
[개발노트][트러블슈팅] git clone이 안될때
갑자기 아래의 오류와 함께 git이 안될때...
Git: Fatal:Unsupported SSL backend 'openssl'. Supported SSL backends: gnutls
갑자기 아래의 오류와 함께 git이 안될때...
wget https://curl.haxx.se/ca/cacert.pem
mv cacert.pem ~/.ssh
git config --global http.sslBackend "openssl"
git config --global http.sslCAInfo ~/.ssh/cacert.pem
git config --global --unset http.sslBackend
2022-09-06
[개발노트][esp32] docker 설치 및 idf docker
# idf.py build
esptool.py 어쩌고저쩌고
잘되는가?
2022-09-05
[개발노트]초기설치
sudo apt install -y gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool
sudo apt install -y make xsltproc docbook-utils fop dblatex xmlto
sudo apt install -y libmpc-dev libgmp-dev
sudo apt install -y build-essential libncurses-dev libyaml-dev libssl-dev
sudo apt install -y python-is-python3
sudo apt -y install coreutils bsdmainutils sed curl bc lrzsz corkscrew cvs subversion mercurial nfs-common nfs-kernel-server libarchive-zip-perl dos2unix texi2html diffstat libxml2-utils
sudo apt install -y openssh-server gcc-multilib libusb-1.0-0 vim screen
sudo usermod -a -G dialout $USER
mkdir ~/.bin
PATH=~/.bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+x ~/.bin/repo
2022-09-04
[개발노트] ttyUSB 권한
2022-09-01
[개발노트] usb modem의 네트워크이름 바꾸고, DM포트 자동 생성
2022-08-23
[개발노트] stm32mp1 Distro recipe usb0 g_ether 설정 막기.
2022-08-19
[개발노트]USB OTG ID 핀 상태 읽기 (0번비트임)
#include <sys/mman.h>
#include <fcntl.h>
int main(void)
{
int fd = open("/dev/mem", O_RDWR);
void* ptr = mmap(NULL, 4096, PROT_READ,
MAP_SHARED, fd, 0x49000000);
close(fd);
if(ptr == MAP_FAILED)
{
printf("mmap failed\n");
return -1;
}
volatile unsigned* GINTSTS = (unsigned*)(ptr + 0x14);
printf("%08X \n",*GINTSTS);
munmap(ptr, 4096);
return 0;
}
2022-08-15
[개발환경] WSL2 gui 환경설정과 접속.
#exec /bin/sh /etc/X11/Xsession
#xfce
startxfce4
2022-08-04
[개발노트] 커널패치 만들어서 배포판에 넣어보기.
2022-08-03
[개발노트] gpio 핀맵 옵셋 해석문제 트릭해결
2022-08-02
[개발노트] stm32mp1 kernel fragment 적용.
2022-07-28
[개발노트] yocto에 my-app 넣기.
2022-07-26
[개발노트] stm32mp1 kirk 4.0 stm32mp153에서 cpufreq-dt 오류.
[개발노트] sc16is720 켜기
2022-07-25
[개발노트] stm32mp1 PWM 켜기
[개발노트] DSA켜기 커널옵션
2022-07-19
[개발노트]u-boot env를 linux에서 접근하기.
- /dev/mmcblk1p1 -0x2000 0x2000
- /dev/mmcblk1p1 -0x4000 0x2000
- 3. fw_printenv aaa 333 이렇게 쓴다.
[개발노트] 이렇게 정말해야되냐.
bitbake -c savedefconfig virtual/kernel
cp /home/happycpu/work/Distribution-Package/openstlinux-5.10-dunfell-mp1-21-11-17/build-openstlinuxweston-stm32mp153d-ssonic/tmp-glibc/work/stm32mp153d_ssonic-ostl-linux-gnueabi/linux-stm32mp/5.10.61-stm32mp-r2-r0/build/defconfig ./workspace/sources/linux-stm32mp/arch/arm/configs/multi_v7_defconfig
bitbake st-image-core
[개발노트] stm32mp1 u-boot 74hc595 살리기 config, dts.
2022-07-18
[개발노트] 74hc595의 초기값 제어 안되는 문제해결
[개발노트] Distribution-package의 u-boot 수정 및 컴파및 수정 [ums 이용]
lrwxrwxrwx 1 root root 10 7월 18 14:47 fip -> ../../sdd1
lrwxrwxrwx 1 root root 10 7월 18 14:47 rootfs -> ../../sdd4
lrwxrwxrwx 1 root root 10 7월 18 14:47 vendorfs -> ../../sdd3
0+1 레코드 들어옴
0+1 레코드 나감
1042421 bytes (1.0 MB, 1018 KiB) copied, 0.0663301 s, 15.7 MB/s
2022-07-15
[개발노트]kirkstone build
$ mkdir kirk
$ cd kirk
$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15
Fetching: 100% (8/8), done in 5m51.931s
Garbage collecting: 100% (8/8), done in 0.029s
Checking out: 100% (8/8), done in 0.699s
repo sync has finished successfully$ ls
layersmx폴더 구성
kirk/layers/meta-st/meta-st-stm32mp-addons/mx/stm32mp153d-ssonic$ ls
kernel optee-os tf-a u-boot// conf 복사.
kirk/layers/meta-st/meta-st-stm32mp-addons/conf/machine$ ls
examples stm32mp13-mx.conf stm32mp15-mx.conf stm32mp153d-ssonic.conf// eula 구성
kirk/layers/meta-st/meta-st-stm32mp-addons/conf/eula$ ls
LICENCE.broadcom_bcm43xx Vivante_GPU_drivers-End_User_Software_License_Terms.txt stm32mp15-mx
LICENCE.cypress en.SLA0048.txt stm32mp153d-ssonic
ST_EULA_ALPHA en.sla0078.txt
ST_EULA_SLA stm32mp13-mx
kirk/layers/meta-st$ MACHINE=stm32mp153d-ssonic DISTRO=openstlinux-weston source layers/meta-st/script/envsetup.sh
*주의할점.
MACHINE이름은 꼭. stm32mp15까지는 붙여준다. 이름을 해석해서 해더파일이 합쳐지는 동작이있다.
[개발노트] esp32c3 적용.
make target=spi ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE KERNEL=$KERNEL resetpin=3
happycpu@happycpubox:~/work/testproj/esp-hosted/host/linux/host_driver/esp32$ export KERNEL=/home/happycpu/work/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61.ev1
happycpu@happycpubox:~/work/testproj/esp-hosted/host/linux/host_driver/esp32$ make target=spi ARCH=$ARCH CROSS_COMPILE=$CROSS_COMPILE KERNEL=$KERNEL resetpin=3
rm -rf *.o sdio/*.o spi/*.o *.ko
make ARCH=arm CROSS_COMPILE=arm-ostl-linux-gnueabi- -C /home/happycpu/work/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61.ev1 M=/home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32 clean
make[1]: 디렉터리 '/home/happycpu/work/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61.ev1' 들어감
CLEAN /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/Module.symvers
make[1]: 디렉터리 '/home/happycpu/work/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61.ev1' 나감
make ARCH=arm CROSS_COMPILE=arm-ostl-linux-gnueabi- -C /home/happycpu/work/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61.ev1 M=/home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32 modules
make[1]: 디렉터리 '/home/happycpu/work/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61.ev1' 들어감
CC [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/esp_bt.o
CC [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/main.o
CC [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/spi/esp_spi.o
CC [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/esp_serial.o
CC [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/esp_rb.o
LD [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/esp32_spi.o
MODPOST /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/Module.symvers
CC [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/esp32_spi.mod.o
LD [M] /home/happycpu/work/testproj/esp-hosted/host/linux/host_driver/esp32/esp32_spi.ko
make[1]: 디렉터리 '/home/happycpu/work/Developer-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/sources/arm-ostl-linux-gnueabi/linux-stm32mp-5.10.61-stm32mp-r2-r0/linux-5.10.61.ev1' 나감
happycpu@happycpubox:~/work/testproj/esp-hosted/host/linux/host_driver/esp32$
LICENSE Module.symvers esp32_spi.ko esp32_spi.mod.c esp32_spi.o esp_bt.c esp_bt_api.h esp_rb.c esp_rb.o esp_serial.h main.c modules.order spi
Makefile esp.h esp32_spi.mod esp32_spi.mod.o esp_api.h esp_bt.o esp_if.h esp_rb.h esp_serial.c esp_serial.o main.o sdio
happycpu@happycpubox:~/work/testproj/esp-hosted/host/linux/host_driver/esp32$
insmod esp32_spi.ko resetpin=3
mknod /dev/esps0 c 221 0
chmod 666 /dev/esps0
arm-ostl-linux-gnueabi-gcc -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=/home/happycpu/work/Developer-Package/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi -C -Wall -I/home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/../../../host_common/include/ -I/home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/../../../../common//protobuf-c/ -I/home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/../../../../common//include/ /home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/../../../../common//protobuf-c/protobuf-c/protobuf-c.c /home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/platform_wrapper.c /home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/../../../../common//esp_hosted_config.pb-c.c /home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/../../../host_common/transport_pserial.c /home/happycpu/work/esp-hosted/esp-hosted/host/linux/host_control/c_support/../../../host_common/commands.c test_api.c test.c -o test.out
happycpu@happycpubox:~/work/esp-hosted/esp-hosted/host/linux/host_control/c_support$ ls
Makefile platform_wrapper.c stress.c test.c test.out test_api.c test_api.h test_config.h
idf.py set-target esp32c3
도커 내부의 hosts에 주소 추가하기
echo "192.168.10.19 happycpu-P620.local" | sudo tee -a /etc/hosts
-
필요한사람. chagpt를 너무너무 많이 쓰는중에. 한글과 영어를 번갈아가며쓰는데, 한글다음 이응'ㅇ' 이나 'ㄹ' 을 빠르게 칠경우, 크롬의 주소창으로 이동되버리거나, 메뉴항목이 활성화되어, 내가 친 질문조합이 크롬을 종...
-
$sudo apt-get install tftpd-hpa 서버가 실행되지 않았다면 sudo service tftpd-hpa start /var/lib/tftpboot 을 기본으로 사용하게 된다. /etc/default/tftpd...