Skip to main content

SDK Environmental deployment

1. Installing Virtual Machine Software

  1. Download VirtualBox virtual machine software and VBoxGuestAdditions (Fullscreen Tools)

  2. Install VirtualBox-7.0.8-156879-Win (install the version appropriate for your system), and it is recommended to install it on an SSD.

  3. Follow the installation process.

2. Creating a New Virtual Machine

  1. Download the configured virtual machine file.
  2. Click "New" to create a new virtual machine, enter a custom name, and choose the location to store the virtual machine (it is recommended to store the virtual machine on an SSD).
  3. Set the memory size and processor count for the virtual machine. It is recommended to allocate about 4GB of RAM and 4 or more CPUs to the virtual machine. Try to keep the sliders in the green zone to prevent any issues when running both the virtual machine and the host operating system simultaneously.
  4. Use an existing virtual hard disk file. If the VDI file is not found, click "Add" to add it.

  5. Click "Next" to continue and review the basic information of the virtual machine settings, then click "Finish" to initialize the machine!

3. Installing VBoxGuestAdditions

  1. Click "Start" to boot the virtual machine. The window resolution will be fixed at 800x600.
  2. In the virtual machine, click on "Settings", select "Storage", choose "Choose a disk file...", and select "Virtualbox GuestAdditions". Once loaded successfully, click "OK".
  3. After installing VBoxGuestAdditions, to prevent the Ubuntu virtual machine from starting with a black screen, increase the video memory size to the maximum of 128MB.

4. General Configuration of the Virtual Machine

  1. Set the network connection mode to "Bridged Adapter".
  2. Enable USB 3.0 controller.
  3. Configure shared clipboard between the Windows computer and the virtual machine.

5. Compiling the SDK

  1. Start the virtual machine. The login password for the virtual machine is: luckfox.

  2. Navigate to the core3566 directory and check the files in the directory. By default, it should contain LUCKFOX_LINUX419_SDK.tar.gz and dl.

    luckfox@luckfox:~/core3566$ ls
    dl LUCKFOX_LINUX419_SDK.tar.gz
  3. Switch to the root user and extract the LUCKFOX_LINUX419_SDK.tar.gz file.

    sudo su
    tar xvf LUCKFOX_LINUX419_SDK.tar.gz
  4. Unpack the extracted files.

    .repo/repo/repo sync -l
    • The process will look like this:
  5. Copy the dl folder to the buildroot path.

    rootaluckfox:/home/luckfox/core3566# ls
    device envsetup.sh build.sh app kernel LUCKFOX LINUX419 sDK.tar.gz Makefile mkfirmware.sh rkbin tools yocto
    buildroot debian docs external linux prebuilts rkflash.sh u-boot
    rootaluckfox:/home/luckfox/core3566# cp -r dl buildroot/
  6. Install all the packages in the Ubuntu build service within the Debian service.

    cd debian
    dpkg -i ubuntu-build-service/packages/*
    apt-get install -f
    cd ..
  7. Choose the branch to compile, either specifying HDMI or MIPI DSI for video output.

    root@luckfox:/home/luckfox/core3566# ./build.sh lunch
    processing option: lunch

    You're building on Linux
    Lunch menu...pick a combo:

    0. default BoardConfig.mk
    1. BoardConfig-ab-base.mk
    2. BoardConfig-core3566_hdmi-debian-v1.mk
    3. BoardConfig-core3566_mipi-debian-v1.mk
    4. BoardConfig-rk3566-evb2-lp4x-v10-32bit.mk
    5. BoardConfig-rk3566-evb2-lp4x-v10.mk
    6. BoardConfig-rk3568-evb1-ddr4-v10-32bit.mk
    7. BoardConfig-rk3568-evb1-ddr4-v10-spi-nor-64M.mk
    8. BoardConfig-rk3568-evb1-ddr4-v10.mk
    9. BoardConfig-rk3568-nvr-spi-nand.mk
    10. BoardConfig-rk3568-nvr.mk
    11. BoardConfig-rk3568-uvc-evb1-ddr4-v10.mk
    12. BoardConfig-security-base.mk
    13. BoardConfig.mk
    Which would you like? [0]: 2
    switching to board: /home/luckfox/core3566/device/rockchip/rk356x/BoardConfig-core3566_hdmi-debian-v1.mk
  8. Build the image.

    export RK_ROOTFS_SYSTEM=debian
    ./build.sh
  9. After the kernel compilation is completed, you will encounter a voltage domain check as shown below. You can simply press and hold the Esc key to skip it.

  10. After a successful compilation, go to the /home/luckfox/core3566/rockdev directory. The update.img file is the compiled image.