手機 - Nokia N900 - Debian - Build Kernel 5.3.0



步驟如下:

$ cd
$ sudo apt-get install gcc-arm*

$ wget https://github.com/steward-fu/website/releases/download/n900/src_kernel_5.3.0.tar.gz
$ tar xvf src_kernel_5.3.0.tar.gz
$ cd kernel
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make rx51_defconfig
$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make zImage modules dtbs -j4
    /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x20): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
    collect2: error: ld returned 1 exit status
    make[1]: *** [scripts/Makefile.host:99: scripts/dtc/dtc] Error 1
    make: *** [Makefile:1279: scripts_dtc] Error 2
    make: *** Waiting for unfinished jobs....

$ vim scripts/dtc/dtc-lexer.lex.c
    614 extern YYLTYPE yylloc;

$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- make zImage modules dtbs -j4

$ cat arch/arm/boot/zImage arch/arm/boot/dts/omap3-n900.dtb > new
$ mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n uImage -d new uImage