PacktPublishing / Mastering-Embedded-Linux-Programming-Third-Edition

Mastering Embedded Linux Programming Third Edition, published by Packt
MIT License
532 stars 151 forks source link

Fix QEMU build script for arm config #58

Closed shawnpdoherty closed 1 year ago

shawnpdoherty commented 1 year ago

Build script for QEMU kernel fails on x86 build hosts because ARCH is not set for defconfig

*** Can't find default configuration "arch/x86/configs/versatile_defconfig"!

Set ARCH=arm to keep continuity and pass build.

Signed-off-by: Shawn Doherty shawnpdoherty@pm.me

shawnpdoherty commented 1 year ago

For errata. The section labeled "Building a Kernel for QEMU" passes by the configuration altogether.

"Here is the sequence of commands to build Linux for the ARM Versatile PB that is emulated by QEMU, using the crosstool-NG v5TE compiler:" $ cd linux-stable $ make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- mrproper after clean, we need a .config file here, Instruction goes right to creating boot image, modules, and device tree blobs


$ make -j4 ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- zImage 
$ make -j4 ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- modules 
$ make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- dtbs
fvasquez commented 1 year ago

@shawnpdoherty thank you for your pull request. Your one-line change has been merged.

I will review your errata pertaining to "Building a Kernel for QEMU" and it to the README for this repo if that makes sense.

shawnpdoherty commented 1 year ago

Thanks, yes that's perfect. Sorry to piggyback the errata on that Pull Request, wasn't sure how to get that looked at. Thanks very much