on x86, first download dietpi, than using directly a download from kernel.org, menuconfig, compile, install, update grub…easy.
on arm, that path did not work as I dont know hiw to make the new kernel recognized for startup (no update grub)
Therefore, I used armbian directly under virtualbox and their ./compile.sh, menuconfig, sd card image…typically I use edge version, so we are on 5.19.
Trying to bring now dietpi again into the game is rather difficult as the generic script did not make kt, issues with the versions and download from armbian.
So, which path is the easiest to get a custom kernel AND dietpi ?
I love the idea to give armbian a diet, even in minimal many more stuff is there and running than in dietpi and i like the autoscript working in dietpi…and i like to use one way of setting up all my devices install of manually setting rc.local, mpd.service priorites etcetc…so, in short:I miss Dietpi.
I would guess there are two different paths:
Either we start with dietpi and forget armbian, but than I need to learn how to do “update-grub” type of operation for Arm for the new custom Kernel from kernel.org
Or we start with armbian, create a new armbian sd card but have later a dietpi script which can work with armbian as a basis (even the edge version)…
Or i can generate as well in Armbian a custom kernel and uboot (first option in the compile.sh process) which need than “somehow” be inetgrated in your dietpi version…so, we have first a normal dietpi version which gets the new armbian generated kernel afterwards…unfortunately there is no documentation how to do that.
Which hardware are you actually using? On DietPi and those SBCs where we use the Armbian kernel, it works the same: Either replace /boot/dtb, /boot/Image and /boot/uInitrd with your custom ones (all symlinks) and uninstall the Armbian kernel, or edit and recompile /boot/boot.cmd to point to your custom kernel, device tree and initramfs.
I am using at the moment Nanopi Neo 3 as an example…and ideally I would like to have two kernels to switch and compare when optimizing for best sounding solution…so editing and recompiling boot.cmd would be preferable…i am not at home at the moment, need to look into it…
Quick question: What would you recommend in terms of gernerating /install new modules and Kernel to be copied…:
Directly using Kernel.org files, menuconfig, make and minstall modules, make kernel and CP …so on the machine to be upgraded (which is fine…no cross-compile)
or
USing the Armbian-Ubuntu Corss-Compile Approach with ./compile.sh first option ?
I am not sure, how much stuff goes on in the backround with Armbian which is needed vs. a vamilla approach with Kerbnel .org (like for the x86).
Raspberry was a charme…that was really easy to get dietpi to 5.19 custom Kernel…very cool.
I loooked itno it…that is a script where it is not very obvious to me where to change the path / variables to point to my custom kernel…a bit more wisdom, please ?
I’m not sure how well the unmodified mainline kernel works on NEO3, while I know the Armbian kernel works (even that R2 device tree ia used). But you may test it, if there is a NEO3 device tree included.
I’ll have a look into the NEO3 /boot/boot.cmd to point you to the lines to edit.
Ok…well, I can as well exchange it with the Armbian Kernel if you can give me precise command lines I shall use…I see a bunch of generates files in the “Output” of armbian when I create only a Kernel/uboot, not sure where those have to go with what rights etc.
# 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
and alternatively, going the other route to implement the Armbian-generated Kernel/uboot, here are the file the first Armbian Option is generating…but I have no clue:
how to install them into an existing Dietpi-Installtion
is I can upgrade the Dierpi-Kernel from 5.15.to 5.19 with this of if the Armbian Kernel needs to be 5.15.
so, no Idea what to do precisely with these files: