I am making a GUI libreboot flashing utility
- Inicie sesión o regístrese para enviar comentarios
i made this topic so i don’t keep hijacking the tablets vs laptops topic
and also if you diddnt know i am making a libreboot flashing gui!
and just in-case anyone knows how to solve my problem
the reason why i am doing this is a bit complicated so i wont explain in this post but
for some reason whenever i run a externel script with this system function:
system("./scripts/lb_flash_1.sh");
Externel script:
#!/bin/sh
gksudo ./libreboot_bin/lenovobios_firstflash ./libreboot_bin/bin/x60/x60_ukqwerty_vesafb.rom -D Libreboot_Flashing_Utility
echo $? > ../temp_files/tmp_file.ASCII
the script complains about the specified directory not existing
but when i run the script from a terminal with ./lb_flash_1.sh
the script runs fine with no problems
i should ask this on a programming forum(and will) but i thought i might try here anyway just incase!
It depends on what the current directory is when you run the program. Instead of "./scripts/blah.sh" do SCRIPTS_DIR "/blah.sh" where SCRIPTS_DIR is defined with an argument to gcc.
Also, why are you using gksudo? Instead, check if the user is root, and if not, try su-to-root, gksudo, kdesudo, etc. Unetbootin does something like this.
Also, I'm guessing you probably want to capture the output of the shellscript. In this case, popen is a better choice than system.
And be careful with security when you use a function like system or popen. I don't think this applies in your case, but you should make sure a user can't inject anything into the command string.
You have a lot of code repetition. You should definitely ask on some programming forum.
Btw I suggest you host your code here: https://notabug.org/
With strong copyleft :P
heres the source code:
https://notabug.org/tomlukeywood/Libreboot_Flashing_Utility
its under the gpl v3!
so strong copyleft!
but obviously note that its not done yet
Tom, has the Coreboot developer been in touch?
he replied with a email asking me some questions about libreboot
and what i wanted to help him with
and i sent a email in reply to that one
but after a few days since i sent it i have got no reply
today i have sent another email just in-case the last one didn’t send and i am waiting for a reply
as the coreboot developer i emailed has not got back to me
i will now continue the development of the libreboot flashing utility on my own
Great! When you two publish your work, maybe later on you can reuse each other's code :)
well they just emailed me back
so i think i might be helping with there’s after all
heres the git repo btw:
https://github.com/lukaszdmitrowski/coreboot_flashtool
just a update to let pepole know i have not forgotten about this and i am working on the coreboot flashing utility
i am currently writing the functions for checking weather the rom matches up to the motherboard on the machine the program is being run
and have so far made these functions/structs:
/*license gpl v3*/ struct HashList; std::string CheckHashAgainstRomFile(const char* ROM_File, std::string hash); std::string GenerateHashFromFile(const char* file); std::string AppendHashList(const char* file, std::string Hash, std::string BoardName); HashList ReadHashList(const char* file); struct HashList { char **Hashes; char **BoardNames; std::string ErrorString; }; long int get_file_size(const char* file); bool file_exists(const char* file); void remove_all_chars(char* str, char c);
Have you tried talking with the Libreboot developer as well? I know he doesn't do anything other than deblobing the Coreboot versions, but maybe he can be of some help too.
Hey that's unfair :P Francis (libreboot dev) also develops for coreboot and creates automation scripts to make libreboot user-friendly.
ok the person who i have been developing this with has not answered my emails for about 2 weeks :/
so i guess ill just post some usefull hashing functions that i made so far:
http://92.19.232.58:82/files/checksum_functions(IN%20PROGRESS).zip
its gplv3
Maybe it's best to just continue your own development and when you two publish it, you look into ways to improve each other's code.
Hey Tom, are you still working on this? Coreboot's version seems to be almost done, so you can pick a thing or two I guess.
i stopped working on it after i could not get in contact with the developer
but i could take a look again when i have the time.
- Inicie sesión o regístrese para enviar comentarios