PINE64

Full Version: Real-time linux kernel
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
(02-08-2017, 02:33 AM)umiddelb Wrote: [ -> ]Hi ,

since we have a more or less working 4.9 mainline kernel, I was able to apply the latest PREEMPT_RT patches against 4.9.6.
You will find the kernel sources here and a ready to extract kernel image here. If you want to modify some of the kernel configuration parameters, I can give you some advice how to do this and how to build a kernel on your own Pine64.

Cheers
Uli

Hi

I think I need some guidance as to where the files need to go and in what name.

I have been trying to substitute for files already in /boot
Image replaces /boot/pine64/Image  (that should be OK)
sun50i-a64-pine64-plus.dtb replaces /boot/pine64/sun50i-a64-pine64-plus.dtb  (why is it so small compared to the original? 9K v 69K)
Initrd is renamed /boot/initrd.img  (Should this now be called Initrd ?  Should it be in the same dir as the Image?)

Either using your files or building my own, boot fails and nothing written in kern.log etc.

Close but so far away at present

Looking at stuff on another forum, looks like everything has changed and the kernel.d dir goes into /boot as it is
That didn't work either.


regards
Which image did you take to prepare the µSD card? For a mainline kernel you should take the Armbian dev build for the Pine64. At this time there are no official ones, only nightly builds.
(02-20-2017, 02:44 PM)umiddelb Wrote: [ -> ]Which image did you take to prepare the µSD card? For a mainline kernel you should take the Armbian dev build for the Pine64. At this time there are no official ones, only nightly builds.

I have been using an image based upon one of the longsleep builds.
Managed to get a 3.18 kernel to PREEMPT but not full RT.

Thanks for the steer, I have downloaded a snapshot and will look at trying builds on a new image when I get a bit of time.

regards
(02-21-2017, 05:16 AM)schooner Wrote: [ -> ]Thanks for the steer, I have downloaded a snapshot and will look at trying builds on a new image when I get a bit of time.

regards

Works perfectly, much prefer the /boot inside rootfs, makes things much closer to more familiar x86 layout.

Code:
root@pine64:~# uname -a

Linux pine64 4.9.6-rt4-p64-73261-g5fb7565 #2 SMP PREEMPT RT Wed Feb 8 07:45:02 UTC 2017 aarch64 aarch64 aarch64 GNU/Linux

Thanks for your work putting that together, now I can start to play in earnest.

regards
Hi umiddelb,

I want to use Pine64 as a car server where all devices are attached. I tried to make my 3G modem working but from what I see 3.10 kernel does assign serial ports for the turn the recognized modem. When I plug the modem to any mine more recent linux computers everything goes fine. So i understand this is somewhere in system/kernel problem and would appreciate if you guide me how to compile 4.9 kernel for the pine64+.

Thank you

Dmytro

P.S. I tried nightly build https://dl.armbian.com/pine64/nightly/ but it is very minimal and I even can not start wifi with it.
Hi, I set kernel  features is Preemption Model (Fully Preemptible Kernel (RT))  --> 
start the  kernel and install rtl8723bs.ko, config wifi is AP mode.
Use my phone connect pine64 wifi have a bug follows:



BUG: failure at kernel/rtmutex.c:875/rt_spin_lock_slowlock()!
[  193.261966] Kernel panic - not syncing: BUG! Act:    8 Avg:    7 Max:      11
[  193.261973] CPU: 0 PID: 1066 Comm: RTW_CMD_THREAD Not tainted 3.10.65-7-pine64-rt69 #10
[  193.261976] Call trace:C:   6038 Min:      6 Act:    8 Avg:    7 Max:      11
[  193.261990] [<ffffffc000088734>] dump_backtrace+0x0/0x114g:    7 Max:      10
[  193.261995] [<ffffffc000088868>] show_stack+0x20/0x30
[  193.262001] [<ffffffc000771da8>] dump_stack+0x1c/0x28
[  193.262007] [<ffffffc000770308>] panic+0xf4/0x224
[  193.262014] [<ffffffc000776174>] rt_spin_lock_slowlock+0x10c/0x2d4
[  193.262018] [<ffffffc000776a50>] rt_spin_lock+0x1c/0x2c
[  193.262024] [<ffffffc00056bcfc>] sunxi_mmc_irq+0x34/0x540
[  193.262030] [<ffffffc000127158>] handle_irq_event_percpu+0xc8/0x24c
[  193.262034] [<ffffffc000127354>] handle_irq_event+0x78/0xa8
[  193.262039] [<ffffffc00012a924>] handle_fasteoi_irq+0xb0/0x12c
[  193.262043] [<ffffffc0001267cc>] generic_handle_irq+0x34/0x48
[  193.262048] [<ffffffc0000848e4>] handle_IRQ+0x88/0xac
[  193.262052] [<ffffffc000081410>] gic_handle_irq+0x58/0x88
[  193.262054] Exception stack(0xffffffc07520b810 to 0xffffffc07520b930)
[  193.262059] b800:                                     766f2738 ffffffc0 80000174 00000000
[  193.262064] b820: 7520b950 ffffffc0 00776a9c ffffffc0 766f2738 ffffffc0 92045402 00000000
[  193.262070] b840: 766f2740 ffffffc0 00000001 00000000 00000002 00000000 00000000 00000000
[  193.262075] b860: 75208000 ffffffc0 ff4f308b 0000002c 76771100 ffffffc0 7520b750 ffffffc0
[  193.262080] b880: 00000007 00000000 00000002 00000000 00809000 ffffffc0 00000000 ffff0000
[  193.262086] b8a0: 35004be1 01ba3400 00000033 00000000 00000001 00000000 00809000 ffffffc0
[  193.262091] b8c0: 00000007 00000000 766f2738 ffffffc0 80000174 00000000 00000000 00000000
[  193.262097] b8e0: 766f2000 ffffffc0 766f2000 ffffffc0 7520ba90 ffffffc0 7520bb30 ffffffc0
[  193.262102] b900: 766f2738 ffffffc0 0001bbc6 00000000 00000000 00000000 7520b950 ffffffc0
[  193.262106] b920: 0056d8c4 ffffffc0 7520b950 ffffffc0
[  193.262110] [<ffffffc000083dbc>] el1_irq+0x7c/0xf0
[  193.262114] [<ffffffc00056d8c0>] sunxi_mmc_request+0x5ac/0x5f8
[  193.262118] [<ffffffc000558f28>] mmc_start_request+0x11c/0x12c
[  193.262122] [<ffffffc000559094>] mmc_wait_for_req+0x74/0xd8
[  193.262126] [<ffffffc000559164>] mmc_wait_for_cmd+0x6c/0x84
[  193.262132] [<ffffffc000564294>] mmc_io_rw_direct_host+0xf0/0x150
[  193.262136] [<ffffffc000564464>] mmc_io_rw_direct+0x80/0x98
[  193.262141] [<ffffffc000566400>] sdio_writeb+0x74/0x90
[  193.262232] [<ffffffbffc049388>] sd_write8+0x68/0x9c [8723bs]
[  193.262320] [<ffffffbffc085ad4>] sdio_write8+0x48/0x60 [8723bs]
[  193.262380] [<ffffffbffc00cfbc>] _rtw_write8+0x38/0x50 [8723bs]
[  193.262464] [<ffffffbffc07e4fc>] SetHwReg8723B+0x11c8/0x1400 [8723bs]
[  193.262547] [<ffffffbffc0825dc>] SetHwReg8723BS+0xa8/0xbc [8723bs]
[  193.262631] [<ffffffbffc061d3c>] rtw_hal_set_hwreg+0x34/0x48 [8723bs]
[  193.262696] [<ffffffbffc01f33c>] send_beacon+0x50/0x144 [8723bs]
[  193.262761] [<ffffffbffc023564>] tx_beacon_hdl+0x1c/0x48 [8723bs]
[  193.262818] [<ffffffbffc000c38>] rtw_cmd_thread+0x28c/0x3c0 [8723bs]
[  193.262824] [<ffffffc0000d64e8>] kthread+0xa0/0xac
[  193.262830] CPU1: stopping
[  193.262835] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.10.65-7-pine64-rt69 #10
[  193.262837] Call trace:
[  193.262844] [<ffffffc000088734>] dump_backtrace+0x0/0x114
[  193.262849] [<ffffffc000088868>] show_stack+0x20/0x30
[  193.262853] [<ffffffc000771da8>] dump_stack+0x1c/0x28
[  193.262858] [<ffffffc000091100>] handle_IPI+0xcc/0x164
[  193.262862] [<ffffffc000081428>] gic_handle_irq+0x70/0x88
[  193.262864] Exception stack(0xffffffc076603e40 to 0xffffffc076603f60)
[  193.262870] 3e40: 76600000 ffffffc0 00000e12 00000000 76603f80 ffffffc0 00085294 ffffffc0
[  193.262876] 3e60: ffffffed 00000000 00000000 00000000 7af886c4 ffffffc0 00010000 00000000
[  193.262881] 3e80: 7536fda8 ffffffc0 00000000 00000000 29aaaaab 00000000 00000018 00000000
[  193.262886] 3ea0: d8706180 0039d106 76603db0 ffffffc0 00000000 00000000 00000000 00000000
[  193.262892] 3ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00001000 00000000
[  193.262897] 3ee0: 000d5f14 ffffffc0 004b0000 00000000 004a7000 00000000 76600000 ffffffc0
[  193.262903] 3f00: 00000e12 00000000 00c76780 ffffffc0 00c3e7ea ffffffc0 00c3e000 ffffffc0
[  193.262908] 3f20: 41000000 00000000 41d3d000 00000000 41d3f000 00000000 00080260 ffffffc0
[  193.262914] 3f40: 41000000 00000040 76603f80 ffffffc0 00085290 ffffffc0 76603f80 ffffffc0
[  193.262918] [<ffffffc000083dbc>] el1_irq+0x7c/0xf0
[  193.262924] [<ffffffc0000fa948>] cpu_startup_entry+0x1b8/0x214
[  193.262931] [<ffffffc00076d0b4>] secondary_start_kernel+0x120/0x130
[  193.262933] CPU2: stopping
[  193.262937] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.10.65-7-pine64-rt69 #10
[  193.262938] Call trace:
[  193.262943] [<ffffffc000088734>] dump_backtrace+0x0/0x114
[  193.262948] [<ffffffc000088868>] show_stack+0x20/0x30
[  193.262952] [<ffffffc000771da8>] dump_stack+0x1c/0x28
[  193.262955] [<ffffffc000091100>] handle_IPI+0xcc/0x164
[  193.262959] [<ffffffc000081428>] gic_handle_irq+0x70/0x88
[  193.262961] Exception stack(0xffffffc076607e40 to 0xffffffc076607f60)
[  193.262967] 7e40: 76604000 ffffffc0 00000e12 00000000 76607f80 ffffffc0 00085294 ffffffc0
[  193.262973] 7e60: ffffffed 00000000 00000000 00000000 7af956c4 ffffffc0 00010000 00000000
[  193.262978] 7e80: 1de45980 0000002e 0bfe451a 00000000 29aaaaab 00000000 00000018 00000000
[  193.262983] 7ea0: d7ec8b80 00350c52 76607db0 ffffffc0 0000002d 00000000 ac040300 060a0aa8
[  193.262989] 7ec0: 08080808 02020408 6c050f02 6c61636f 000000ff 00000000 00000033 00000000
[  193.262994] 7ee0: 00000001 00000000 00809000 ffffffc0 00000007 00000000 76604000 ffffffc0
[  193.263000] 7f00: 00000e12 00000000 00c76780 ffffffc0 00c3e7ea ffffffc0 00c3e000 ffffffc0
[  193.263005] 7f20: 41000000 00000000 41d3d000 00000000 41d3f000 00000000 00080260 ffffffc0
[  193.263011] 7f40: 41000000 00000040 76607f80 ffffffc0 00085290 ffffffc0 76607f80 ffffffc0
[  193.263014] [<ffffffc000083dbc>] el1_irq+0x7c/0xf0
[  193.263019] [<ffffffc0000fa948>] cpu_startup_entry+0x1b8/0x214
[  193.263024] [<ffffffc00076d0b4>] secondary_start_kernel+0x120/0x130
[  193.263026] CPU3: stopping
[  193.263030] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.10.65-7-pine64-rt69 #10
[  193.263031] Call trace:
[  193.263037] [<ffffffc000088734>] dump_backtrace+0x0/0x114
[  193.263041] [<ffffffc000088868>] show_stack+0x20/0x30
[  193.263045] [<ffffffc000771da8>] dump_stack+0x1c/0x28
[  193.263049] [<ffffffc000091100>] handle_IPI+0xcc/0x164
[  193.263052] [<ffffffc000081428>] gic_handle_irq+0x70/0x88
[  193.263055] Exception stack(0xffffffc076613e40 to 0xffffffc076613f60)
[  193.263060] 3e40: 76610000 ffffffc0 00000e12 00000000 76613f80 ffffffc0 00085294 ffffffc0
[  193.263066] 3e60: ffffffed 00000000 00000000 00000000 7afa26c4 ffffffc0 00010000 00000000
[  193.263071] 3e80: dc4c2180 00004e5a 0bfe451a 00000000 29aaaaab 00000000 00000018 00000000
[  193.263077] 3ea0: d8706180 0039d106 76613db0 ffffffc0 00000200 00000000 00000000 00000000
[  193.263082] 3ec0: 00000000 00000000 ffffffff ffffffff 00000000 00000000 00001000 00000000
[  193.263088] 3ee0: 000d5f14 ffffffc0 004b0000 00000000 004a7000 00000000 76610000 ffffffc0
[  193.263093] 3f00: 00000e12 00000000 00c76780 ffffffc0 00c3e7ea ffffffc0 00c3e000 ffffffc0
[  193.263099] 3f20: 41000000 00000000 41d3d000 00000000 41d3f000 00000000 00080260 ffffffc0
[  193.263104] 3f40: 41000000 00000040 76613f80 ffffffc0 00085290 ffffffc0 76613f80 ffffffc0
[  193.263108] [<ffffffc000083dbc>] el1_irq+0x7c/0xf0
[  193.263112] [<ffffffc0000fa948>] cpu_startup_entry+0x1b8/0x214
[  193.263117] [<ffffffc00076d0b4>] secondary_start_kernel+0x120/0x130


Can you help me ?
Pages: 1 2 3 4 5