OpenWrt 18 to OpenWrt 19

Hi Guys
I'm trying to upgrade my openwrt from 18 to 19 on a mips targer (mt7628 SOC)
The image generation is done but the kernel does not boot, here is the error:

[ 0.000000] NR_IRQS: 256
[ 0.000000] Kernel panic - not syncing: Failed to find ralink,mt7620a-sysc node
[ 0.000000] Rebooting in 1 seconds..
[ 0.000000] Reboot failed -- System halted

it seems to be a device tree issue related to the tool "patch-dtb"

When i compare my openwrt18 generation and my openwrt19 generation, the patch-dtb tool is not called on the kernel-image.bin

is it normal ? what is the purpose of this tool ? merging the dtb within the kernel ?, i would like to understand this step of the image generation process

Thank's for help !

Yes. It's normal. Since release 19.07 ramips target don't use patch-dtb. Simply append dtb-file to kernel.Something like:

cat vmlinux ${board}.dtb >kernel-${board}.bin

Thanks a lot for your response,
I analyzed the image make file

KERNEL_DTB = kernel-bin | append-dtb | lzma
define Device/Default
  PROFILES = Default
  KERNEL := $(KERNEL_DTB) | uImage lzma
  DEVICE_DTS_DIR := ../dts
  IMAGES := sysupgrade.bin
  IMAGE_SIZE := $(ralink_default_fw_size_8M)
  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
  sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)

if my understanding is correct, the append-dtb is done by default

my target definition

define Device/nico
  IMAGE_SIZE := $(ralink_default_fw_size_16M)
  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport

my issue is still here. could you help me to analyze ?

sorry, i copy pasted the wrong thing

define Device/thingoo
  IMAGE_SIZE := $(ralink_default_fw_size_16M)
  DEVICE_TITLE := Thingoo-GW
  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport

this is what i used in openwrt18

EDIT: apology... below is on master... and you are right 19 has DTS... still... your sample model vendor totally got shortchanged on translation... ( you had none )

get an existing sample

define Device/zbtlink_zbt-we1226
  IMAGE_SIZE := 7872k
  DEVICE_VENDOR := Zbtlink
TARGET_DEVICES += zbtlink_zbt-we1226

dts goes in target/linux/ramips/dts/chip_brand_model.dts there is no DTS in the existing samples. it is auto resolved as per what you posted earlier.


define Device/zoo_gorilla
  IMAGE_SIZE := 7872k
TARGET_DEVICES += zoo_gorilla

cat OLD.dts > target/linux/ramips/dts/mt7628an_zoo_gorilla.dts

same advice goes for dts contents... find an example... then compare differences... ( other model 18 vs 19 etc )

ok thank's for helping
If my understanding is correct, in openwrt 19, there is no more possibility to specify devicetree name for a given target, the name is auto resolved with target name (probably appended with other things ?)
I have to modify the name of my previous device tree according to the new rules.
In openwrt18, i specified:
and the build tools were looking to THINGOO.dts so now it is no more possible.

Do you confirm my understanding ?


master = auto dts name ( as of around 2-3 months ago )
19 = looks to me like your style is still current

you can binwalk the kernel to check it's been appended

-have you checked for general dts syntax changes?
-have you updated your recipe with the fake brand?

0             0x0             uImage header, header size: 64 bytes, header CRC: 0xCF9726E7, created: 2020-05-20 19:06:48, image size: 1646888 bytes, Data Address: 0x80000000, Entry Point: 0x80000000, data CRC: 0x6C68767B, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "MIPS OpenWrt Linux-4.14.180"
64            0x40            LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 5189358 bytes

it seems to be ok for the devicetree appended

what do you means with "have you updated your recipe with the fake brand?"

maybe my boot issue is comming from antother thing... i was thinking it is coming from device tree i have read this on a forum but maybe it is not the case.


boot issue fixed:

i added CONFIG_MIPS_RAW_APPENDED_DTB=y to my kernel config file

1 Like

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

Solved ! Thank's for help

1 Like