Comments (14)
so maybe the loader is missing:
CONFIG_LZ4=y
CONFIG_LZMA=y
from meta-rockchip.
I managed to work around this issue by setting ROCKCHIP_KERNEL_COMPRESSED
to 0 (e.g. in local.conf
).
With "Rockchip-style" images we get the kernel packaged into an Android-format boot.img
. With defaults this builds an image that is detected by file
as:
zImage: LZ4 compressed data (v1.4+)
Even though I do see some kind of ARM preamble in the header (not an executable format expert!), I think this just has some format that should either be uncompressed by u-boot, or packaged in some other way. When you remove the compression i.e. you don't get zboot.img
overwrite boot.img
, you get this instead:
/tmp/boot/zImage: Linux kernel ARM64 boot executable Image, little-endian, 4K pages
And this boots normally. In my case it means 19 Mb vs 8 Mb, which is still nothing, but the whole thing looks like a packaging bug. @2K-ZONE can you please verify on your hardware? If this is the same thing, then maybe someone more knowledgeable about early boot can offer a longer standing solution.
from meta-rockchip.
the bsp u-boot is maintained by other rockchip team, they are using those configs for some boards with different requirements, for example using uncompressed kernel might help to improve boot-speed. it would be a little hard for me to let them add these configs.
from meta-rockchip.
Hi, sorry, i don't know much about that.
It looks something wrong with the yocto's loader and kernel, so you can try to replace them with your local working version by flashing them alone after flashed the WIC. (e.g. upgrade_tool di -u uboot.img / upgrade_tool di -b boot.img)
from meta-rockchip.
Okay, no problem.
We are gonaing to cross test and change working images soon. First we have to find out how to unbrick our device which happened yesterday :-D
I will tell here when we find out how to get this build to work and what kernel (-image format) is expected.
:-)
from meta-rockchip.
you can press 'ctrl+d' in serial console during u-boot stage to enter rockusb download mode, and use upgrade_tool to flash new images.
or hold the maskrom key (to disable the emmc) and reset to enter maskrom(bootrom) mode.
from meta-rockchip.
We managed to exchange the Dusun SDK stuff with the files build from this yocto build. We exchanged to this bootloader first out without also exchanging the trust.img which let us to a status where the ctrl commands where not asked for yet:
U-Boot 2017.09 (Oct 08 2023 - 02:14:28 +0000)
Model: Rockchip RK3328 EVB
MPIDR: 0x80000000
PreSerial: 2, raw, 0xff130000
DRAM: 2 GiB
Sysmem: init
Relocation Offset: 7da71000
Relocation fdt: 7bc664a8 - 7bc67ce2
CR: M/C/I
Using default environment
DM: v1
rk3036_pll_set_rate: wait pll lock timeout! pll_id=4
rk3036_pll_set_rate: wait pll lock timeout! pll_id=2
rksdmmc@ff500000: 1, rksdmmc@ff520000: 0
Bootdev(atags): mmc 0
MMC0: High Speed, 52Mhz
PartType: EFI
boot mode: recovery (misc)
RESC: 'recovery', blk@0x00027fa4
optee check api revision fail: 1.0
optee api revision is too low
ERROR ### Please RESET the board
But we revoered with the pin Dusun named EMMC_KEY and exchanged the original image with this build's u-boot AND trust and now we are booting again (yes it boots the original Dusun SDK kernel).
We are no investigating what the cuplrit is with this build#s kernel. Hang on, we will get it and tell. Many Thanks for your help!
from meta-rockchip.
Reporting the same issue on another RK3328 board with RK3328 EVB config. Juding from the stack trace it dies immediately after jumping to kernel code and hitting some garbage?
The kernel is z-compressed apparently could this be a factor? e.g. u-boot doesn't know how to decompress it tries to run as-is. Or is this decompression handled by the kernel itself at early boot?
Stock images both from the vendor and from another RK3328 boards boot fine (as far as going from u-boot to kernel is concerned anyway :) )
I'll try to do some frankenstein with a differing kernel and report back, but overall any pointers are appreaciated.
from meta-rockchip.
@JeffyCN yes, this actually fixes the issue
Will someone patch the relevant config in u-boot-rockchip
or should I make a PR here?
from meta-rockchip.
will, i've uploaded a patch in yocto conf to disable compressing by default, since there're too much boards...
from meta-rockchip.
@JeffyCN maybe a config fragment for u-boot to enable both by default for all the boards?
from meta-rockchip.
@2K-ZONE can you please verify on your hardware?
Yes, I will check this also on my board when I have time, maybe today or at least tomorrow!
from meta-rockchip.
Hey cool!
I tested ROCKCHIP_KERNEL_COMPRESSED = "0" in my local.conf.
The Kernel then has roughly 18MB size - obviously.
And this one boots:
Hit key to stop autoboot('CTRL+C'): 0
Could not find misc partition
ANDROID: reboot reason: "(none)"
Not AVB images, AVB skip
Booting IMAGE kernel at 0x00280000 with fdt at 0x08300000...
Fdt Ramdisk skip relocation
No misc partition
## Booting Android Image at 0x0027f800 ...
Kernel: 0x00280000 - 0x01503008 (18957 KiB)
## Flattened Device Tree blob at 0x08300000
Booting using the fdt blob at 0x08300000
XIP Kernel Image from 0x00280000 to 0x00280000 ... OK
kernel loaded at 0x00280000, end = 0x01503008
Using Device Tree in place at 0000000008300000, end 00000000083156fd
WARNING: could not set reg FDT_ERR_BADOFFSET.
## reserved-memory:
drm-logo@00000000: addr=7df00000 size=b8000
Adding bank: 0x00200000 - 0x08400000 (size: 0x08200000)
Adding bank: 0x0a200000 - 0x80000000 (size: 0x75e00000)
Total: 782.12/1247.189 ms
KONSTI WAS HERE!!!!!!!!!!!!!!! ARRRRRRRRRRRRRRRRRRRRRGH!
OHNE WORKSPACE.
MIT NEU, NUR UPDATE.IMG?????????????
Starting kernel ...
Including personal debug code :-)
Thanks for sorting this out!
from meta-rockchip.
@2K-ZONE I also made a patch for u-boot-rockchip
in my build to add the options that @JeffyCN suggested and it also works. E.g.
diff --git a/configs/rk3328_defconfig b/configs/rk3328_defconfig
index 45383565feb7..cc17d66deaad 100644
--- a/configs/rk3328_defconfig
+++ b/configs/rk3328_defconfig
@@ -146,3 +146,5 @@ CONFIG_RK_AVB_LIBAVB_USER=y
CONFIG_OPTEE_CLIENT=y
CONFIG_OPTEE_V1=y
CONFIG_TEST_ROCKCHIP=y
+CONFIG_LZ4=y
+CONFIG_LZMA=y
\ No newline at end of file
from meta-rockchip.
Related Issues (20)
- In branch scarthgap systemd build got an error HOT 3
- Conflict with linux-firmware definition in poky branch is scarthgap HOT 3
- OpenGL issue in glXChooseVisual HOT 2
- 6.1内核编译报错 HOT 3
- Building scarthgap with INIT_MANAGER = "systemd" fails in QA because of missing upstream status HOT 3
- no-prefix rootfs.img link breaks initramfs builds HOT 3
- IMAGE_FSTYPES:append is forcing wic onto initramfs HOT 3
- gstreamer playback x264 HOT 1
- Glibc:do_configure fails due to old kernel headers HOT 5
- Update kernel to latest one HOT 1
- rk3588, chromium 122 video HW acceleration with Scarthgap and Kernel 6.1 HOT 11
- scarthgap not building because of missing xserver version HOT 5
- Kernel 6 and gstreamer OpenGL is unusable slow? HOT 26
- Build not giving expecting binaries/outputs HOT 3
- EGL issue with weston on scarthgap branch HOT 10
- RK3588S with kernel 6.1 egl segfault HOT 6
- is it support RK3588S? HOT 6
- Got SEGV in wayland client. HOT 3
- fails to build on scarthgap glibc HOT 3
- recently updated u-boot-rockchip.bb problem HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meta-rockchip.