How to RDK Build

1. Build

  • 환경변수 설정 및 전체빌드
    $ source meta-cmf/setup-environment
    $ bitbake rdk-generic-mediaclient-westeros-wpe-image
  • 특정 패키지 클린빌드
    $ bitbake -c cleansstate <package_name>
    $ bitbake <package_name>

 

2. Bootloader

  • RTD131x_CMF_RDK4.0_User_Guide_XXX 문서 참조
  • 현 단계에서는 bootloader를 수정하지 않고 리얼텍에서 제공한 이미지 그대로 사용
  • Normal lk update 파일
    • demo-0001-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400-drm.bin (3.9MB)
  • Recovery 파일
    • 0001-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400_final.bin
    • 0001-uda_emmc-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400
    • 0001-boot_emmc-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400.bin
  • 업그레이드 방법
      • 시리얼 콘솔에서 'Ctrl + Q'를 입력한 상태로 STB 부팅
      • 시리얼 콘솔에 'Ente' 키를 4번 입력하면 아래와 같은 d/g/r> prompt 출력
        recovery mode is locked by password
        Please Input Password:
        1st word
        2nd word
        3rd word
        4th word
        dp compare pass: recovery mode is unlocked.
        d/g/r>
      • press 'h'
        • ymodem으로 0001-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400_final.bin 파일 전송
      • press 'd'
        • ymodem으로 0001-uda_emmc-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400.bin 파일 전송
      • press 'd'
      • press 'g'
        • ymode으로 0001-boot_emmc-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400.bin 파일 전송
      • press 'b1'
      • press 'b2'
  • STB reboot
    • uboot command line prompt 확인 Realtek>

 

3. Install LK

  • USB에 demo-0001-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400-drm.bin 저장
  • 부팅할 때 'ESC' 입력
    • Realtek> 명령 프롬프트 확인
  • LK 이미지 다운로드
    $ fatload usb 0:1 0x1500000 demo-0001-RTD1319_hwsetting_BOOT_2DDR4_8Gb_s2400-drm.bin
    $ chain 0x1500000
  • Sysparam 초기화
    $ sysparam default -f
    $ sysparam save
  • Image run
    • Standalone
      $ sysparam add bootargs "earlycon=uart8250,mmio32,0x98007800 console=ttyS0,460800 cma=64m@576m loglevel=8 noinitrd rootwait root=/dev/mmcblk0p3"
      $ sysparam save
      $ reboot
    • NFS
      $ sysparam add bootargs "earlycon=uart8250,mmio32,0x98007800 console=ttyS0,460800 cma=64m@576m loglevel=8 noinitrd ip=dhcp root=/dev/nfs rw nfsroot=192.168.0.20:<your nfsrootdir>,tcp,vers=3"
      $ sysparam save
      $ reboot

 

4. Install Image

  • install.img
    build-mediabox/tmp/work/mediabox-rdk-linux-gnueabi/rdk-generic-mediaclient-westeros-wpe-image/1.0-r0/image_file
  • emmc.uImage / rescue.emmc.dtb / rescue.root.emmc.cpio.gz_pad.img
    build-mediabox/tmp/work/mediabox-rdk-linux-gnueabi/rdk-generic-mediaclient-westeros-wpe-image/1.0-r0/image_file/components/packages/generic