Initial OrangePi i96 support landed in Mainline Linux Kernel

Hello Everyone,

I’m glad to say that the initial OrangePi i96 board support landed in Mainline Linux Kernel (5.0-rc1) with new RDA Micro SoC architecture. As of now, the board can enter initramfs shell with single Cortex A5 CPU.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b23b0ea3708c3dec599966fc856836aca48835b9

More update will come in upcoming days. Please stay tuned!

Thanks,
Mani

1 Like

Thanks for good news.
Nice work!

Could you please provide some information, how to compile this kernel?
Which options to select in “menuconfig” or how to define RDA Micro architecture ?
Looking forward…
Would like to test new kernel as well maybe port SPI driver to get some type storage for system.

Hi,
Is there any news ?

I’m trying to compile mainline kernel with command :
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
arm-linux-gnueabihf- version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) .
Yes, I select: RDA Micro SoC and RDA serial port and console config.
But have no output after “Starting kernel …”

Looking forward for update.
Tutorial to get kernel booting would be awesome !

@Pe3ucTop

I’m extremely sorry for the delay! TBH I completely missed your last forum post :frowning:

Anyway, in order to boot mainline kernel on i96, you need to issue below commands from u-boot:

setenv bootargs "earlycon initcall_debug console=ttyRDA2,921600n8 root=/dev/ram0"
fatload mmc 0:1 ${kernel_addr} zImage+dtb
fatload mmc 0:1 ${script_addr} rda8810pl-orangepi-i96.dtb
fatload mmc 0:1 ${initrd_addr} uInitrd
bootz ${kernel_addr} ${initrd_addr}:${filesize} ${script_addr}

For building zImage+dtb, you can use following command:

$ cat arch/arm/boot/zImage arch/arm/boot/dts/rda8810pl-orangepi-i96.dtb > zImage+dtb

Then, place the zImage+dtb, rda8810pl-orangepi-i96.dtb and uInitrd (a 32 bit initrd) in a FAT partition of the SD card and issue u-boot commands.

I will also try to add a guide in doc repo for this.

Thanks,
Mani

Thanks for reply,

I have a bit different config - files in NAND , files get loaded, but still silence from kernel.
BootArgs set as you mentioned, will try to boot from SDCard later today.

Thanks,
Finally got kernel booting, but 5.0-x , not clearly compiled 5.1-x , will dig dipper in differences in config.

1 Like

Hi,
I am trying to compile mainline kernel for orangepi 2g-iot board which has same CPU with i96.
My problem is after “Starting kernel” message there is no output. I followed the commands you wrote but it didn’t change anything (I used 2g-iot dtb file). It seems boot partition of your system is FAT because you used fatload command However my sistem has ext2 boot partition. Which image did you use.
Another thing is, is it possible to share your defconfig file? I used 3.10 kernel defconfig file and it might be the root of my problem.

Thanks in advance!

There is no defconfig file so far, you need to crosscompile and for ARCH=arm (may be armhf) do not remember precise command. Will try to share later.
There is no difference in file system because kernel get loaded from RAM , and how do you put it in RAM is your chose.
Put attention, kernel must be combined with compiled device tree (“dtb” file) .

I had similar issues to Pe3ucTop.

Compiled 5.6.2, no output after “Starting kernel …”

Compiled 5.0.21, works fine.

Same build process for both: started with multi_v7_defconfig, then enabled the RDA bits. I’m going to try and figure out where things went wrong.

@drt1245 Not sure what the issue is. I did build >5.0 kernel while upstreaming the GPIO controller support. Maybe I can give it a shot in the coming weekend and update.

I was able to get 5.6.2 working. I copied my .config from the 5.0 kernel, and used that. Not sure why that fixed things, but it did.

@drt1245 Hi,
Could you please share your .config file ?
I have no access to mine one right now, but @kayaci was interested in working one.
Do your .dts files differ from original ones ?

