No experience on this, but looks like it can be done with the patched mainline kernel: https://forum.odroid.com/viewtopic.php?t=33993
Just for my understanding, gentoo-sources does not contain all the drivers needed by this board so you are trying to copy those from the 'hardkernel' sources, correct? Raffaele > -----Original Message----- > From: Bill Kenworthy <bi...@iinet.net.au> > Sent: Thursday, January 9, 2020 02:50 > To: gentoo-user@lists.gentoo.org > Subject: [gentoo-user] gentoo-sources kernel not seeing 4G ram > > Hi, not sure anyone can help with this as its a bit off the reservation :) > > I have a Odroid N2 with 4G ram that is only seeing 1G. (even from right at > boot looking at dmesg). Its part of the board so its not a connector issue. > > Kernel is gentoo-sources-5.4.8 with the AMLOGIC armv8 relevant bits copied > from the 4.9 series original hardkernel sources. OS is gentoo AARCH64. This > all built and runs quite nicely, but cant see the full 4G ram that should be > there. > > Ive attached my latest kernel config in the hope that someone can see > something Ive missed (presuming it isn't an inherent problem in the way I > have gone about this) - looking at the config, diffing it against the > hardkernel > source etc. hasn't helped. Below is the start of dmesg up to the memory > statement. > > My next move will be to go back to the 4.9 supplied kernel and make sure it > isn't hardware failure (unlikely, but ...) > > BillK > > [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] > [ 0.000000] Linux version 5.4.8-gentoo (root@n2) (gcc version 9.2.0 (Gentoo > 9.2.0-r2 p3)) #1 SMP PREEMPT Thu Jan 9 08:36:20 AWST 2020 [ 0.000000] > Machine model: Hardkernel ODROID-N2 [ 0.000000] efi: Getting EFI > parameters from FDT: > [ 0.000000] efi: UEFI not found. > [ 0.000000] Reserved memory: created CMA memory pool at > 0x0000000030000000, size 256 MiB [ 0.000000] OF: reserved mem: initialized > node linux,cma, compatible id shared-dma-pool [ 0.000000] NUMA: No > NUMA configuration found [ 0.000000] NUMA: Faking a node at [mem > 0x0000000000000000-0x000000003fffffff] > [ 0.000000] NUMA: NODE_DATA [mem 0x2fdb6800-0x2fdb7fff] [ 0.000000] > Zone ranges: > [ 0.000000] DMA32 [mem 0x0000000000000000-0x000000003fffffff] > [ 0.000000] Normal empty > [ 0.000000] Movable zone start for each node [ 0.000000] Early memory > node ranges [ 0.000000] node 0: [mem 0x0000000000000000- > 0x0000000004ffffff] > [ 0.000000] node 0: [mem 0x0000000005300000-0x000000003fffffff] > [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000- > 0x000000003fffffff] > [ 0.000000] On node 0 totalpages: 261376 [ 0.000000] DMA32 zone: 4096 > pages used for memmap [ 0.000000] DMA32 zone: 0 pages reserved > [ 0.000000] DMA32 zone: 261376 pages, LIFO batch:63 [ 0.000000] psci: > probing for conduit method from DT. > [ 0.000000] psci: PSCIv1.0 detected in firmware. > [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] > psci: > MIGRATE_INFO_TYPE not supported. > [ 0.000000] psci: SMC Calling Convention v1.1 [ 0.000000] percpu: > Embedded 22 pages/cpu s52632 r8192 d29288 u90112 [ 0.000000] pcpu-alloc: > s52632 r8192 d29288 u90112 alloc=22*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] > 1 > [0] 2 [0] 3 [0] 4 [0] 5 [ 0.000000] Detected VIPT I-cache on CPU0 [ > 0.000000] > CPU features: detected: ARM erratum 845719 [ 0.000000] Built 1 zonelists, > mobility grouping on. Total pages: 257280 [ 0.000000] Policy zone: DMA32 > [ 0.000000] Kernel command line: root=/dev/mmcblk0p2 rootwait rw > console=ttyAML0,115200n8 no_console_suspend fsck.repair=yes > net.ifnames=0 elevator=noop hdmimode=1080p60hz cvbsmode=576cvbs > max_freq_a53=1896 max_freq_a73=1800 maxcpus=6 voutmode=hdmi > disablehpd=false cvbscable=0 overscan=100 monitor_onoff=false > usb-xhci.tablesize=2 logo=osd0,loaded > [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, > 1048576 bytes, linear) > [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, > linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off > [ 0.000000] Memory: 748756K/1045504K available (7932K kernel code, 728K > rwdata, 2784K rodata, 1856K init, 403K bss, 34604K reserved, 262144K cma- > reserved) [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, > CPUs=6, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU > implementation. > [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to > nr_cpu_ids=6.