File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+
3
+ IMG=ext4.img
4
+ KERNEL_VER=$( git -C linux/ tag | sed " s/^v//" )
5
+ SRC=linux/out/lib/modules/$KERNEL_VER
6
+ DEST=rootfs/lib/modules/$KERNEL_VER
7
+
8
+ # Add path of kernel modules to load with dependency file, for example:
9
+ # FILES='kernel/drivers/gpu/drm/drm.ko
10
+ # modules.dep'
11
+ FILES=' '
12
+
13
+ mkdir -p rootfs
14
+
15
+ for file in $FILES ; do
16
+ mkdir -p ` dirname $DEST /$file `
17
+ cp -f $SRC /$file $DEST /$file
18
+ done
19
+
20
+ cp -r libepoxy_out/* rootfs
21
+ cp -r virglrenderer_out/* rootfs
22
+ cp -r directfb/* rootfs
23
+ cp target/run.sh rootfs
24
+
25
+ # DirectFB-example requires ~60MiB of space
26
+ dd if=/dev/zero of=${IMG} bs=4k count=20000
27
+ mkfs.ext4 -F ${IMG} -d rootfs
28
+
29
+ rm -rf rootfs
30
+
31
+ # show image size
32
+ du -h ${IMG}
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+
3
+ # Install kernel modules
4
+ if [ -d " /lib/modules/" ]; then
5
+ mkdir -p /lib/modules/
6
+ cp -r ./lib/modules/* /lib/modules/
7
+ fi
8
+
9
+ # Install DirectFB and examples
10
+ cp -r ./usr/local /usr/
11
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH :/usr/local/lib
12
+ export PATH=$PATH :/usr/local/bin/
13
+
14
+ # Load kernel modules if exist
15
+ # modprobe virtio-gpu
You can’t perform that action at this time.
0 commit comments