.gitlab-ci-rockpi.yml 1.41 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# SPDX-License-Identifier: GPL-2.0+

variables:
  APT_OPTIONS: -y --allow-unauthenticated
  ARCH: arm64
  CROSS_COMPILE: aarch64-linux-gnu-
stages:
  - build
  - pack

# Retry jobs after runner system failures
.retry: &retry
  retry:
    max: 2
    when:
      - runner_system_failure

build:
  stage: build
  image: ubuntu:bionic
  before_script:
    - echo "deb-src http://archive.ubuntu.com/ubuntu bionic main universe multiverse" >> /etc/apt/sources.list
    - apt-get update && apt-get $APT_OPTIONS build-dep u-boot && apt-get $APT_OPTIONS install python-pyelftools gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
  script:
    - make rock-pi-4b-rk3399_defconfig
    - make -j$(nproc)
  artifacts:
    name: u-boot
    paths:
      - $CI_PROJECT_DIR/u-boot-dtb.bin

pack:
  stage: pack
  image: debian:testing
  dependencies:
    - build
  artifacts:
    name: bootloader
    paths:
      - $CI_PROJECT_DIR/rkbin/*.img
  before_script:
    - apt-get update && apt-get -y install git u-boot-tools
    - git clone --depth 1 https://github.com/rockchip-linux/rkbin.git
  script:
    - cd rkbin
    # Pack idbloader
    - mkimage -n rk3399 -T rksd -d bin/rk33/rk3399_ddr_800MHz_*.bin idbloader.img
    - cat bin/rk33/rk3399_miniloader_v*.bin >> idbloader.img
    # Pack u-boot
    - ./tools/loaderimage --pack --uboot ../u-boot-dtb.bin uboot.img 0x200000 --size 1024 1
    # Pack ATF
    - ./tools/trust_merger --size 1024 1 RKTRUST/RK3399TRUST.ini