Re: Help relating to OXNAS Platform Bindings for Western Digital My Book World

"Neil Armstrong" <[email protected]> Mon, 21 May 2018 10:43:21 +0200
Newsgroups io.groups.linux-oxnas
Message-ID <[email protected]>
Hi,

On 18/05/2018 18:40, Raymond Elliot wrote:
> Hi there,
> 
> Apologies if it's the wrong thing to do to contact you directly.  If there is a better way of getting an answer please let me know.

You can also mail [email protected] which is the kernel dev mailing-list.

> 
> I have been looking at your kernel updates for the above NAS (https://lwn.net/Articles/681483/) and was hoping to be able to use them to port the kernel to the Thecus N2200 which is also an ox810se-based NAS.
> 
> Though I've been in software development and architecture for 25+ years, I'm a relative newbie when it comes to kernel builds.
> 
> To test my kernel, my approach is to build the kernel (4.9.93) and deploy it to a TFTP server and use the factory u-boot to start it up.

Why 4.9.43 ? You should be able to use the latest 4.16 and even 4.17-rc

> 
> I am hoping that I might be able to get a working kernel if I piggy-back on the OXNAS changes you have had and create a device tree specific to the N2200.
> 
> As such, I have attempted to create an arch/arm/boot/dts/thecus-n2200.dts file based on the wd-mbwe.dts file with what I understand to be different on the N2200.
> 

Can you provide the dts you created ?

> I can get the kernel to build and for u-boot to pull it down and attempt to run it, but I don't get any serial console output and the kernel subsequently crashes with the following error:

and the kernel .config ?

> 
> Starting kernel ...
> 
> data abort
> pc : [<491c0544>]    lr : [<4900000c>]
> sp : 48cdd7b4  ip : 00000003  fp : 48d1664c
> r10: 00000003  r9 : ffed3b51  r8 : 48cddfdc
> r7 : 00000003  r6 : 00000480  r5 : 00000000  r4 : ffffb400
> r3 : 00000010  r2 : 48cdd7b4  r1 : ffffda00  r0 : 000000e1
> Flags: nzcv  IRQs off  FIQs off  Mode SVC_32
> 
> My guess is that you managed to get a working kernel for the WD MBWE so even if you have no idea where I'm going wrong, it would be great to understand the approach you took to adding the support you did.

Yes, I made it work, can you provide all the steps you used to run it on the target ?

For reference, these are my commands I an running :
cat arch/arm/boot/zImage arch/arm/boot/dts/wd-mbwe.dtb > arch/arm/boot/zImage.dtb
mkimage -A arm -O linux -T kernel -C none -a 0x48500000 -e 0x48500000 -n 'Linux' -d arch/arm/boot/zImage.dtb uImage

Then on U-Boot:
setenv ipaddr 192.168.1.240
setenv serverip 192.168.1.21
tftpboot 0x48008000 oxnas/uImage
bootm 0x48008000

> 
> Kind regards,
> Raymond

Neil