Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
There were small config issues especially with the UART and that was the reason why I did not see anything on the console during my first attempts last year.
Finding out the configs was difficult... As a first step I compiled the source tree v4.20.y I did find on the github repo using their config. This did boot with console!
With that I was able to compare the CONFIG options with our letux_defconfig. After fighting with Kconfig (which treats lines with "# CONFIG_xxx is not set" not as comments but a config change), I finally had boiled it down to ca. 30 modified settings.
After applying them on top of letux_defconfig I got the v4.20.y tree boot.
And interestingly our letux-4.20 tree as well:
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.20.0-letux-raspi+ (hns@iMac.fritz.box) (gcc version 4.9.2 (GCC)) #3154 SMP PREEMPT Fri Jan 4 12:55:54 CET 2019 [ 0.000000] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d [ 0.000000] CPU: div instructions available: patching division code [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Raspberry Pi 3 Model B Plus Rev 1.3 [ 0.000000] printk: debug: ignoring loglevel setting. [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] cma: Failed to reserve 256 MiB [ 0.000000] On node 0 totalpages: 242688 [ 0.000000] Normal zone: 1536 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 196608 pages, LIFO batch:63 [ 0.000000] HighMem zone: 46080 pages, LIFO batch:15 [ 0.000000] random: get_random_bytes called from start_kernel+0x80/0x470 with crng_init=0 [ 0.000000] percpu: Embedded 17 pages/cpu @(ptrval) s40320 r8192 d21120 u69632 [ 0.000000] pcpu-alloc: s40320 r8192 d21120 u69632 alloc=17*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 241152 [ 0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext4 elevator=deadline cma=256M@512M fsck.repair=yes rootwait splash plymouth.ignore-serial-consoles console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait log_buf_len=8M ignore_loglevel earlyprintk [ 0.000000] printk: log_buf_len: 8388608 bytes [ 0.000000] printk: early log buf free: 63716(97%) [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes) [ 0.000000] Memory: 941468K/970752K available (7115K kernel code, 677K rwdata, 1920K rodata, 1024K init, 354K bss, 29284K reserved, 0K cma-reserved, 184320K highmem)
...
letux login: root Password: Last login: Thu Jan 1 00:00:25 UTC 1970 on console Linux letux 4.20.0-letux-raspi+ #3154 SMP PREEMPT Fri Jan 4 12:55:54 CET 2019 armv7l
The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
root@letux:~# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:512 errors:0 dropped:0 overruns:0 frame:0 TX packets:512 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:41472 (40.5 KiB) TX bytes:41472 (40.5 KiB)
root@letux:~# lsusb unable to initialize libusb: -99 root@letux:~# aplay -l **** List of PLAYBACK Hardware Devices **** card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] Subdevices: 7/7 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0 root@letux:~# ls -l /dev/fb* ls: cannot access /dev/fb*: No such file or directory root@letux:~#
Not working are WLAN, Bluetooth, USB, Ethernet and most likely HDMI (I have not found a /dev/fb). Sound seems to exist but I have not tested anything.
Based on that version I have updated the letux_defconfig that will be included in letux-4.21-rc1 (expected for Monday).
So please prepare that we may see unexpected side-effects...
BR, Nikolaus
PS: it will become interesting to combine letux-phosh with the letux-kernel for raspi...
Hi,
On Fri, 4 Jan 2019 14:45:47 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
Regards, Andreas
Hi Andreas,
Am 04.01.2019 um 20:27 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
On Fri, 4 Jan 2019 14:45:47 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
You mean something like:
https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recip...
No, since mainline kernel seems not to build or need any overlays for RasPi and I am not (yet) aiming at shield/hat/capes. Just a "PC" like setup (monitor, keyboard, LAN).
But according to DT contents, Ethernet and USB and maybe WLAN should be supported by v4.20. Maybe I am still missing some CONFIGs.
Most people are building the github raspi kernel trees or the debian buster kernel and therefore describe only that in their how-tos. But it doesn't directly help us to integrate RasPi support into the Letux Kernel.
What I have not yet verified is if we load the correct DTB (there is no log entry telling a file name).
BR, Nikolaus
Hi,
On Sat, 5 Jan 2019 08:21:40 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi Andreas,
Am 04.01.2019 um 20:27 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
On Fri, 4 Jan 2019 14:45:47 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
You mean something like:
https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recip...
yes.
No, since mainline kernel seems not to build or need any overlays for RasPi and I am not (yet) aiming at shield/hat/capes. Just a "PC" like setup (monitor, keyboard, LAN).
Hmm, for a PC-like setup I would choose a standard debian. For a RasPi with e.g. touchscreen hat I would be happy to just use a letux system. And remember, someone presented a raspi phone at Fosdem in that restaurant.
The bottom line of the discussion about that on LKML is that enabling symbols for all dtb files is not wanted but to enable it on request for individual files. You can set flags per file.
The usually used bootloader configs for these shield/hat capable boards look in directories for overlays. So maybe it would be a good idea to enable it so that people simply can copy in their overlays from other sources into a letux system without touching the kernel. Well to some extent, overlays are also working without symbols.
Regards, Andreas
Hi Andreas,
Am 05.01.2019 um 19:48 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
On Sat, 5 Jan 2019 08:21:40 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi Andreas,
Am 04.01.2019 um 20:27 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
On Fri, 4 Jan 2019 14:45:47 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
You mean something like:
https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recip...
yes.
No, since mainline kernel seems not to build or need any overlays for RasPi and I am not (yet) aiming at shield/hat/capes. Just a "PC" like setup (monitor, keyboard, LAN).
Hmm, for a PC-like setup I would choose a standard debian. For a RasPi with e.g. touchscreen hat I would be happy to just use a letux system. And remember, someone presented a raspi phone at Fosdem in that restaurant.
There seems to be a Raspi Touchscreen driver in 5.0-rc1:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h...
This means, letux-5.0 will have it without doing much...
Well, we still have to get it booting with console :)
BR, Nikolaus
Hi,
On Mon, Jan 7, 2019 at 2:19 PM H. Nikolaus Schaller hns@goldelico.com wrote:
Hi Andreas,
Am 05.01.2019 um 19:48 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
On Sat, 5 Jan 2019 08:21:40 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi Andreas,
Am 04.01.2019 um 20:27 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
On Fri, 4 Jan 2019 14:45:47 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
You mean something like:
https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recip...
yes.
No, since mainline kernel seems not to build or need any overlays for RasPi and I am not (yet) aiming at shield/hat/capes. Just a "PC" like setup (monitor, keyboard, LAN).
Hmm, for a PC-like setup I would choose a standard debian. For a RasPi with e.g. touchscreen hat I would be happy to just use a letux system. And remember, someone presented a raspi phone at Fosdem in that restaurant.
There seems to be a Raspi Touchscreen driver in 5.0-rc1:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h...
This means, letux-5.0 will have it without doing much...
Well, we still have to get it booting with console :)
IIRc to have console enabled you need to add enable_uart=1 to config.txt file and console should work
BR, Nikolaus
BR, marek
http://projects.goldelico.com/p/gta04-kernel/ Letux-kernel mailing list Letux-kernel@openphoenux.org http://lists.goldelico.com/mailman/listinfo.cgi/letux-kernel
Hi Marek,
Am 07.01.2019 um 14:32 schrieb Belisko Marek marek.belisko@gmail.com:
Hi,
On Mon, Jan 7, 2019 at 2:19 PM H. Nikolaus Schaller <hns@goldelico.com mailto:hns@goldelico.com> wrote: Hi Andreas,
Am 05.01.2019 um 19:48 schrieb Andreas Kemnade <andreas@kemnade.info mailto:andreas@kemnade.info>:
Hi,
On Sat, 5 Jan 2019 08:21:40 +0100 "H. Nikolaus Schaller" <hns@goldelico.com mailto:hns@goldelico.com> wrote:
Hi Andreas,
Am 04.01.2019 um 20:27 schrieb Andreas Kemnade <andreas@kemnade.info mailto:andreas@kemnade.info>:
Hi,
On Fri, 4 Jan 2019 14:45:47 +0100 "H. Nikolaus Schaller" <hns@goldelico.com mailto:hns@goldelico.com> wrote:
Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
You mean something like:
https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recip... https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recipes-kernel/linux/linux-mainline-3.8/not-capebus/0021-OF-Compile-Device-Tree-sources-with-resolve-option.patch
yes.
No, since mainline kernel seems not to build or need any overlays for RasPi and I am not (yet) aiming at shield/hat/capes. Just a "PC" like setup (monitor, keyboard, LAN).
Hmm, for a PC-like setup I would choose a standard debian. For a RasPi with e.g. touchscreen hat I would be happy to just use a letux system. And remember, someone presented a raspi phone at Fosdem in that restaurant.
There seems to be a Raspi Touchscreen driver in 5.0-rc1:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h... https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.0-rc1&id=0b9f28fed3f70ff9a0380fe308739dd72a30a6f6
This means, letux-5.0 will have it without doing much...
Well, we still have to get it booting with console :) IIRc to have console enabled you need to add enable_uart=1 to config.txt file and console should work
Yes, that is enabled:
http://download.goldelico.com/letux-u-boot/RasPi-3B+/latest/config.txt
The problem is very different.
For example it works if I install a different DTB (one not compiled from sources) and keeping everyhting else untouched.
BR, Nikolaus
Hi Nikolaus,
On Mon, Jan 7, 2019 at 2:39 PM H. Nikolaus Schaller hns@goldelico.com wrote:
Hi Marek,
Am 07.01.2019 um 14:32 schrieb Belisko Marek marek.belisko@gmail.com:
Hi,
On Mon, Jan 7, 2019 at 2:19 PM H. Nikolaus Schaller hns@goldelico.com wrote:
Hi Andreas,
Am 05.01.2019 um 19:48 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
On Sat, 5 Jan 2019 08:21:40 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi Andreas,
Am 04.01.2019 um 20:27 schrieb Andreas Kemnade <andreas@kemnade.info
:
Hi,
On Fri, 4 Jan 2019 14:45:47 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Hi, with help and suggestions from Mark, I finally managed to get our Letux kernel compile and boot on the Raspi3B+.
Do you add -@ to DTC_FLAGS to make handling dtb overlays easier?
You mean something like:
https://github.com/beagleboard/meta-beagleboard/blob/master/common-bsp/recip...
yes.
No, since mainline kernel seems not to build or need any overlays for RasPi and I am not (yet) aiming at shield/hat/capes. Just a "PC" like setup (monitor, keyboard, LAN).
Hmm, for a PC-like setup I would choose a standard debian. For a RasPi with e.g. touchscreen hat I would be happy to just use a letux system. And remember, someone presented a raspi phone at Fosdem in that restaurant.
There seems to be a Raspi Touchscreen driver in 5.0-rc1:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h...
This means, letux-5.0 will have it without doing much...
Well, we still have to get it booting with console :)
IIRc to have console enabled you need to add enable_uart=1 to config.txt file and console should work
Yes, that is enabled:
http://download.goldelico.com/letux-u-boot/RasPi-3B+/latest/config.txt
The problem is very different.
For example it works if I install a different DTB (one not compiled from sources) and keeping everyhting else untouched.
Well there is broadcom firmware which is doing some magic so I maybe suggest to you linux-raspberrypi (as e.g. meta-raspberrypi is using) instead of mainline and test with this kernel.
BR, Nikolaus
BR,
marek
Kernel mailing list Kernel@pyra-handheld.com http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel
Hi Marek,
Am 07.01.2019 um 14:42 schrieb Belisko Marek marek.belisko@gmail.com:
Yes, that is enabled:
http://download.goldelico.com/letux-u-boot/RasPi-3B+/latest/config.txt http://download.goldelico.com/letux-u-boot/RasPi-3B+/latest/config.txt
The problem is very different.
For example it works if I install a different DTB (one not compiled from sources) and keeping everyhting else untouched.
Well there is broadcom firmware which is doing some magic so I maybe suggest to you linux-raspberrypi (as e.g. meta-raspberrypi is using) instead of mainline and test with this kernel.
Yes, the DTB that works comes from github raspberry kernel tree. The zImage is self-compiled and boots with the "wrong" DTS to login: and beyond.
So there is something wrong with compiling mainline DTB for bcm283x.
I have described the latest status of the analysis here:
http://lists.goldelico.com/pipermail/letux-kernel/2019-January/003006.html
It might have something to do with the undocumented -@ option of dtc (the command line dtc from Debian package doesn't even understand it). Or there is something wrong in choosing the console device name (there are no aliases for serial0/1 in mainline DTS).
BR, Nikolaus
Hi,
It might have something to do with the undocumented -@ option of dtc (the command line dtc from Debian package doesn't even understand it). Or there is something wrong in choosing the console device name (there are no aliases for serial0/1 in mainline DTS).
dtc --help
clearly lists and documents it, at least the version from kernel.
Regards, Andreas
Am 07.01.2019 um 16:33 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
It might have something to do with the undocumented -@ option of dtc (the command line dtc from Debian package doesn't even understand it). Or there is something wrong in choosing the console device name (there are no aliases for serial0/1 in mainline DTS).
dtc --help
clearly lists and documents it, at least the version from kernel.
Well, yes, *only* the version from kernel. What I mean is that I did not find it with google "man dtc". And AFAIK the kernel does not have its own man pages for its tools. So I simply didn't expect that the Kernel is adding its own options and features but hiding in lower quality documentation. BTW: Documentation//devicetree/booting-without-of.txt does mention only some options.
And since I am cross-compiling it is a little more difficult to use the kernel based version (especially if I currently compile something else) than trying the native one on some Letux device:
root@letux:~# dpkg -l | fgrep device-tree-compiler ii device-tree-compiler 1.4.0+dfsg-1 armhf Device Tree Compiler for Flat Device Trees root@letux:~# dtc -v Version: DTC 1.4.0 root@letux:~# dtc --help Usage: dtc [options] <input file>
Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv] -q, --quiet Quiet: -q suppress warnings, -qq errors, -qqq all -I, --in-format <arg> Input formats are: dts - device tree source text dtb - device tree blob fs - /proc/device-tree style directory -o, --out <arg> Output file -O, --out-format <arg> Output formats are: dts - device tree source text dtb - device tree blob asm - assembler source -V, --out-version <arg> Blob version to produce, defaults to %d (for dtb and asm output) -d, --out-dependency <arg> Output dependency file -R, --reserve <arg> tMake space for <number> reserve map entries (for dtb and asm output) -S, --space <arg> Make the blob at least <bytes> long (extra space) -p, --pad <arg> Add padding to the blob of <bytes> long (extra space) -b, --boot-cpu <arg> Set the physical boot cpu -f, --force Try to produce output even if the input tree has errors -i, --include <arg> Add a path to search for include files -s, --sort Sort nodes and properties before outputting (useful for comparing trees) -H, --phandle <arg> Valid phandle formats are: legacy - "linux,phandle" properties only epapr - "phandle" properties only both - Both "linux,phandle" and "phandle" properties -W, --warning <arg> Enable/disable warnings (prefix with "no-") -E, --error <arg> Enable/disable errors (prefix with "no-") -h, --help Print this help and exit -v, --version Print version and exit root@letux:~#
Anyways, is there a patch for the raspberry to enable -@ or how do I have to pass it to kernel-make so that DTC makes use of it? But only for RasPi and perhaps BeagleBone (where it appears to be also useful). I simply don't find good enough documentation to solve that myself.
BR, NIkolaus
Am 07.01.2019 um 16:52 schrieb H. Nikolaus Schaller hns@goldelico.com:
Am 07.01.2019 um 16:33 schrieb Andreas Kemnade andreas@kemnade.info:
Hi,
It might have something to do with the undocumented -@ option of dtc (the command line dtc from Debian package doesn't even understand it). Or there is something wrong in choosing the console device name (there are no aliases for serial0/1 in mainline DTS).
dtc --help
clearly lists and documents it, at least the version from kernel.
Well, yes, *only* the version from kernel. What I mean is that I did not find it with google "man dtc". And AFAIK the kernel does not have its own man pages for its tools. So I simply didn't expect that the Kernel is adding its own options and features but hiding in lower quality documentation. BTW: Documentation//devicetree/booting-without-of.txt does mention only some options.
And since I am cross-compiling it is a little more difficult to use the kernel based version (especially if I currently compile something else) than trying the native one on some Letux device:
root@letux:~# dpkg -l | fgrep device-tree-compiler ii device-tree-compiler 1.4.0+dfsg-1 armhf Device Tree Compiler for Flat Device Trees root@letux:~# dtc -v Version: DTC 1.4.0 root@letux:~# dtc --help Usage: dtc [options] <input file>
Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv] -q, --quiet Quiet: -q suppress warnings, -qq errors, -qqq all -I, --in-format <arg> Input formats are: dts - device tree source text dtb - device tree blob fs - /proc/device-tree style directory -o, --out <arg> Output file -O, --out-format <arg> Output formats are: dts - device tree source text dtb - device tree blob asm - assembler source -V, --out-version <arg> Blob version to produce, defaults to %d (for dtb and asm output) -d, --out-dependency <arg> Output dependency file -R, --reserve <arg> tMake space for <number> reserve map entries (for dtb and asm output) -S, --space <arg> Make the blob at least <bytes> long (extra space) -p, --pad <arg> Add padding to the blob of <bytes> long (extra space) -b, --boot-cpu <arg> Set the physical boot cpu -f, --force Try to produce output even if the input tree has errors -i, --include <arg> Add a path to search for include files -s, --sort Sort nodes and properties before outputting (useful for comparing trees) -H, --phandle <arg> Valid phandle formats are: legacy - "linux,phandle" properties only epapr - "phandle" properties only both - Both "linux,phandle" and "phandle" properties -W, --warning <arg> Enable/disable warnings (prefix with "no-") -E, --error <arg> Enable/disable errors (prefix with "no-") -h, --help Print this help and exit -v, --version Print version and exit root@letux:~#
Ok, here is the --help diff:
iMac:Linux hns$ diff kernel.help debian.help 3c3 < Options: -[qI:O:o:V:d:R:S:p:a:fb:i:H:sW:E:@AThv] ---
Options: -[qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv]
19c19 < Blob version to produce, defaults to 17 (for dtb and asm output) ---
Blob version to produce, defaults to %d (for dtb and asm output)
23c23 < Make space for <number> reserve map entries (for dtb and asm output) ---
tMake space for <number> reserve map entries (for dtb and asm output)
28,29d27 < -a, --align <arg> < Make the blob align to the <bytes> (extra space) 47,52d44 < -@, --symbols < Enable generation of symbols < -A, --auto-alias < Enable auto-alias of labels < -T, --annotate < Annotate output .dts with input source file and line (-T -T for more details) iMac:Linux hns$
Funnily, there are typos in the help message of the debian package.
Nevertheless the description of -@ "Enable generation of symbols" is not very helpful. Why would one enable that? What happens if not? What are "symbols" etc. Questions over questions...
But for getting the Raspi boot, trial and error will suffice :)
Anyways, is there a patch for the raspberry to enable -@ or how do I have to pass it to kernel-make so that DTC makes use of it? But only for RasPi and perhaps BeagleBone (where it appears to be also useful). I simply don't find good enough documentation to solve that myself.
BR, NIkolaus
Kernel mailing list Kernel@pyra-handheld.com http://pyra-handheld.com/cgi-bin/mailman/listinfo/kernel
On Mon, 7 Jan 2019 17:02:27 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Nevertheless the description of -@ "Enable generation of symbols" is not very helpful. Why would one enable that? What happens if not? What are "symbols" etc. Questions over questions...
I think it's referring the symbols as in debug symbols, the kind of thing you need to build in in order to get anything sensible out of gdb, assuming it's even possible to debug this.
But a bit of internet searching got me to this commit: https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15...
That says: "This is sufficient to implement a dynamic DT object loader."
Whether you actually want that I don't know, and I couldn't tell you how to pass the right option to dtc within the wrapped up tools. But you did ask the question...
Hi Levi,
Am 07.01.2019 um 17:49 schrieb levi levi2015@cobaltlake.co.uk:
On Mon, 7 Jan 2019 17:02:27 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Nevertheless the description of -@ "Enable generation of symbols" is not very helpful. Why would one enable that? What happens if not? What are "symbols" etc. Questions over questions...
I think it's referring the symbols as in debug symbols, the kind of thing you need to build in in order to get anything sensible out of gdb, assuming it's even possible to debug this.
But a bit of internet searching got me to this commit: https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15...
That says: "This is sufficient to implement a dynamic DT object loader."
Whether you actually want that I don't know, and I couldn't tell you how to pass the right option to dtc within the wrapped up tools. But you did ask the question...
Ok, this description in the commit gives another hint to my current theory that the Raspi boot loader needs this information to load the DT and modify it before starting the kernel...
To answer the real question if compiling with -@ makes the DTB bootable on RasPI can only be found by trying :)
While we did chat by mail I have written a small wrapper so that I can run the kernel-dtc on my build-host outside of the kernel tree or make process.
With that I can easily compile the bcm2837.dts with -@ option. But only after finishing the current work which is rebasing letux to v5.0-rc1 and debugging my wrongly resolved merge conflicts.
BR and thanks, Nikolaus
Hi all,
Am 07.01.2019 um 18:11 schrieb H. Nikolaus Schaller hns@goldelico.com:
Hi Levi,
Am 07.01.2019 um 17:49 schrieb levi levi2015@cobaltlake.co.uk:
On Mon, 7 Jan 2019 17:02:27 +0100 "H. Nikolaus Schaller" hns@goldelico.com wrote:
Nevertheless the description of -@ "Enable generation of symbols" is not very helpful. Why would one enable that? What happens if not? What are "symbols" etc. Questions over questions...
I think it's referring the symbols as in debug symbols, the kind of thing you need to build in in order to get anything sensible out of gdb, assuming it's even possible to debug this.
But a bit of internet searching got me to this commit: https://github.com/RobertCNelson/dtc/commit/dd6a0533e846e8d5e690a618fa35cc15...
That says: "This is sufficient to implement a dynamic DT object loader."
Whether you actually want that I don't know, and I couldn't tell you how to pass the right option to dtc within the wrapped up tools. But you did ask the question...
Ok, this description in the commit gives another hint to my current theory that the Raspi boot loader needs this information to load the DT and modify it before starting the kernel...
To answer the real question if compiling with -@ makes the DTB bootable on RasPI can only be found by trying :)
With that I can easily compile the bcm2837.dts with -@ option. But only after finishing the current work which is rebasing letux to v5.0-rc1 and debugging my wrongly resolved merge conflicts.
Well, my dtc wrapper did not find all required #includes, but I found out that I can simply do "DTC_FLAGS=-@ make-linux" which is passed down to the kernel Makefile and DTC.
With that I now get a __symbols__ section in the DTB. But there is no __overrides__. Strange, how that is generated from the github tree. Maybe it is explicitly in some .dtsi there?
Anyways, the 5.0-rc1 kernel still only boots with the .dtb built from the github tree... (without explict -@ option!).
I have also checked for the uart aliases and now with 5.0-rc1 they are there for the serial0/1 - but they appear to be swapped. I have tried to swap them in arch/arm/boot/dts/bcm283x.dtsi, but this makes also no change in boot log or boot success.
So it is stilly a mystery what makes the device trees so different.
I have attached both versions (reverse compiled from .dtb), if someone wants to look into them. Sometimes 10 eyes see more than two...
BR, Nikolaus
On Mon, 7 Jan 2019 16:33:15 +0100 Andreas Kemnade andreas@kemnade.info wrote:
Hi,
It might have something to do with the undocumented -@ option of dtc (the command line dtc from Debian package doesn't even understand it). Or there is something wrong in choosing the console device name (there are no aliases for serial0/1 in mainline DTS).
dtc --help
clearly lists and documents it, at least the version from kernel.
and there is Documentation/devicetree/overlay-notes.txt
Regards, Andreas