Skip to content

Commit

Permalink
Merge pull request #1094 from 13584452567/main
Browse files Browse the repository at this point in the history
Add support for tn3399
  • Loading branch information
ophub authored Feb 22, 2023
2 parents f26cd9e + a1c3769 commit 2718b7d
Show file tree
Hide file tree
Showing 14 changed files with 128 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/build-armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ on:
- h68k
- eaidk-610
- king3399
- tn3399
- beikeyun
- l1pro
armbian_kernel:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rebuild-armbian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ on:
- h68k
- eaidk-610
- king3399
- tn3399
- beikeyun
- l1pro
armbian_kernel:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/use-releases-file-to-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ on:
- h68k
- eaidk-610
- king3399
- tn3399
- beikeyun
- l1pro
armbian_kernel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ r204 :H68K :rk3568 :rk3568-opc-h68k.dtb
# 1.ID 2.MODEL 3.SOC 4.FDTFILE 5.UBOOT_OVERLOAD 6.MAINLINE_UBOOT 7.BOOTLOADER_IMG 8.KERNEL_BRANCH 9.PLATFORM 10.FAMILY 11.BOOT_CONF 12.BOARD 13.BUILD
#-------+----------------------------+---------+---------------------------------------+-----------------------------+------------------------------------+--------------------------------+----------------+-----------+--------------+----------------+----------------+-------
r301 :EAIDK-610 :rk3399 :rk3399-eaidk-610.dtb :NA :u-boot.itb :idbloader.img :6.x.y :rockchip :rk3399 :armbianEnv.txt :eaidk-610 :yes
r302 :KING3399 :rk3399 :rk3399-king3399.dtb :NA :u-boot.itb :idbloader.img :6.x.y :rockchip :rk3399 :armbianEnv.txt :king3399 :yes
r302 :KING3399 :rk3399 :rk3399-king3399.dtb :NA :u-boot.itb :idbloader.img :stable :rockchip :rk3399 :armbianEnv.txt :king3399 :yes
r303 :TN3399 :rk3399 :rk3399-tn3399.dtb :NA :u-boot.itb :idbloader.img :stable :rockchip :rk3399 :armbianEnv.txt :tn3399 :yes


# Rockchip RK3328 Family
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
verbosity=1
bootlogo=false
overlay_prefix=rockchip
rootdev=/dev/mmcblk0p2
rootfstype=ext4
fdtfile=rockchip/rk3399-tn3399.dtb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#-----------------------------------------------------------------
# Armbian first run configuration
# Set optional end user configuration
# - Rename this file from /boot/armbian_first_run.txt.template to /boot/armbian_first_run.txt
# - Settings below will be applied only on 1st run of Armbian
#-----------------------------------------------------------------

#-----------------------------------------------------------------
# General:
# 1 = delete this file, after first run setup is completed.

FR_general_delete_this_file_after_completion=1

#-----------------------------------------------------------------
#Networking:
# Change default network settings
# Set to 1 to apply any network related settings below

FR_net_change_defaults=0

# Enable WiFi or Ethernet.
# NB: If both are enabled, WiFi will take priority and Ethernet will be disabled.

FR_net_ethernet_enabled=1
FR_net_wifi_enabled=0

#Enter your WiFi creds
# SECURITY WARN: Your wifi keys will be stored in plaintext, no encryption.

FR_net_wifi_ssid='MySSID'
FR_net_wifi_key='MyWiFiKEY'

# Country code to enable power ratings and channels for your country. eg: GB US DE | https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

FR_net_wifi_countrycode='GB'

#If you want to use a static ip, set it here

FR_net_use_static=0
FR_net_static_ip='192.168.0.100'
FR_net_static_mask='255.255.255.0'
FR_net_static_gateway='192.168.0.1'
FR_net_static_dns='8.8.8.8 8.8.4.4' #2 entries max, seperated by a space.
#-----------------------------------------------------------------
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# DO NOT EDIT THIS FILE
#
# Please edit /boot/armbianEnv.txt to set supported parameters
#

setenv load_addr "0x9000000"
setenv overlay_error "false"
# default values
setenv rootdev "/dev/mmcblk0p1"
setenv verbosity "1"
setenv console "both"
setenv bootlogo "false"
setenv rootfstype "ext4"
setenv docker_optimizations "on"
setenv earlycon "off"

echo "Boot script loaded from ${devtype} ${devnum}"

if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
load ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt
env import -t ${load_addr} ${filesize}
fi

if test "${logo}" = "disabled"; then setenv logo "logo.nologo"; fi

if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS2,1500000 ${consoleargs}"; fi
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi
if test "${bootlogo}" = "true"; then setenv consoleargs "bootsplash.bootfile=bootsplash.armbian ${consoleargs}"; fi

# get PARTUUID of first partition on SD/eMMC the boot script was loaded from
if test "${devtype}" = "mmc"; then part uuid mmc ${devnum}:1 partuuid; fi

setenv bootargs "root=${rootdev} rootwait rootfstype=${rootfstype} ${consoleargs} consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} usb-storage.quirks=${usbstoragequirks} ${extraargs} ${extraboardargs}"

if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1"; fi

load ${devtype} ${devnum} ${ramdisk_addr_r} ${prefix}uInitrd
load ${devtype} ${devnum} ${kernel_addr_r} ${prefix}Image

load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
fdt addr ${fdt_addr_r}
fdt resize 65536
for overlay_file in ${overlays}; do
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_prefix}-${overlay_file}.dtbo"
fdt apply ${load_addr} || setenv overlay_error "true"
fi
done
for overlay_file in ${user_overlays}; do
if load ${devtype} ${devnum} ${load_addr} ${prefix}overlay-user/${overlay_file}.dtbo; then
echo "Applying user provided DT overlay ${overlay_file}.dtbo"
fdt apply ${load_addr} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
load ${devtype} ${devnum} ${fdt_addr_r} ${prefix}dtb/${fdtfile}
else
if load ${devtype} ${devnum} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)"
source ${load_addr}
fi
if test -e ${devtype} ${devnum} ${prefix}fixup.scr; then
load ${devtype} ${devnum} ${load_addr} ${prefix}fixup.scr
echo "Applying user provided fixup script (fixup.scr)"
source ${load_addr}
fi
fi
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}

# Recompile with:
# mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added build-armbian/u-boot/rockchip/tn3399/u-boot.itb
Binary file not shown.

0 comments on commit 2718b7d

Please sign in to comment.