armbian build에서 customizing 방법 정리

기본 Repository에 있는 패키지 중 필요한 것들 먼저 설치할 때는 PACKAGE_LIST_BOARD 옵션 사용.

$ ./compile.sh BOARD=orangepi5-plus BRANCH=current RELEASE=noble BUILD_DESKTOP=no BUILD_MINIMAL=no VENDOR=armbian-kft REVISION=25.8.2 CPUTHREADS=12 PACKAGE_LIST_BOARD="net-tools wireless-tools vim" build 

임의의 repository 추가, 패키지 설치, 스크립트 실행 시, userpatches/customize-image.sh 파일을 수정

ain() {
        case $RELEASE in
                stretch)
                        # your code here
                        # InstallOpenMediaVault # uncomment to get an OMV 4 image
                        ;;
                buster)
                        # your code here
                        ;;
                bullseye)
                        # your code here
                        ;;
                bionic)
                        # your code here
                        ;;
                focal)
                        # your code here
                        ;;
                noble)
                        export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
                        curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
                        dpkg -i /tmp/ros2-apt-source.deb
                        apt update
                        apt install -y ros-dev-tools
                        apt install -y ros-jazzy-ros-base
                        apt install -y ros-jazzy-rmw-cyclonedds-cpp
                        ;;
        esac
} # Main

사용자 계정을 만들고, 처음 로그인 시 작업 수행하는 경우, packages/bsp/common/usr/lib/armbian/armbian-firstlogin 파일 수정

add_user() 함수 내에서 다음의 구문 아래에 적절한 곳에 추가.

add_user() {
...
         while [ -f "/root/.not_logged_in_yet" ]; do
...
              if [[ "$first_input" == "$second_input" ]]; then
...
                        echo "source /opt/ros/jazzy/setup.bash" >> /home/"$RealUserName"/.bashrc
                        echo "export ROS_DOMAIN_ID=1" >> /home/"$RealUserName"/.bashrc
                        echo "export ROS_AUTOMATIC_DISCOVERY_RANGE=SYSTEM_DEFAULT" >> /home/"$RealUserName"/.bashrc
                        echo "source /usr/share/colcon_cd/function/colcon_cd.sh" >> /home/"$RealUserName"/.bashrc
                        echo "export _colcon_cd_root=/opt/ros/jazzy/" >> /home/"$RealUserName"/.bashrc
                        echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> /home/"$RealUserName"/.bashrc
                        echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> /home/"$RealUserName"/.bashrc
...


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *