Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Unable to build a BEAGLEBOARD kernel



                        Hi,

On Sun, 16 Sep 2012 21:47:34 +0000, Pierre Pronchery wrote:
> 
> I am currently unable to build an evbarm kernel for the Beagleboard; it
> fails with the following error:
> 
> === BEGIN PASTE ===
>     compile  BEAGLEBOARD/arm32_kvminit.o
> cc1: warnings being treated as errors
> /home/khorben/Projects/netbsd/src/sys/arch/arm/arm32/arm32_kvminit.c: In
> function 'arm32_kernel_vm_init':
> /home/khorben/Projects/netbsd/src/sys/arch/arm/arm32/
> arm32_kvminit.c:359:1: error: not protecting local variables: variable
> length buffer
> 
> *** Failed target:  arm32_kvminit.o
> === END PASTE ===

Apparently the real error is here:

401         pv_addr_t chunks[KERNEL_L2PT_KERNEL_NUM+KERNEL_L2PT_VMDATA_NUM
+11];

KERNEL_L2PT_VMDATA_NUM is fine, since it is a constant value defined in 
the same file. However KERNEL_L2PT_KERNEL_NUM is not constant:

387         const size_t KERNEL_L2PT_KERNEL_NUM =
388             (kernel_size + L2_S_SEGSIZE - 1) / L2_S_SEGSIZE;

kernel_size being itself:
373         size_t kernel_size = bmi->bmi_kernelend;
(and then additional run-time computation)

Any recommended way to allocate this instead? I have no idea what's 
allowed at this stage.

Cheers,
-- 
khorben



Home | Main Index | Thread Index | Old Index