Skip to content

Build customized u-boot #10

Build customized u-boot

Build customized u-boot #10

Workflow file for this run

name: Build customized u-boot
on:
workflow_dispatch:
inputs:
flash:
description: 'Flash Type'
required: true
type: choice
options:
- 'NOR'
- 'NAND'
- 'NAND-NMBM'
mtdparts:
description: 'MTD Partition Table'
required: true
type: string
default: '512k(u-boot),512k(u-boot-env),256k(factory),4096k(kernel),-(firmware)'
kernel_offset:
description: 'Kernel Load Address'
required: true
type: string
default: '0x80001000'
reset_pin:
description: 'Reset Button GPIO'
required: true
type: number
default: 3
sysled_pin:
description: 'System LED GPIO'
required: true
type: number
default: 13
cpufreq:
description: 'CPU Frequency (400 - 1200)'
required: true
type: number
default: '880'
ramfreq:
description: 'DRAM Frequency'
required: true
type: choice
options:
- '400'
- '800'
- '1066'
- '1200'
default: '1200'
ddrparam:
description: 'Prefered DDR Init Parameters'
required: true
type: choice
options:
- 'DDR2-64MiB'
- 'DDR2-128MiB'
- 'DDR2-W9751G6KB-64MiB-1066MHz'
- 'DDR2-W971GG6KB25-128MiB-800MHz'
- 'DDR2-W971GG6KB18-128MiB-1066MHz'
- 'DDR3-128MiB'
- 'DDR3-256MiB'
- 'DDR3-512MiB'
- 'DDR3-128MiB-KGD'
oldparam:
description: 'Use Old DDR Timing Parameters'
required: true
type: boolean
default: 'false'
baudrate:
description: 'Baud Rate'
required: true
type: choice
options:
- '57600'
- '115200'
jobs:
build:
name: Build MT7621 u-boot
runs-on: ubuntu-latest
strategy:
fail-fast: False
steps:
- name: Checkout master directory
uses: actions/checkout@v3
with:
path: uboot-mt7621
- name: Install essential packages
run: |
sudo apt-get update
sudo apt-get install swig python2-dev
echo 'switch to python2 as default'
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python2 /usr/bin/python
- name: Download OpenWrt toolchain
run: |
wget -O - https://github.com/DragonBluep/uboot-mt7621/releases/download/20230517/openwrt-toolchain-ramips-mt7621_gcc-12.3.0_musl.Linux-x86_64.tar.xz \
| tar --xz -xf -
- name: Set old DDR timing parameters
if: ${{ inputs.oldparam }}
working-directory: uboot-mt7621
run: sed -i 's/0x0C000000/0x0A000000/g' ./arch/mips/mach-mt7621/dramc-legacy/dramc.S
- name: Compile
working-directory: uboot-mt7621
run: |
./customize.sh '${{ inputs.flash }}' '${{ inputs.mtdparts }}' '${{ inputs.kernel_offset }}' '${{ inputs.reset_pin }}' \
'${{ inputs.sysled_pin }}' '${{ inputs.cpufreq }}' '${{ inputs.ramfreq }}' '${{ inputs.ddrparam }}' '${{ inputs.baudrate }}'
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: u-boot
path: "uboot-mt7621/archive/"