promising, but not exactly what dmesg is showing me. in that same directory there is a .config_ipq806x file, which i ASSume is what would get used when compiling for my specific router. but on line 567 that just says
Code:
CONFIG_CMDLINE=""
so where exactly is my kernel command line coming from? from one of BS's secret Makefiles?
Joined: 08 May 2018 Posts: 14217 Location: Texas, USA
Posted: Sat Jul 24, 2021 17:53 Post subject:
Find the most complete Linux reference book you can get. Read it cover to cover; read again; rinse and repeat until you start understanding; and keep reading.
Find the most complete Linux reference book you can get. Read it cover to cover; read again; rinse and repeat until you start understanding; and keep reading.
P.S. You can also find loads of information on the Internet these days.
I appreciate the cleverness of your reply, and you are correct in implying that I have never actually sat down and read a book on Linux.
The problem with my specific question is that most information on the internet (and I assume in print) regarding kernel boot parameters assume you are using GRUB or something similar. I can't find much info on CFE or whatever bootloaders these routers are using nowadays.
Name a book on compiling DD-WRT firmware images and I'll read it cover to cover...
Joined: 08 May 2018 Posts: 14217 Location: Texas, USA
Posted: Sun Jul 25, 2021 2:30 Post subject:
Kernel command line parameters don't rely on what bootloader you are using AFAIK. If such a book existed, I'd share my copy, lol. There used to be a thread about it, but it got removed somehow... _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Kernel command line parameters don't rely on what bootloader you are using AFAIK.
I might be mixing up some terms. but with GRUB there is a /boot/grub.cfg file that contains the kernel command line. my understanding was that GRUB is the bootloader, and it starts the kernel using the cmd line in its cfg file.
on a router things obviously work differently. it is tickling my curiosity bone...
Joined: 08 May 2018 Posts: 14217 Location: Texas, USA
Posted: Sun Jul 25, 2021 10:23 Post subject:
Some devices use uboot; some use (Broadcom) CFE; some use RedBoot (or a special micro redboot); and x86 uses grub, I think. I mean, this is a totally loaded question and discussion, lol. You could read through the buildroot documentation and perhaps find some answers, or get even more lost, whichever. You would have to dig in and run strings on each mtd partition and pipe grep for a specific string to find what you're looking for on the router flash itself. _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
I mean, this is a totally loaded question and discussion, lol.
I don't want to come across as a troll, I just find this in-depth technical stuff so interesting! but this topic did get a lot more complex than i had expected...
FWIW, I did find my answer, and I'll post it here in case anyone is ever wondering, and also for my own future reference:
I read the link that mrjcd posted and it had some good hints. I did "cat /proc/mtd" to discover what partition my bootloader is on. (It's u-boot, not CFE, as KernelPanic pointed out). Qualcom calls the u-boot bootloader APPSBL. I used "strings /dev/mtd9|grep -i boot" to show some interesting things from inside the bootloader, including a defintion of "bootargs" which matched the kernel command line reported by dmesg!
so theres my answer: the kernel command line is hardcoded into the u-boot bootloader from the manufacturer. Thanks Kernel and mrjcd for nudging me in the right direction.
so theres my answer: the kernel command line is hardcoded into the u-boot bootloader from the manufacturer
this is actually incorrect. It is in the bootloader, but its not hardcoded, its stored in flash memory. If i interrupt the boot process from the serial port I get to the IPQ prompt of the bootloader. "printenv" shows this: