-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add board Luckfox Nova W #8306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add board Luckfox Nova W #8306
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Rockchip RK3308B quad core 512MB SoC WiFi | ||
# https://www.luckfox.com/Luckfox-Nova | ||
|
||
BOARD_NAME="Luckfox Nova W" | ||
BOARDFAMILY="rockchip64" | ||
BOARD_MAINTAINER="nikvoid" | ||
|
||
BOOT_SOC="rk3308" | ||
BOOTCONFIG="luckfox-nova-w_rk3308b_defconfig" | ||
BOOT_FDT_FILE="rockchip/rk3308-luckfox-nova-w.dtb" | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove empty lines where they don't make sense |
||
# eMMC works properly only in vendor branch | ||
KERNEL_TARGET="vendor" | ||
|
||
KERNELSOURCE='https://github.com/armbian/linux-rockchip.git' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest referring to other RK3308-based devices, and ideally using the mainline kernel. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. AFAIR rk bsp is mostly designed to support rk35xx family, not sure how much work has been done for rk33xx. Though most of if is mainlined and this shall be preferred. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could not get emmc working in mainline kernels. May be I'll revisit this later to derive patches |
||
KERNELBRANCH='branch:rk-6.1-rkr5.1' | ||
KERNELPATCHDIR='rockchip64-vendor-6.1' | ||
KERNEL_MAJOR_MINOR="6.1" | ||
LINUXFAMILY="rockchip64" | ||
LINUXCONFIG="linux-luckfox-nova-w-rk3308-vendor" | ||
|
||
DEFAULT_CONSOLE="serial" | ||
SERIALCON="ttyS4" | ||
MODULES="aic8800_fdrv" | ||
MODULES_BLACKLIST="rockchipdrm analogix_dp dw_mipi_dsi dw_hdmi gpu_sched lima hantro_vpu panfrost" | ||
HAS_VIDEO_OUTPUT="no" | ||
|
||
BOOTBRANCH_BOARD="tag:v2025.04" | ||
BOOTPATCHDIR="v2025.04" | ||
IMAGE_PARTITION_TABLE="gpt" | ||
|
||
BOOT_SCENARIO="binman" | ||
DDR_BLOB="rk33/rk3308_ddr_589MHz_uart4_m0_v2.07.bin" | ||
BL31_BLOB="rk33/rk3308_bl31_v2.26.elf" | ||
MINILOADER_BLOB="rk33/rk3308_miniloader_v1.39.bin" | ||
|
||
FORCE_UBOOT_UPDATE="yes" | ||
OVERLAY_PREFIX="rk3308-luckfox-nova" | ||
|
||
function post_family_config__bootscript() { | ||
declare -g BOOTSCRIPT="boot-rockchip64-ttyS4.cmd:boot.cmd" | ||
} | ||
|
||
function pre_install_kernel_debs__enforce_cma() { | ||
# Set CMA to 16 megabytes, to provide more usable RAM since board | ||
# has usually a small amount of DRAM (512MB) | ||
display_alert "$BOARD" "set CMA size to 16MB due to small DRAM size" | ||
run_host_command_logged echo "extraargs=cma=16M" ">>" "${SDCARD}"/boot/armbianEnv.txt | ||
|
||
nikvoid marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return 0 | ||
} | ||
|
||
function post_family_tweaks__move_wlan_fw() { | ||
mv "${SDCARD}/lib/firmware/aic8800/SDIO/aic8800DC" "${SDCARD}/lib/firmware/aic8800/SDIO/aic8800dc" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# 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 "off" | ||
setenv earlycon "on" | ||
setenv usbstoragequirks "" | ||
|
||
test -n "${distro_bootpart}" || distro_bootpart=1 | ||
|
||
echo "Boot script loaded from ${devtype} ${devnum}:${distro_bootpart}" | ||
|
||
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}armbianEnv.txt; then | ||
load ${devtype} ${devnum}:${distro_bootpart} ${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=tty0"; fi | ||
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS4,1500000 ${consoleargs}"; fi | ||
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi | ||
if test "${bootlogo}" = "true"; then | ||
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}" | ||
else | ||
setenv consoleargs "splash=verbose ${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}:${distro_bootpart} 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"; fi | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
load ${devtype} ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}uInitrd | ||
load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} ${prefix}Image | ||
|
||
load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile} | ||
fdt addr ${fdt_addr_r} | ||
fdt resize 65536 | ||
for overlay_file in ${overlays}; do | ||
if load ${devtype} ${devnum}:${distro_bootpart} ${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}:${distro_bootpart} ${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}:${distro_bootpart} ${fdt_addr_r} ${prefix}dtb/${fdtfile} | ||
else | ||
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr; then | ||
load ${devtype} ${devnum}:${distro_bootpart} ${load_addr} ${prefix}dtb/rockchip/overlay/${overlay_prefix}-fixup.scr | ||
echo "Applying kernel provided DT fixup script (${overlay_prefix}-fixup.scr)" | ||
source ${load_addr} | ||
fi | ||
if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}fixup.scr; then | ||
load ${devtype} ${devnum}:${distro_bootpart} ${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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drop