buildroot new fs can't install grub2 - buildroot

I'm traing to use buildroot and compile new embedded system for testing.
Everything looks ok I use last kernel 4.9.16 and buildroot is from 02.2017. After compiling I can't install grub2 there's now grub software on new root file system and second there's now bash in /bin and anywhere? There's only ash shell.
It's weird because the same procedure I made on mint 17 couple days ago and it works like a charm. I changed disk in my laptop and now I'm using fresh manjaro. I don't think this could be a problem because when I compile new system I can't chose bash in menu but I chose grub2 as bootloader.

Regarding bash: Buildroot by default only installs Busybox, which provides a more minimalistic shell called ash, which is sufficient for most purposes. If you really need bash, you can also get it by enabling it in the Buildroot menuconfig.
Regarding grub2, please have a look at the help text of the Grub2 option in Buildroot, it explains how to install it.

Related

compile perl script using par::packer and run it on different linux versions

I have a Perl script which I tried to use PAR::Packer in order to make it a standalone executable so it runs without having Perl on the target machine (because of security reasons).
I used WSL on Windows to pack the Perl script, but the problem I have when I run it on the target machine is the error: "version `GLIBC_2.29' not found".
I ran the command ldd --version and the version on the target machine is 2.17.
The problem I am facing is I cannot install anything on the target machine so I cannot install Perl + PAR::Packer to compile the script and then distribute it to the other machines that are gonna use the script (it's gonna be used in an image so lots of machines).
I cannot seem to find a solution or alternative for this, would love any help from the community.
Edit:
the ubuntu on my WSL was ubuntu 22, the target machines runs redhat and not debian variant, IDK which version as they are a custom linux made by the company i work in.
why am i stuck?
the main problem is that PAR::Packer isn't working on old ubuntu builds ( before 14) and at ubuntu 14 the glibc is already 2.22 while on version 12 its 2.15 so I need to compile the script on old ubuntu (version 12) but the compiling program (PAR::Packer) only works on ubuntu 14 and above so I am stuck in a loop and would apprentice any help or even alternatives for this problem.
Thanks!
Edit: the ubuntu on my WSL was ubuntu 22, the target machines runs redhat
Your problem is that you are trying to build on newer Linux machine, and run the resulting binary on older Linux. That doesn't work (without additional effort).
The simplest solution is to build on the oldest Linux distribution you need to support, possibly in a docker container.
Some other solutions are listed here.

How to access the kernel menuconfig in a Yocto project using bitbake?

I am currently trying to build a very simple system using Yocto. For this, I would like to change the kernel config, so I run:
bitbake -c menuconfig virtual/kernel
However, I can't get this to open the kernel menuconfig.
When using xterm or rvxt for OE_TERMINAL, a terminal opens very shortly and clos
Using tmux yields nothing
Using screen yields:
Trying to run: screen -r devshell_11581
There is no screen to be resumed matching devshell_11581.
With no way I can actually access the kernel menuconfig. Also I could not find any logs.
What do I need to do to make this work?
As mentionned in the official Yocto reference manual here.
Try to set OE_TERMINAL to "auto" to let bitbake detect your default terminal. Or when using one of:
gnome
xfce
xvt
screen
konsole
make sure that it is installed on your system.
I think, from my little experience:
gnome (for gnome-terminal)
xfce (for xfce-terminal)
xvt
screen
konsole (for KDE environment)
Edit: Also make sure that you install all Yocto dependencies, specially libncurses-dev for menuconfig menu.

How to install Git for Cygwin?

I see some tutorials online but they only show how to install git onto Cygwin AS you are installing Cygwin. I already have cygwin installed and customized so I'd prefer not to repeat that step. How do I install the git framework so I can use it for github?
Thank you.
In the world of Cygwin, there is really no such thing as only installing a package AS you are installing Cygwin. Cygwin was inherently designed with a setup.exe to be run multiple times when necessary.
There are thousands of packages available in the Cygwin repo mirrors. From what you are saying, it sounds as if you had a single go-round with the setup file and then planned to never install any additional available packages or upgrade them in the future. This is what the Cygwin setup file is specifically used for.
If you don't currently have Git installed in your particular Cygwin environment, just run setup.exe again and select the package. It should automatically detect your current installation directory and package directory and previously-selected mirror. When you mark the Git package for installation, it will automatically download all dependencies, just like apt-get or any other *NIX package manager.
There is also an abandoned project called apt-cyg that I still use religiously, especially on remote systems over SSH in order to avoid the GUI setup.exe. apt-cyg is basically a shell script that will install your package directly from the command line, apt-get-style. It requires wget and subversion, but after the 30 seconds it takes to setup, you'd just run apt-cyg install git. It also installs dependencies, just like the GUI setup.exe.
There is also a similar alternative if you install Cygwin via Chocolatey package manager -- you can also install cyg-get (I believe it's called). The syntax is a bit different -- something like cyg-get git. I don't really like this method, because it differs from apt-cyg in the fact that it actually uses the setup.exe and just automates the process so that you don't have to click anything. I don't use this method, because the last I checked, Chocolatey only supported 32-bit Cygwin installs, which is also what the cyg-get package looks for.
apt-cyg may be abandoned, but it has yet to disappoint, and if I know what I'm looking for, I always prefer it over running the setup.exe for package installation.
It looks like the project has been picked back up and is under active development again: https://github.com/transcode-open/apt-cyg
It appears this version requires lynx to install. I don't know. I still just use the original version on Google Code that worked just fine the last I checked: https://code.google.com/p/apt-cyg/
Edit: There has been a new Cygwin package manager out for awhile called cyg-get that can be installed via Chocolatey.
I'm not sure if it only works for Chocolatey-installed Cygwin installations or not, as Chocolatey doesn't install Cygwin in the normal locations anymore by default. Feel free to comment, but cyg-get is now my Cygwin package manager of choice unless I'm running an older installation of Cygwin that was not installed by Chocolatey. I avoided it for a while because they only supported 32-bit installations, but I can confirm that Chocolatey now supports 64-bit installations of Cygwin, and the cyg-get package manager works perfectly with it. I have a function sourced from my ~/.bashrc where I can use either apt or apt-get (with or without the install parameter, and it will just call cyg-get.bat with the programs I have specified to install.
http://redmine.jamoma.org/projects/1/wiki/Installing_and_setting_up_GIT
By following the steps mentioned in the link for windows you can install git using cygwin

Vim plugin does not recognize existing Perl support

I've been using the CoqIDE plugin for Vim on Linux machines for editing Coq files. Now I'm trying to install it on Windows 8. But when I try to source the plugin, I get
Your vim doesn't support Perl. Install it before using CoqIDE mode.
which is strange, because with :version I clearly see +perl/dyn included. Is this different from the +perl that I need?
I heard somewhere that you need to have Perl installed before Vim to get a Perl-enabled Vim, so I tried that as well. I uninstalled Vim, installed Strawberry Perl 5.18.2.2 (64bit), and reinstalled Vim. Still the same problem.
If the solution involves manually compiling binaries, I would really appreciate detailed instructions as I don't have any experience with it.
+perl/dyn just specifies that Vim has been compiled with dynamic Perl support; it doesn't yet check that the Perl library can be loaded successfully. To do that, try executing a Perl command, e.g.:
:perl VIM::Msg("Hello")
This probably yields on your system:
E370: Could not load library perl510.dll
Sorry, this command is disabled: the Perl library could not be loaded.
Next, you'd then have to investigate whether a proper Perl version has been installed and the DLL is accessible (though the PATH).
Download DWIMPerl for windows. I'm running win7 64 and gvim 7.4.2. Using strawberryperl and activeperl resulted in :echo has('perl') to yield 0. By switching to DWIMPerl (and ensuring my PATH env variables are proper) :echo has('perl') now yields 1 using the standard gvim distribution. This is important for vim extensions like dbext which require proper support for perl interfaces.

Chmod u+x windows cmd

I'm trying to install Scalatra on windows seven and need to change a file to executable...the Scalatra documentation says to do this, which is unix. What is the windows equivalant?
chmod u+x srt
You can simply open the relevant folder with a unix command prompt (I use git bash) and execute the unix commands from there
To get scalatra-sbt going on Windows, either port you own sbt.bat from scalatra-sbt, or install chmod via cygwin.
Assuming you've successfully installed the rest of Conscript and giter8, you can start a project that downloads scalatra-sbt. From there, one can look through the ./sbt source, and port the bash script functionality to your own windows specific script, or install a unix compatibility layer into Windows. If you go down the "windows specific script" route, perhaps the scalatra-sbt would appreciate the project contribution.
The "unix compatibility layer" route will eventually allow you to run ./sbt. chmod is a unix command line function, and is provided in a default package of the tool set cygwin, which provides a complete lunix-like environment. Once inside a cygwin terminal, you can chmod your file, as mentioned in the scalatra-sbt first project.
Diving into the contents of ./sbt from scalatra-sbt, this is actually unix script wrapper around the scala build tool (also referred to, confusingly, as sbt). If while trying to run ./sbt you get strange '\r' errors, install the cygwin package dos2unix, and then run it on the sbt file. If you run into any "which: no curl in..." or "which: no wget in..." errors, go back to the cygwin installer, find those packages such as wget, and then install those programs.
By the way, the last thing the scalatra-sbt script runs is the Scala build tool. The Scala build tool sbt itself has many reported issues with cygwin's default configuration, so you will likely need to do more research. Depending on what issues you're running into on your specific setup, you may need to make changes to the end of the ./sbt script to adjust the parameters used to launch the Scala build tool.