This shows you the differences between two versions of the page.
lkd:res:linux [2024/07/07 11:00] daniel.baluta created |
lkd:res:linux [2024/07/09 10:42] (current) daniel.baluta |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Linux physical machine ===== | ===== Linux physical machine ===== | ||
- | If you have Linux native running on your phyiscal machine then you need the following repos in order to start: | + | === Packages to install === |
<code bash> | <code bash> | ||
+ | sudo apt-get install gcc-aarch64-linux-gnu | ||
+ | sudo apt-get install flex bison | ||
+ | sudo apt-get install minicom | ||
+ | sudo apt-get install openssh-server | ||
+ | sudo apt install vim | ||
+ | sudo apt install tmux | ||
+ | sudo apt install git | ||
+ | sudo apt install device-tree-compiler | ||
+ | |||
+ | #also download uuu binary and add it to PATH | ||
+ | https://github.com/nxp-imx/mfgtools/releases/download/uuu_1.5.182/uuu | ||
+ | </code> | ||
+ | |||
+ | === Directories hierarchy === | ||
+ | |||
+ | Clone all the repos inside ''~/work'' directory. | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | $ mkdir ~/work | ||
+ | $ cd ~/work | ||
+ | |||
+ | </code> | ||
+ | |||
+ | 1. Clone the Linux kernel | ||
+ | |||
+ | <code bash> | ||
+ | $ cd ~/work/ | ||
$ git clone --depth 1 https://github.com/LaurentiuM1234/nss-linux | $ git clone --depth 1 https://github.com/LaurentiuM1234/nss-linux | ||
- | $ git clone https://github.com/LaurentiuM1234/nss-utils | ||
</code> | </code> | ||
+ | |||
+ | 2. Clone the images repo | ||
+ | |||
+ | <code bash> | ||
+ | $ git clone https://github.com/dbaluta/images.git | ||
+ | |||
+ | </code> | ||
+ | |||
+ | 3. Download rootfs | ||
+ | |||
+ | Download rootfs file from this [[https://drive.google.com/drive/folders/1GHlULHBJqTx_KJvNW53EUuG5UJTy-w14 | location ]] and copy it inside ''~/work/images/'' | ||
+ | |||
+ | 4. Clone the scripts repo | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | $ cd ~/work/ | ||
+ | $ git clone https://github.com/dbaluta/scripts.git | ||
+ | |||
+ | </code> | ||
+ | |||
+ | IMPORTANT: Edit the '''uuu_script''' so that you replace all patch containing ''/home/student'' with your actual $HOME directory. | ||
+ | |||
+ | At the end you should have the following files hierarchy: | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | ├── nss-linux # Linux kernel source code | ||
+ | ├── images # prebuild binaries | ||
+ | │ ├── flash.bin | ||
+ | │ ├── Image | ||
+ | │ ├── imx8mq-pico-pi.dtb | ||
+ | │ └── rootfs.ext2 | ||
+ | └── scripts # several scripts to help with compilation and booting | ||
+ | ├── modules_install.sh | ||
+ | ├── setenv.sh | ||
+ | ├── uuu | ||
+ | └── uuu_script | ||
+ | </code> | ||
+ |