Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 4876|Reply: 7

Linux 3.10.65-sun50iw6p1 kernel headers for Orange Pi One Plus/Lite2

[Copy link]

4

Threads

13

Posts

116

Credits

Registered member

Rank: 2

Credits
116
Post time 2018-5-23 04:46:56 | Show all posts |Read mode
Edited by rollmeister at 2018-7-11 09:14

Hi,
Awesome board even though it's still in development and working well for me as a headless server, but currently stuck with wired LAN.

I wanted to compile mt7601u usb wifi driver but I need the Linux 3.10.65-sun8i kernel headers.
Any chance I can download from somewhere?

Cheers,
Rauli

4

Threads

13

Posts

116

Credits

Registered member

Rank: 2

Credits
116
 Author| Post time 2018-5-23 08:58:18 | Show all posts
Edited by rollmeister at 2018-7-7 02:44

I figured it out myself and my guide is below. We are installing the full Linux sources, not just the headers. Possibility of configuring and building your own kernel later on is added.

Instructions and descriptions explaining what is going on with each line of command below it in blue is in between the # hashes #.

#Login as root. Alternatively as regular user can type su and enter root password (default password is orangepi if using Official Beta Ubuntu/Debian images)##Ensure dependencies are installed#
apt-get install git fakeroot build-essential xz-utils libssl-dev bc
#Download Xunlong's Allwinner H6 3.10.65 kernel sources#
git clone https://github.com/orangepi-xunlong/OrangePiH6_kernel.git /usr/src/linux-3.10.65-sun50iw6p1
#Rename broken build folder#
mv /lib/modules/3.10.65/build /lib/modules/build-OLD
#Create and fix symbolic links to kernel sources you just downloaded#
ln -s /usr/src/linux-3.10.65-sun50iw6p1 /lib/modules/3.10.65/build
ln -sf /usr/src/linux-3.10.65-sun50iw6p1/kernel /lib/modules/3.10.65/source
#Ensure the script that extracts kernel .config file from kernel is executable#
chmod +x /usr/src/linux-3.10.65-sun50iw6p1/scripts/extract-ikconfig
#Extract config and store in kernel sources folder#
/usr/src/linux-3.10.65-sun50iw6p1/scripts/./extract-ikconfig /boot/orangepi/uImage >> /usr/src/linux-3.10.65-sun50iw6p1/.config
#change directory and compile kernel sources ready for building kernel modules after.#
cd /usr/src/linux-3.10.65-sun50iw6p1
make clean && make prepare && make scripts && make modules_prepare && make modules && make && make modules_install

Might also need to add the kernel module to load at startup. Some kernel module/driver source packages do this for you when you do make install.
If you are compiling a new kernel, its Image file is found in /usr/src/linux-3.10.65-sun50iw6p1 /lib/modules/3.10.65/arch/arm64/boot and you can do...
cd /usr/src/linux-3.10.65-sun50iw6p1 /lib/modules/3.10.65/arch/arm64/boot
mkimage -A arm -O linux -T kernel -C none -a 0x40080000 -e 0x40080000 -n "OrangePiH6" -d Image uImage

The uboot compatible kernel image is located now in the same folder. If you configured a kernel that does not boot, there is not much you can do but start over and burn the unaltered Sunxi provided Ubuntu image onto the SD card again.
If you can use the SD card on a Linux system and mount it in the a filemanager like Nautilus, I recommend you copy the new kernel image like this after the above step to test the kernel first.
cp /usr/src/linux-3.10.65-sun50iw6p1 /lib/modules/3.10.65/arch/arm64/boot/uImage /boot/orangepi/newuImage
then edit the /boot/uEnv.txt (as root/sudo user) file and change the line where it reads...
kernel_filename=orangepi/uImage
to
kernel_filename=orangepi/newuImage

If the board does not boot, the red light stays on or does not connect to network you can edit the same file and reverse the changes you did in /boot/uEnv.txt

1

Threads

2

Posts

19

Credits

Novice

Rank: 1

Credits
19
Post time 2018-5-30 11:00:49 | Show all posts
nice work! but i need your help!!
i buy an orangepi one plus and opi lite 2, both with H6.
i tried to install Octoprint in both of them, but none recognise my printer's usb port (is a ch340 usb).
so, i need to compile the ch340 driver. i read a lot, about 2 weeks searching for a solution but nothing came up.
can you help me, please?
thank you in advance!

4

Threads

13

Posts

116

Credits

Registered member

Rank: 2

Credits
116
 Author| Post time 2018-5-31 22:06:04 | Show all posts
Hi,

I tried but their BSP Kernel is so buggy. You cannot expect this board to handle 3d printing, its bleeding edge hardware and they barely get a stable system working for network server using an old Linux kernel.

It might be possible to do but when I get to the modules_install part, it has the driver for your usb serial adapter it always spits out errors. Its not worth the hassle. If your printer has the option get a well supported usb serial adapter.

1

Threads

5

Posts

23

Credits

Novice

Rank: 1

Credits
23
Post time 2018-9-14 04:47:53 | Show all posts
Hi,
I'm following your method, and it's great!
But I'm not able to compile a wifi dongle driver (rtl8812au) as I got this error "/usr/src/linux-3.10.65-sun50iw6p1/arch/aarch64/Makefile: No such file or directory".

Do you know a method to add missing files to kernel headers?
Thanks

4

Threads

13

Posts

116

Credits

Registered member

Rank: 2

Credits
116
 Author| Post time 2018-10-19 23:08:33 | Show all posts
I have tried to get the in tree usb wifi drivers and separate mtu7601 drivers working but no luck. I am fairly certain we cannot get usb wifi working for this old BSP kernel and have to wait until stable mainline kernel in an Armbian images are available.
There are alpha work in progress Armbian images for One Plus and Lite2 and my mtu7601 usb wifi dongles are plug and play on them but last time I tried the cpu cores ran at 900mhz because the cpufreq drivers are not available for the Allwinner H6 in the mainline kernel yet and these images are not too stable anyway things like reboot do not work.
As for your error message, that aarch64 folder does not exist instead its arm64 in this BSP kernel. Maybe try creating a symlink? As root
  1. ln -s /usr/src/linux-3.10.65-sun50iw6p1/arch/arm64/ /usr/src/linux-3.10.65-sun50iw6p1/arch/aarch64/
Copy the Code

I doubt that will solve your problem though.

4

Threads

96

Posts

907

Credits

Senior member

Rank: 4

Credits
907
Post time 2018-10-21 01:57:37 | Show all posts
I have two OPi 1+ here, running Armbian with 4.18.0-rc7-sunxi64 kernel and max CPU frequency of 1800MHz.

4

Threads

13

Posts

116

Credits

Registered member

Rank: 2

Credits
116
 Author| Post time 2018-10-29 05:42:43 | Show all posts
maxv78 replied at 2018-9-14 04:47
Hi,
I'm following your method, and it's great!
But I'm not able to compile a wifi dongle driver (rtl ...

Someone reported armbian images work better now on Orange Pi One Plus. Your wifi usb might work now.
You have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2019-12-15 03:17 GMT+8 , Processed in 0.034536 second(s), 23 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list