.config is here: https://gist.github.com/drt1245/4dc197824b39a3251449e274f54c33ff

I used a vanilla 5.6.2 from kernel.org. No changes to dts.

Hello everyone,
Thank you for all your help. I tried .config file and now I can see more logs. However I have another problem. While booting, system hangs here:

Loading, please wait...
[    1.450000] systemd-udevd[82]: starting version 215
[    1.450000] random: systemd-udevd: uninitialized urandom read (16 bytes read)
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.

last line was printed 28 times and it ended up like this:

done.
Begin: Will now check root file system ... fsck from util-linux 2.25.2
done.
Usage: mount [-r] [-w] [-o options] [-t type] [-f] [-i] [-n] device directory
done.
Target filesystem doesn't have requested /sbin/init.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... mount: No such file or directory
done.
Could not copy file: No such file or directory
No init found. Try passing init= bootarg.
(initramfs) 

Any ideas?

I used 5.6.2 vanillia kernel and booted zImage+dtb

@kayaci We don’t have any storage support added to mainline kernel. So you will land in initramfs. I started working on it sometime back but never finished.

Hello, I think I have the same problem @kayaci is describing.

I compiled the mainline Kernel 5.4.188 with an adapted version of .config from @drt1245 .

I’m landing in initramfs, the sd card is not detected.

Loading, please wait...
 [    1.320000] systemd-udevd[64]: starting version 215
 [    1.320000] random: systemd-udevd: uninitialized urandom read (16 bytes read)
 Begin: Loading essential drivers ... done.
 Begin: Running /scripts/init-premount ... done.
 Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
 Begin: Running /scripts/local-premount ... done.
 Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... done.
 Begin: Running /scripts/local-block ... done.
 Begin: Running /scripts/local-block ... done.
...
 [   10.800000] random: fast init done
 Begin: Running /scripts/local-block ... done.
 Begin: Running /scripts/local-block ... done.
 Begin: Running /scripts/local-block ... done.
...
 done.
 Gave up waiting for root device.  Common problems:
  - Boot args (cat /proc/cmdline)
    - Check rootdelay= (did the system wait long enough?)
    - Check root= (did the system wait for the right device?)
  - Missing modules (cat /proc/modules; ls /dev)
 ALERT!  /dev/mmcblk0p2 does not exist.  Dropping to a shell!
 (initramfs)

Compared to the stock image with Kernel 3.10.62 which detects the sd card.

[    0.557312] rda-mmc rda-mmc.0: set clk = 1000000, bus_clk = 200000000, divider = 99
[    0.584167] rda-mmc rda-mmc.0: rda_sdmmc 0 initialized.
[    0.597351] rda-mmc rda-mmc.1: set clk = 1000000, bus_clk = 200000000, divider = 99
[    0.603027] rda-mmc rda-mmc.0: set clk = 25000000, bus_clk = 200000000, divider = 3
[    0.603820] rda-mmc rda-mmc.0: set bus_width = 4
[    0.604370] mmc0: new SDHC card at address 21e5
[    0.605224] mmcblk0: mmc0:21e5 APPSD 14.8 GiB
[    0.606872]  mmcblk0: p1 p2

Is that what you mean, by

?

Hello everyone… I compiled kernel 5.6.2, made it into a zImage and replaced it into the /media/boot folder (saving the original 3.10.62).

But the boot stops at “Starting kernel”… now I am not sure that I need a new uInitrd … and if so, how do I generate it?

update: I learned how to update my initramfs and uImage… it seems that I did it right… however, my compiled kernel 5.6.2 stops at “Starting kernel”… I will try compiling the kernel 5.6.2.

update again: I found the uboot instructions shown in the top of this thread… and the kernel works, but it can only see and execute the initramfs (uinitrd). In uboot, instead of fatload, I used ext2load

I am aware that there is no support for storage yet… I hope someone is working on this.

Hi I have compiled image with kernel 6.5.1. This my repository. Firmwere you can find in Releases