Platform: Jetpack 5.1.1 for the AGXI
Hello,I’m trying to modify the recovery kernel and dtb. In DeveloperGuide, we can find how to compile the normal kernel and dtb. But there is no reference about how to generate recovery kernel and dtb. I also want to know the real name of ‘RECFILE’.
Hi, KevinFFF:
Do you know where I can find the source code of l4t_initrd.img or initrd? I mean the busybox code or buildroot code. I have known that how to modify the initrd .
but I want to add some other tools into initrd , such as ‘lsmod’, ‘insmod’ and ‘rmmod’. and also I want to add some driver.ko into initrd.
I have tried to use busybox or buildroot to rebuild a roofs.cpio. but there are always some problem during the building process. so if I can find the source code that build initrd. it would be more easier for me to add driver into initrd.
The problem has been solved.
After trying a lot of way and solving problem one by one . I can use the rootfs.cpio that built with busybox or buildroot. Now it is convenient to add utils into the rootfs.
To build roofs.cpio with busybox or buildroot, there is a key step that is to add ‘init’ in the directory ‘/’ .
Don’t copy the init file in the l4t_initrd.img to ‘/’, it will cause kernel panic.
Don’t copy the init file in the l4t_initrd.img to ‘/’, it will cause kernel panic.
Don’t copy the init file in the l4t_initrd.img to ‘/’, it will cause kernel panic.
The right way is create a soft link of ‘sbin/init’ to ‘/init’.
In the directory ‘/’ , execute the follow command:
Trivia: For a few years now on Ubuntu init is a symbolic link to systemd. You can also put a statically linked bash in with an argument of what to start executing (via symbolic link as init), which is typical of an initrd, but not typical of an o/s other than perhaps if panic is detected and you go into a rescue mode.