Overlay directory option while compiling kernel for Ubuntu 10.04 - linux-kernel

I am learning Linux kernel programming. I want to know what is --overlay-dir option while compiling linux kernel as mentioned on this pagehttp://crashcourse.ca/introduction-linux-kernel-programming/intermission-building-new-ubuntu-1004-kernel-free-lesson. Why cant I build kernel image by just the basic kernel. That page asks for downloading ubuntu maverick tree. What does the overlay directory contain? Is it required?
Also is there any other way to download that maverick kernel tree other than the git way? means if I could download some zip file otherwise the git takes a lot of time for downloading around 700 MB

The --overlay-dir flag is for the make-kpkg program, which is the Debian (and Ubuntu) way to make installable packages (.deb) from kernel sources. This lets you install and uninstall the kernels you build more easily. The --overlay-dir tells make-kpkg where to find the files that control how the package is made. This is sometimes referred to as the debian directory. See http://man.he.net/man1/make-kpkg for a manual page.
I don't know about downloading less. The "magic words" are download a snapshot, but as far as I know they have to be created at the server end so, if they don't exist, you're stuck with pulling the lot.

Related

How to how to install poppler from the .tar file downloaded from poppler official site

There is no useful information on the site describing how to install the file .I have tried extracting the .tar file, installing through command prompt . there is no information available on the web.OS used is windows 11. Its for a project to extract data from images, using OCR. Poppler is used for getting page numbers of the pdf file which will be converted to an image file later in the process."https://poppler.freedesktop.org/" is the site from which I downloaded the file.Is this the right site.Any answer is helpful.Thank you
Poppler source is constantly updated, and thus common for Linux and Mac users to build or brew on demand. It is not much different when using Programming Suites like Python, Ruby etc.
Windows users expect one exe, but the poppler utils were built as a spin off from non-commercial licensed xpdf and for personal 32 bit users that is often simpler.
I have given examples for how simple that xpdf unpacking can be for one exe in several posts such as https://stackoverflow.com/a/68697144/10802527 (how to scan a file list, not used here) and https://stackoverflow.com/a/73123537/10802527 (how to use to run a single file) and
https://stackoverflow.com/a/73437398/10802527 (running one exe on demand)
Poppler prebuilt binaries are available as 64bit only so the first step after making a work directory is download latest version from https://github.com/oschwartz10612/poppler-windows using most current
https://github.com/oschwartz10612/poppler-windows/releases/download/v22.04.0-0/Release-22.04.0-0.zip and save to the working folder, then you can use right click Extract All... OR
tar -m -xf Release-22.04.0-0.zip to unpack in that folder so it should look like in the binary folder
Now the exe files are in a subdirectory and when using those it is best if that folder is included on the path environment.
RESIST any means to add using set or worse setx simply add folder via system gui, note in some cases after saving the setting it may need log off and log on to stick and in very rare cases even a reboot/restart.

"apt-get: command not found" issue raspberrry pi os built using Buildroot

I have built a sdcard.img for raspberry pi using Buildroot. When I run apt-get command it throws error "apt-get: command not found". I did not find apt-get/dpkg package to enable in 'make menuconfig' options. Now I'm trying to run cross-compiled opencv program on my Rpi but some shared libraries are missing and I want to install these libraries using apt repository (as I already did it on standard Raspbian Stretch os & program run successfully).
I googled it, there's no solution for Buildroot rasbpbian os. Also I tried downloading and installing .deb packages for apt/apt-get/dpkg, didn't work.
apt-get: command not found
I want to cross-compile a kernel which will have all the necessary packages such as apt/dpkg, bin and lib files. Or for the time being to get the work done need guidance to install apt/dpkg packages on Rpi buildroot os.
Buildroot will never have apt or any package manager. With buildroot you have to decide ahead-of-time what packages you'll want included in your rootfs. Use Raspbian if you want to use apt-get.
robert-orr has already answered your question but I think you are confused about the naming. You cannot rebuild raspbian using buildroot.
Rebuilding raspbian (a debian derivative) is a fairly involved process. You have to implement bootstrapping of a distro (compile a compiler, compile your packages with your compiled compiler, etc.) See Debian Bootstrap for everything needed to create your own distro from source. This is usually done by debian and debian-derivative distributions only.
You can build a simpler image using Buildroot, if that satisfies your needs. Also look at Yocto/OE to see if that satisfies your requirement for building an image from source.
With a Buildroot-generated system, it is not possible to use a package manager, because there is no way to make sure the package binaries will actually work on your system. There are two reasons for this:
Binaries depend on the toolchain (C library, kernel header version, subarchitecture choices, ABI choices). There are hundreds of combinations of these choices possible in Buildroot, it's not possible to build package binaries for all of them. Traditional distros limit the choices to just one per architecture.
How one package is configured affects how other packages can be built. Again, Buildroot offers choices there, while traditional distros choose one (usually enable all features).
In Buildroot, instead of using apt-get, you'd go back to make menuconfig, select the additional packages you want to install, and rebuild the system.

