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

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
Author: tcmichals

Orangepi2/plus2/PC H3 Linux mainline support

[Copy link]

2

Threads

34

Posts

305

Credits

Intermediate member

Rank: 3Rank: 3

Credits
305
Post time 2015-10-17 00:40:37 | Show all posts
elcct replied at 2015-10-16 23:08
How can I download these patches?

No idea if this can be automated. They are pretty old now anyway and probably would not apply cleanly. Best is probably to browse the mailing list archive and manually extract and apply the relevant code.
Quite frankly not sure this is worth the effort if one has worked on H3 mainline support since then, you'll end up with what I described above, 1 core running way below max cpu freq, no networking.

1

Threads

47

Posts

189

Credits

Registered member

Rank: 2

Credits
189
Post time 2015-10-17 16:22:40 | Show all posts
Edited by moinejf at 2015-10-17 16:23

I am also working (slowly) on the mainline kernel.
A first patch on the kernel 4.2 from Jens did boot with one CPU at slow speed and the UART.
I update Jens's patch for the kernel 4.3, but I should have done some error: the kernel does not boot and there is no trace because no UART!
Anyway, I uploaded this patch on my site - see http://moinejf.free.fr/opi2/.

Pratically, I build the kernel on my OPI2 (kernel 3.4) with gcc-5.2.1. At the end of generation (including the copy of the .dts at the end of the kernel), as root, I just copy the uImage to the first partition of the SDcard (with a name different of the 3.4) and install the modules.
To test the kernel, I reboot, stopping the automatic start in the U-boot, and replacing the 'uImage' name in the 'boot_normal' variable.

Otherwise, I tried to write a rtl8189es driver starting from the 8188ee, but I have only a few knowledge about SDIO, so,
I am writing a DRM video driver...



Post time 2015-10-21 20:06:49 | Show all posts
moinejf replied at 2015-10-17 09:22
I am also working (slowly) on the mainline kernel.
A first patch on the kernel 4.2 from Jens did boo ...

