2022-12-10

[GIT] 서브모듈까지 포함해서 파일 익스포트.

git archive -o release.zip HEAD;git submodule --quiet foreach 'cd $toplevel; zip -ru release.zip $sm_path'

2022-12-05

[개발상식] Classless Inter Domain Routing ==> CIDR 표기법


마스크가 포함된 네트워크 표기법?

192.168.0.32/24 인 ip가 속해있는 네트워크는?
192.168.0.0~255까지임.

192.168.0.31/26 인 ip가 속해있는 네트워크는?
1100 0000. 1010 1000.0000 0000.0001 1111
(32-26=)6비트표현가능숫자 ==> 64개, ==> 1~63 range.

https://www.subnet-calculator.com/cidr.php

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

userspace 에서의 led class 를 이용하는 방법으로, /dev/uleds 열어서 핸들을 얻어온후.
그 핸들을 이용해서 시스템에 등록된 모든 led 기능을 사용한다.
커널 디바이스 드라이버 --> LED --> userspace led 선택.

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

cpufreq

watch 'grep "cpu MHz" /proc/cpuinfo'

Errno=No space left on device (ENOSPC) 해결법

sudo sysctl fs.inotify.max_user_watches=1000000

sudo vi /etc/sysctl.d/99-custom.conf
fs.inotify.max_user_watches=1000000 라고 써

2022-10-14

[개발노트] sd카드 만들기.

#!/bin/sh
DEVSDCARD=/dev/sdb
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 = <&eth0_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>;

        };

    };

};

도커 내부의 hosts에 주소 추가하기

echo "192.168.10.19 happycpu-P620.local" | sudo tee -a /etc/hosts