Where is tftp efi shell command?

Cannot find tftp command in shell.efi app from Tianocore.
When type tftp, got 'tftp' is not recognized as an internal or external command, operable program, or batch file. Help also doesn't know about it.
I looked at sources and found it is implemented in DynamicCommand directory. Maybe command must be loaded or activated somehow before using?
Edit: well, the only way i found to get tftp client working on Tianocore shell is building ShellPkg from sources. There is DynamicCommand/TftpDynamicCommand subdirectory contains tftp application. It will produce tftp.efi on package building finished. "Manual" can be found here. Still dont understand how to make shell with built-in tftp command and why Tianocore maintainers do not include procompiled tftp.efi in ShellBinPkg for example.
How to Run OVMF article contain information on how to get pre-built OVMF images:
Pre-built images are available at https://www.kraxel.org/repos/
These images are automatically built and track the latest OVMF code in the EDK II tree.
Some of these builds include a seabios CSM and can boot non-UEFI “legacy” operating systems. Note: seabios is GPLv3 licensed)
If your OS doesn’t work with RPM repositories, then you can manually download and decompress the RPM files under jenkins/edk2
You can find the latest OVMF RPM packages at kraxel repository. They contain the latest firmware and UefiShell.iso to boot. You will find tftp command you need and other cool stuff there.

Copy python modules from one system to another

Is it possibe to copy all of the python modules from one Windows computer to another computer? They are both running the same version of Python 2.7.12.
The reason for doing so is that I have internet access on one of them, and manual installing modules on the other requires to much time because of dependencies.
I suppose you mean "copy the python installation from one system to another" (else the answer is: put your modules on a USB key and copy them to the other system).
the best way
The best way of course would be to install Python properly on the other system using setup. But as you said, all dependencies/external libraries that you could easily get using pip for instance would have to be re-done. Nothing impossible with a small batch script, even if you don't have internet, but you would have to get hold of all the .whl files.
the full treatment, portable-style
But if you cannot you can create a "portable" version of python like this:
zip the contents of C:\python27 to an USB key
copy all python DLLS: copy C:\windows\system32\py*DLL K: (if K is your usb drive)
unzip the contents of the archive somewhere on the second machine
add the DLLs directly in the python27 directory.
(those DLLs were installed in the windows system in previous Python versions, now it's even simpler since they are natively installed in the python directory)
The advantage of this method is that it can be automated to be performed on several machines.
There are some disadvantages too:
python is not seen as "installed" in the registry, so no "uninstall" is proposed. It's a portable install
associations with .py and .pyw are not done. But you can do it manually by altering some registry keys.
another method, better
You can have best of both worlds like this:
perform a basic install of python on the second machine
overwrite the install with the zip file
=> you get the registered install + the associations + the PATH... I would recommend that last method.
Last partial method, maybe best matching your question
Try copying the Lib directory only. It's where the libraries are installed. I'm not 100% sure but it worked for me when I wanted to put wx on a python install lacking wx.
Of course you will copy over already existing files, but they are the same so no problem. I let other people comment if this is acceptable or not. I'm not sure of all the installation mechanism, maybe that will fail in some particular case.
In my case, copy-pasting python installation didn't do the job.
You need to check the "C:\Users\\AppData\Roaming\Python*" folder. You may find installed python modules there. Copy and paste these into your source folder will add these modules to your python.

Where is the source code for gcc-g++ stored on windows when installing through Cygwin?

I installed gcc-g++ through Cygwin on Windows 10. If you've ever used Cygwin on Windows, just before installing, it provides a huge list of different applications that can be used with it. Most of them, in addition to checking their install box, you can also check the source code box. I assumed this meant that it stores the source code of the application so that we can review it in order to understand how it's working.
I checked the box for gcc-g++, and I checked their source code box. However, when looking through the Cygwin installation folder, I can't seem to find where the source code is for the gcc-g++ application.
I was hoping that someone out there knew what folder their source code is stored in when installing through Cygwin to a Windows machine.
Thank you.
all cygwin source packages should be installing under /usr/src.

Resources