mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
failing arm attempt
This commit is contained in:
@@ -9,7 +9,14 @@ KERNEL_MODULE_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)
|
|||||||
KERNEL_MODULE_SITE_METHOD = local
|
KERNEL_MODULE_SITE_METHOD = local
|
||||||
|
|
||||||
define KERNEL_MODULE_BUILD_CMDS
|
define KERNEL_MODULE_BUILD_CMDS
|
||||||
$(MAKE) -C '$(@D)' LINUX_DIR='$(LINUX_DIR)' PWD='$(@D)' CC='$(TARGET_CC)' LD='$(TARGET_LD)'
|
$(MAKE) \
|
||||||
|
-C '$(@D)' \
|
||||||
|
ARCH='$(KERNEL_ARCH)' \
|
||||||
|
CC='$(TARGET_CC)' \
|
||||||
|
CROSS_COMPILE='$(TARGET_CROSS)' \
|
||||||
|
LD='$(TARGET_LD)' \
|
||||||
|
LINUX_DIR='$(LINUX_DIR)' \
|
||||||
|
PWD='$(@D)'
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define KERNEL_MODULE_INSTALL_TARGET_CMDS
|
define KERNEL_MODULE_INSTALL_TARGET_CMDS
|
||||||
|
|||||||
3
run
3
run
@@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
cd buildroot
|
cd buildroot
|
||||||
make BR2_EXTERNAL="$(pwd)/../kernel_module" qemu_x86_64_defconfig
|
#make BR2_EXTERNAL="$(pwd)/../kernel_module" qemu_x86_64_defconfig
|
||||||
|
make BR2_EXTERNAL="$(pwd)/../kernel_module" qemu_arm_vexpress_defconfig
|
||||||
# Can't get rid of this for now.
|
# Can't get rid of this for now.
|
||||||
# http://stackoverflow.com/questions/44078245/is-it-possible-to-use-config-fragments-with-buildroots-config
|
# http://stackoverflow.com/questions/44078245/is-it-possible-to-use-config-fragments-with-buildroots-config
|
||||||
cat ../buildroot_config_fragment >> .config
|
cat ../buildroot_config_fragment >> .config
|
||||||
|
|||||||
37
runqemu
37
runqemu
@@ -23,18 +23,33 @@ done
|
|||||||
|
|
||||||
# If we turn on buildroot host QEMU some day.
|
# If we turn on buildroot host QEMU some day.
|
||||||
#cmd="./buildroot/output/host/usr/bin/qemu-system-x86_64 \
|
#cmd="./buildroot/output/host/usr/bin/qemu-system-x86_64 \
|
||||||
cmd="qemu-system-x86_64 \
|
#cmd="qemu-system-x86_64 \
|
||||||
-M pc \
|
#-M pc \
|
||||||
-append 'root=/dev/vda $extra_append' \
|
#-net nic,model=virtio \
|
||||||
-drive file=buildroot/output/images/rootfs.ext2,if=virtio,format=raw \
|
#-kernel buildroot/output/images/bzImage \
|
||||||
-kernel buildroot/output/images/bzImage \
|
#cmd="qemu-system-arm \
|
||||||
-m 128M \
|
#-M vexpress-a9 \
|
||||||
-net nic,model=virtio \
|
#-append 'root=/dev/vda $extra_append' \
|
||||||
-net user \
|
#-drive file=buildroot/output/images/rootfs.ext2,if=virtio,format=raw \
|
||||||
-smp 1 \
|
#-kernel buildroot/output/images/zImage \
|
||||||
$extra_flags \
|
#-m 128M \
|
||||||
|
#-net user \
|
||||||
|
#-smp 1 \
|
||||||
|
#$extra_flags \
|
||||||
|
#;
|
||||||
|
#"
|
||||||
|
|
||||||
|
# TODO window opens, but hangs.
|
||||||
|
qemu-system-arm \
|
||||||
|
-M vexpress-a9 \
|
||||||
|
-kernel buildroot/output/images/zImage \
|
||||||
|
-dtb buildroot/output/images/vexpress-v2p-ca9.dtb \
|
||||||
|
-drive file=buildroot/output/images/rootfs.ext2,if=scsi,format=raw \
|
||||||
|
-append "root=/dev/sda console=ttyAMA0,115200" \
|
||||||
|
-serial stdio \
|
||||||
;
|
;
|
||||||
"
|
#-net nic,model=rtl8139 \
|
||||||
|
#-net user \
|
||||||
|
|
||||||
if $debug && ! $nographic; then
|
if $debug && ! $nographic; then
|
||||||
eval nohup "$cmd" &>/dev/null &
|
eval nohup "$cmd" &>/dev/null &
|
||||||
|
|||||||
Reference in New Issue
Block a user