- Linux Device Driver Development Cookbook
- Rodolfo Giometti
- 324字
- 2021-06-24 13:54:10
Adding Debian files
I decided to use Debian as the target OS since it's my favorite distribution for development (and, when possible, for production) systems:
- To install it, we use QEMU software again, using the following command:
$ sudo qemu-debootstrap \
--arch=arm64 \
--include="sudo,file,openssh-server" \
--exclude="debfoster" \
stretch ./debian-stretch-arm64 http://deb.debian.org/debian
You could see warnings about keyring here; they are harmless and they can be safely ignored:
W: Cannot check Release signature;
W: Cannot check Release signature;
I suppose this is another coffee-break command.
- Once finished, we should find, in debian-stretch-arm64, a clean Debian root filesystem for the ESPRESSObin but, before transferring it into the microSD, we should fix the hostname file contents as shown here:
$ sudo bash -c 'echo espressobin | cat > ./debian-stretch-arm64/etc/hostname'
- Then, we have to add the serial device ttyMV0 to the /etc/securetty file in order to be able to log in as the root user through the serial device, /dev/ttyMV0. Use the following command:
$ sudo bash -c 'echo -e "\n# Marvell serial ports\nttyMV0" | \
cat >> ./debian-stretch-arm64/etc/securetty'
Use man securetty for further information about the root login through a serial connection.
- And, as a last step, we have to set up a root password:
$ sudo chroot debian-stretch-arm64/ passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Here, I used the root string as password for the root user (it is up to you to choose yours).
In order to have further information regarding this usage of the chroot command, you can use the man chroot command or continue reading till the end of this chapter where I'm going to explain a bit better how it works.
Now, we can safely copy all files into our microSD using the following command:
$ sudo cp -a debian-stretch-arm64/* /media/$USER/root/
Here is what the microSD content should look like:
$ ls /media/$USER/root/
bin dev home lost+found mnt proc run srv tmp var
boot etc lib media opt root sbin sys usr
推薦閱讀
- Linux Mint Essentials
- 鴻蒙生態(tài):開(kāi)啟萬(wàn)物互聯(lián)的智慧新時(shí)代
- UNIX操作系統(tǒng)設(shè)計(jì)
- Arch Linux Environment Setup How-to
- Ganglia系統(tǒng)監(jiān)控
- 移動(dòng)應(yīng)用UI設(shè)計(jì)模式(第2版)
- 嵌入式實(shí)時(shí)操作系統(tǒng)μC/OS原理與實(shí)踐
- Dreamweaver CS5.5 Mobile and Web Development with HTML5,CSS3,and jQuery
- AWS Development Essentials
- 細(xì)說(shuō)Linux基礎(chǔ)知識(shí)
- Delphi Programming Projects
- Linux內(nèi)核設(shè)計(jì)的藝術(shù):圖解Linux操作系統(tǒng)架構(gòu)設(shè)計(jì)與實(shí)現(xiàn)原理
- 分布式高可用架構(gòu)之道
- Office 365 User Guide
- Linux操作系統(tǒng)案例教程(第2版)