mirror of
https://github.com/zephyrproject-rtos/zephyr.git
synced 2025-11-14 08:49:08 +01:00
Page:
Boot Zephyr from SYSLINUX
Pages
2019 GSoC Project Ideas
2021 GSoC Project Ideas
2021 Zephyr Developer Summit
ARM Architecture CI Test Strategy
Architecture Working Group
Bluetooth Working Group
Board Testing Introduction
Boot Zephyr from SYSLINUX
CFP Calendar
Change Control and Backports to stable branches
Continuous Integration
Dashboards
Documenting Code for Traceability
Filters
Git Tips
Google Season of Docs
Home
Marketing Committee
Meetup and Event Resources
Merge List MOTD
Moving ext components to dedicated repos
Networking Working Group
Process Working Group
Program Management
Projects Based on Zephyr
Release Engineering Process and Merge Queue Management
Release Management
Release Working Group
Repeatable Builds by Architecture
Safety Committee
Safety FAQ
Safety Working Group
Security Best Practices
Security Committee
Security Response Rotation
Security Working Group
Sensors Working Group
TSC Voting Process
Technical Steering Committee (TSC)
Testing Working Group
Toolchain Working Group
Truck Factor
Working Group Elections 2024
Working Group Elections
Zephyr Committee and Working Groups
Zephyr Group Calendars
[HOW TO] Generate a binary footprint for a basic Zephyr application
[HOW TO] Generate benchmarks metrics
No results
1
Boot Zephyr from SYSLINUX
chiachuanwu edited this page 2019-05-02 15:32:41 +08:00
-
Setup the virtual disk
$ dd if=/dev/zero of=disk.img bs=$((1024 * 1024)) count=100 $ parted -s disk.img mktable msdos mkpart primary 0 100% toggle 1 boot $ sudo losetup --show -Pf disk.img /dev/loopX$ sudo chown $LOGNAME:$LOGNAME /dev/loopX* $lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loopX 7:0 0 100M 0 loop └─loopXp1 259:6 0 100M 0 loop $ mkfs.fat -F32 /dev/loopXp1 $ sudo mount -o uid=$(id -u) /dev/loopXp1 /mnt- /dev/loopX , X can be 1,2,3,4, for this case /dev/loop5 .
-
Install SYSLINUX on the drive.
$ sudo extlinux --device /dev/loopXp1 -i /mnt -
Build Zephyr for QEMU.
$ git clone http://github.com/zephyrproject-rtos/zephyr.git $ source zephyr-env.sh $ cmake -DBOARD=qemu_x86 -H$ZEPHYR_BASE/tests/kernel/fifo/fifo_timeout/ -Bbuild-x86-f $ make -C build-x86-f $ cp build-x86-f/zephyr/zephyr.elf /mnt -
Create the SYSLINUX config.
$ tee <<EOF > /mnt/syslinux.cfg timeout 0 prompt 0 default zephyr LABEL zephyr kernel elf.c32 append zephyr.elf -
Run QEMU on the disk.
$ /opt/zephyr-sdk-0.9.5/sysroots/x86_64-pokysdk-linux/usr/bin/qemu-system-i386 \ -m 1024 -cpu qemu32,+nx,+pae \ -enable-kvm \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \ -clock dynticks -no-acpi -balloon none \ -L /usr/share/qemu -bios bios.bin \ -machine type=pc-0.14 \ -serial stdio \ -hda disk.img$ vncviewer 127.0.0.1:5900
© 2018-2023 Zephyr® Project. Zephyr is a trademark of the Linux Foundation.
Zephyr Project Home | Documentation Home | Mailing lists
Zephyr Project Home | Documentation Home | Mailing lists