Your patch (http://moinejf.free.fr/opi2/kernel-3.4.patch) fix HDMI audio.So, you touched "HDMI files", could you try to add support form HDMI CEC ?

It it possible to use for exmaple these files:

https://github.com/orangepi-xunl ... rs/video/sunxi/hdmi
https://github.com/orangepi-xunl ... vers/video/hdmi-cec



Orange PI PC

0

Threads

8

Posts

212

Credits

Intermediate member

Rank: 3Rank: 3

Credits
212
Post time 2015-10-22 02:13:16 | Show all posts
Hi All,
I've had some success this evening booting the latest u-boot and the linux-next kernel with the patches that jemk has just pushed. I'll put some instructions together tomorrow morning if anybody wants them. There is still loads to do but this a massive step in the right direction.

https://gist.github.com/codekipper/e188f9ab36ae7869afa7

CK

5

Threads

355

Posts

2102

Credits

Moderator

Rank: 7Rank: 7Rank: 7

Credits
2102
Post time 2015-10-22 03:14:31 | Show all posts
There is a long road to go, but probably the only one who is worth.
It makes me a little angry that allwinner does absolutely nothing to support this effort.
Boards:
orangepi plus, olinuxino A20, cubieboard A10, mele A2000 .....

1

Threads

28

Posts

136

Credits

Registered member

Rank: 2

Credits
136
Post time 2015-10-22 14:01:33 | Show all posts
@codekipper:

Thank you!  I'll let you know how it goes....

1

Threads

28

Posts

136

Credits

Registered member

Rank: 2

Credits
136
Post time 2015-10-22 14:03:13 | Show all posts
@Codekipper

Could I get your build technique?  Thanks!

0

Threads

8

Posts

212

Credits

Intermediate member

Rank: 3Rank: 3

Credits
212
Post time 2015-10-22 15:26:08 | Show all posts
@fritz - I'm certain Allwinner's business strategy is selling chipsets for the Android platform which is still stuck in the 3.blah kernel era. Mainlining is a time consuming business and considering that they're a small company unlikely to high up on their agenda. I use to work for a SoC vendor with 5 times the number of staff as AW and we struggled with both mainlining and selling chipsets. When a customer started requiring more attention then those resources working on mainlining were shipped to other areas. Most people just want cheap hardware. On the other hand it give us something to do in the community.

@faddat - I'm currently putting something together....you can get ahead by syncing the linux-next kernel git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next and these u-boot repos https://github.com/jwrdegoede/u-boot-sunxi and https://github.com/jemk/u-boot-sunxi.git. If you could apply these patches to the kernel then you're most of the way there
https://patchwork.kernel.org/patch/7458451/
https://patchwork.kernel.org/patch/7458441/
https://patchwork.kernel.org/patch/7458701/
https://patchwork.kernel.org/patch/7458631/
https://patchwork.kernel.org/patch/7458651/
https://patchwork.kernel.org/patch/7458661/

CK

0

Threads

8

Posts

212

Credits

Intermediate member

Rank: 3Rank: 3

Credits
212
Post time 2015-10-22 17:01:24 | Show all posts
Here are some more detailed instructions.
I'm always try to work with pretty much the latest u-boot and kernel. There may be some errors here as I use scripts for a lot of my building and setup. Most of below has been taken from my bash history.

Prepare your card

(echo n; echo p; echo 1; echo 2048; echo +15M; echo n; echo p; echo 2; echo 32768; echo +240M; echo p; echo w) | fdisk /dev/<CARD_LOCATION>
mkfs.vfat /dev/<CARD_LOCATION>1

Build u-boot

In your u-boot git have the following remotes.
git remote add jemk https://github.com/jemk/u-boot-sunxi.git (this is where the patches are)
git remote add sunxi-wip https://github.com/jwrdegoede/u-boot-sunxi (Hans' development track for u-boot)
git fetch --all
git branch orangepi sunxi-wip/sunxi-wip (creates new branch at the latest commit from Hans)
git checkout orangepi
git cherry-pick jemk/sunxi/h3~4..jemk/sunxi/h3 (this adds jemk's h3 patches to the latest u-boot)
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf- xunlong_orangepi_plus_defconfig
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf-
dd if=u-boot-sunxi-with-spl.bin of=/dev/<CARD_LOCATION> bs=1024 seek=8
sync
At this point the card should boot to u-boot prompt

Build kernel

In your kernel git have the following remote.
git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next
git fetch --all
git branch orangepi linux-next/master
Download the patches from these links
https://patchwork.kernel.org/patch/7458451/
https://patchwork.kernel.org/patch/7458441/
https://patchwork.kernel.org/patch/7458701/
https://patchwork.kernel.org/patch/7458631/
https://patchwork.kernel.org/patch/7458651/
https://patchwork.kernel.org/patch/7458661/
git am *.patch (make sure no other patches are in your repo directory)
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf- sunxi_defconfig
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x40008000 INSTALL_MOD_PATH=output uImage dtbs modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install (can be ignored for now)

Write to card

mkdir /tmp/sdcard
mount -t vfat /dev/<CARD_LOCATION>1 /tmp/sdcard/
cp <kernel dir>/arch/arm/boot/uImage /tmp/sdcard/.
cp <kernel dir>/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dtb /tmp/sdcard/.

cat > /tmp/boot.cmd << "EOF"
#COMMON SETTINGS
setenv fdt_high ffffffff
#Settings for booting from the card.
setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
setenv loaddtb fatload mmc 0 \$fdt_addr_r sun8i-h3-orangepi-plus.dtb
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
run uenvcmd
EOF

mkimage -C none -A arm -T script -d /tmp/boot.cmd /tmp/sdcard/boot.scr

cat > /tmp/sdcard/uEnv.txt << EOF
setenv fdt_high ffffffff
setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
setenv loaddtb fatload mmc 0 \$fdt_addr_r sun8i-h3-orangepi-plus.dtb
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
run uenvcmd
EOF

cd /tmp/
wget http://downloads.openwrt.org/sna ... wrt-sunxi-root.ext4
resize2fs /tmp/openwrt-sunxi-root.ext4 240M
dd if=/tmp/openwrt-sunxi-root.ext4 of=/dev/<CARD_LOCATION>2 bs=128k
sync
umount /tmp/sdcard

This should now boot to the openwrt prompt.

0

Threads

8

Posts

212

Credits

Intermediate member

Rank: 3Rank: 3

Credits
212
Post time 2015-10-22 17:01:44 | Show all posts
Here are some more detailed instructions.
I'm always try to work with pretty much the latest u-boot and kernel. There may be some errors here as I use scripts for a lot of my building and setup. Most of below has been taken from my bash history.

Prepare your card

(echo n; echo p; echo 1; echo 2048; echo +15M; echo n; echo p; echo 2; echo 32768; echo +240M; echo p; echo w) | fdisk /dev/<CARD_LOCATION>
mkfs.vfat /dev/<CARD_LOCATION>1

Build u-boot

In your u-boot git have the following remotes.
git remote add jemk https://github.com/jemk/u-boot-sunxi.git (this is where the patches are)
git remote add sunxi-wip https://github.com/jwrdegoede/u-boot-sunxi (Hans' development track for u-boot)
git fetch --all
git branch orangepi sunxi-wip/sunxi-wip (creates new branch at the latest commit from Hans)
git checkout orangepi
git cherry-pick jemk/sunxi/h3~4..jemk/sunxi/h3 (this adds jemk's h3 patches to the latest u-boot)
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf- xunlong_orangepi_plus_defconfig
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf-
dd if=u-boot-sunxi-with-spl.bin of=/dev/<CARD_LOCATION> bs=1024 seek=8
sync
At this point the card should boot to u-boot prompt

Build kernel

In your kernel git have the following remote.
git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next
git fetch --all
git branch orangepi linux-next/master
Download the patches from these links
https://patchwork.kernel.org/patch/7458451/
https://patchwork.kernel.org/patch/7458441/
https://patchwork.kernel.org/patch/7458701/
https://patchwork.kernel.org/patch/7458631/
https://patchwork.kernel.org/patch/7458651/
https://patchwork.kernel.org/patch/7458661/
git am *.patch (make sure no other patches are in your repo directory)
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf- sunxi_defconfig
make ARCH=arm -j 18 CROSS_COMPILE=arm-linux-gnueabihf- LOADADDR=0x40008000 INSTALL_MOD_PATH=output uImage dtbs modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install (can be ignored for now)

Write to card

mkdir /tmp/sdcard
mount -t vfat /dev/<CARD_LOCATION>1 /tmp/sdcard/
cp <kernel dir>/arch/arm/boot/uImage /tmp/sdcard/.
cp <kernel dir>/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dtb /tmp/sdcard/.

cat > /tmp/boot.cmd << "EOF"
#COMMON SETTINGS
setenv fdt_high ffffffff
#Settings for booting from the card.
setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
setenv loaddtb fatload mmc 0 \$fdt_addr_r sun8i-h3-orangepi-plus.dtb
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
run uenvcmd
EOF

mkimage -C none -A arm -T script -d /tmp/boot.cmd /tmp/sdcard/boot.scr

cat > /tmp/sdcard/uEnv.txt << EOF
setenv fdt_high ffffffff
setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
setenv loaddtb fatload mmc 0 \$fdt_addr_r sun8i-h3-orangepi-plus.dtb
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
run uenvcmd
EOF

cd /tmp/
wget http://downloads.openwrt.org/sna ... wrt-sunxi-root.ext4
resize2fs /tmp/openwrt-sunxi-root.ext4 240M
dd if=/tmp/openwrt-sunxi-root.ext4 of=/dev/<CARD_LOCATION>2 bs=128k
sync
umount /tmp/sdcard

This should now boot to the openwrt prompt.
You have to log in before you can reply Login | Register

Points Rules

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

2019-11-19 05:46 GMT+8 , Processed in 0.040440 second(s), 20 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list