Should we have firmware source code?

Yes as my life would be easier
25%
2
Yes as the Raspberry Pi should be completely open
50%
4
No because they should be allowed closed-source firmware
25%
2
 
Total votes: 8
RPiJunior
Posts: 21
Joined: Tue May 07, 2013 6:12 pm

On the fly rereading config.txt

Fri May 31, 2013 10:24 am

I'm attempting to build my own bootloader using kexec but would like to know how to reread config.txt without reboots. Maybe a stripped down start.elf? I would try but as far as Google knows there is no publicly available source code. Or, better, just a way to change config.txt properties (without changing the file or rebooting).

Code: Select all

int main() {
    try
        throw "off table";
    } catch (void e) {
        printf("Phew...");
    }
}
WARNING: I destroy! :twisted:

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: On the fly rereading config.txt

Sat Jun 01, 2013 12:46 pm

Try the vc* tools , and perhaps tvservice in /opt/vc


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: On the fly rereading config.txt

Sat Jun 01, 2013 1:03 pm

AFAIK config.txt is just mostly kernel parameters, which you could pass to the kernel via kexec anyway...
i.e. config.txt would load the kexec based bootloader, then you set more options via the bootloader when it boots the kernel again.

I was playing around with the idea of a kexec based bootloader a while ago when the Pi first came out and that's what I was going to do, just pass stuff to the kernel via kexec
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

RPiJunior
Posts: 21
Joined: Tue May 07, 2013 6:12 pm

Re: On the fly rereading config.txt

Sun Jun 02, 2013 7:38 am

SirLagz wrote:AFAIK config.txt is just mostly kernel parameters, which you could pass to the kernel via kexec anyway...
i.e. config.txt would load the kexec based bootloader, then you set more options via the bootloader when it boots the kernel again.

I was playing around with the idea of a kexec based bootloader a while ago when the Pi first came out and that's what I was going to do, just pass stuff to the kernel via kexec
That's cmdline.txt

Code: Select all

int main() {
    try
        throw "off table";
    } catch (void e) {
        printf("Phew...");
    }
}
WARNING: I destroy! :twisted:

RPiJunior
Posts: 21
Joined: Tue May 07, 2013 6:12 pm

Re: On the fly rereading config.txt

Sun Jun 02, 2013 7:39 am

ghans wrote:Try the vc* tools , and perhaps tvservice in /opt/vc


ghans
Where would I find these online (am using buildroot)

Code: Select all

int main() {
    try
        throw "off table";
    } catch (void e) {
        printf("Phew...");
    }
}
WARNING: I destroy! :twisted:

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: On the fly rereading config.txt

Sun Jun 02, 2013 9:10 am

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: On the fly rereading config.txt

Sun Jun 02, 2013 3:55 pm

RPiJunior wrote:
SirLagz wrote:AFAIK config.txt is just mostly kernel parameters, which you could pass to the kernel via kexec anyway...
i.e. config.txt would load the kexec based bootloader, then you set more options via the bootloader when it boots the kernel again.

I was playing around with the idea of a kexec based bootloader a while ago when the Pi first came out and that's what I was going to do, just pass stuff to the kernel via kexec
That's cmdline.txt
lol. Derp. Getting my stuff confused.
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

RPiJunior
Posts: 21
Joined: Tue May 07, 2013 6:12 pm

Re: On the fly rereading config.txt

Sun Jun 02, 2013 5:22 pm

ghans wrote:Do you mean this ?

https://github.com/raspberrypi/userland ... linux/apps


ghans
Oh, I am looking for the more GPU/CPU related options: memory management, clock speeds. Likely the user will want to have to change monitor settings once (in bootloader).

Code: Select all

int main() {
    try
        throw "off table";
    } catch (void e) {
        printf("Phew...");
    }
}
WARNING: I destroy! :twisted:

RPiJunior
Posts: 21
Joined: Tue May 07, 2013 6:12 pm

Re: On the fly rereading config.txt

Sun Jun 02, 2013 5:24 pm

Am I coming across rude? I keep forgetting please and thank you but I find it hard to edit on my phone. Sorry. :oops:

Code: Select all

int main() {
    try
        throw "off table";
    } catch (void e) {
        printf("Phew...");
    }
}
WARNING: I destroy! :twisted:

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: On the fly rereading config.txt

Sun Jun 02, 2013 5:36 pm

The CPU frequency is managed via Linux .

http://www.mjmwired.net/kernel/Document ... ernors.txt

On the GPU , better ask dom.

The memory can be dynamically managed , there is a config.txt option for it.
AFAIK this feature is based on "CMA".
This article might be useful for you :

http://lwn.net/Articles/396657/

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

RPiJunior
Posts: 21
Joined: Tue May 07, 2013 6:12 pm

Re: On the fly rereading config.txt

Mon Jun 03, 2013 2:55 pm

ghans wrote:The CPU frequency is managed via Linux .

http://www.mjmwired.net/kernel/Document ... ernors.txt

On the GPU , better ask dom.

The memory can be dynamically managed , there is a config.txt option for it.
AFAIK this feature is based on "CMA".
This article might be useful for you :

http://lwn.net/Articles/396657/

ghans
The cpu_freq thing is good. Thank you very much. But I want to support distros not yet supporting CMA. I have heard of CMA and vc* and I would definitely use it in the distro I will make soon... Thank you very much for your help! :D

Code: Select all

int main() {
    try
        throw "off table";
    } catch (void e) {
        printf("Phew...");
    }
}
WARNING: I destroy! :twisted:

Return to “General discussion”