also empty…${pwd} is also empty
frank@frank-N56VZ:/media/data_ext/buildroot/frank-w-initramfs
[16:34:04]$ make linux-modules
# TODO: build linux modules and install to ./output/rootfs
kerneldir=../../bpi-r2-kernel/github
#INSTALL_MOD_PATH=/output/rootfs/lib/modules
make -C modules_install INSTALL_MOD_PATH=/output/rootfs/
make[1]: *** modules_install: No such file or directory. Stop.
Makefile:13: recipe for target 'linux-modules' failed
make: *** [linux-modules] Error 2
kerneldir should be set outside the rule…i moved that line to top and this gets evaluated…but not the targetdir (${pwd})
make -C ${kerneldir} modules_install INSTALL_MOD_PATH=$(shell pwd)/output/rootfs/
seems to be the right way
ls output/rootfs/lib/modules/
4.19.0-rc1-bpi-r2-hdmiv5
can i call genfs.sh after install the modules? it seems it’s only working from the makefile, but this downloads busybox again
i have modified make file this way:
12 all: busybox initramfs
13 #output/initramfs.cpio
14
15 linux-modules:
16 # TODO: build linux modules and install to ./output/rootfs
17 #INSTALL_MOD_PATH=${pwd}/output/rootfs/lib/modules
18 make -C ${kerneldir} modules_install INSTALL_MOD_PATH=$(shell pwd)/output/rootfs/
19 .PHONY: busybox
20 busybox:
21 wget https://busybox.net/downloads/${BUSYBOX}.tar.bz2
22 tar xjf ${BUSYBOX}.tar.bz2
23 $(MAKE) -C ${BUSYBOX} defconfig
24 $(MAKE) -C ${BUSYBOX} CONFIG_PREFIX=$(realpath .)/output/rootfs install
25 rsync -ua rootfs-overlay/* output/rootfs
26
27 output/initramfs.cpio: busybox #TODO-enable-linux-modules
28 fakeroot /bin/sh genfs.sh $(SYSROOT) output/rootfs
29
30 initramfs:
31 fakeroot /bin/sh genfs.sh $(SYSROOT) output/rootfs
and run “make initramfs”
ls -lh output/initramfs.cpio
-rw-r--r-- 1 frank frank 142M Oct 8 16:59 output/initramfs.cpio
how large can be the cpio-file to get loaded by kernel? mhm…tftp seems to stop while loading (after 2000 #-chars)
kernel with initramfs is 64 MB (cpio gzipped by makefile)
i load kernel via
tftp 0x80200000 ${bootfile};bootm
using dnsmasq as tftp-server and tested also a 45MB-Kernel…same result
seems that dnsmasq-option tftp-no-blocksize results in loading more data (many more #-chars)…but also hang after a while…kernel doesn’t got loaded, i think i need to choose which modules are included and which don’t
details
476K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/ata
240K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/dma
332K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/dsa
7.6M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/wireless/mediatek/mt76
7.6M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/wireless/mediatek
7.6M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/wireless
288K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/phy
932K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/ppp
612K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/ipvlan
268K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net/slip
11M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/net
172K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/i2c
128K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/iio/adc
132K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/iio
152K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/input/keyboard
156K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/input
400K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/spi
788K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/thermal
120K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers/pwm
14M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/drivers
224K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/lib
1.2M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/crypto
20M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/xfs
672K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/nfs/filelayout
776K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/nfs/flexfilelayout
18M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/nfs
9.2M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/cifs
160K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/fat
304K output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/nfs_common
6.8M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/nfsd
1.5M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/fuse
3.7M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/lockd
2.1M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs/ntfs
62M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel/fs
76M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/kernel
76M output/rootfs/lib/modules/4.19.0-rc1-bpi-r2-hdmiv5/
also 37MB-Kernel does not get loaded ;(