modding kernel and integrate new drivers on embedded linux

No replies
blackbox
Offline
Neophyte
Joined: 2016/10/27

Hello everyone:

I will try to explain what I want to learn, so that the members of the forum can guide me or help.

I have a linux firmware for embedded systems and decompiled arm. These firmwares have are based on Uboot and have the following sectors:

Uboot
Bootscrip or environment variables (multimage)
Kernel (multimage)
Filesystem (squash)

Here is the binwalk logs:

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             uImage header, header size: 64 bytes, header CRC: 0x6286BBA8, created: Sat Oct 17 10:38:27 2015, image size: 3626 bytes, Data Address: 0x0, Entry Point: 0x0, data CRC: 0x855DE3C0, OS: Linux, CPU: PowerPC, image type: Script file, compression type: none, image name: "blackbox"
4168          0x1048          uImage header, header size: 64 bytes, header CRC: 0x269041E0, created: Sat Oct 17 10:38:26 2015, image size: 653852 bytes, Data Address: 0x80A00000, Entry Point: 0x80A00000, data CRC: 0x95EFE929, OS: Linux, CPU: ARM, image type: OS Kernel Image, compression type: none, image name: "blackbox"
720896        0xB0000         Squashfs filesystem, big endian, lzma signature, version 3.1, size: 2555163 bytes,  590 inodes, blocksize: 131072 bytes, created: Sat Oct 17 10:38:26 2015

I want to integrate some drivers into the kernel, but how do I do this?
How do I modify and integrate the new drivers?

I read mkimage, but I do not understand how you should modify both the kernel and the FS folder
I can remove 64bytes of header size, but I do not know how I have to manipulate the file since it is Uimage but it is also squashfile