Public Repository

Last pushed: 4 months ago
Short Description
System development envrionment using docker base on ubuntu-16.04
Full Description

About US

Main Page:
Official Website:

Quick Start

If you have any problem, you can feel free comment.
Or leave your chat contact skype/wechat/qq etc... on comment.


Have two users, root and user.
user name: root, password: <empty>
user name: user, password: 123

prepare the envrionment

  1. install docker
  2. sudo docker pull ft2team/ubuntu_dev
  3. mkdir work // create your workspace

linux kernel study

---> build
sudo docker run -v /absulote/path/to/work:/home/user/work -it ft2team/ubuntu_dev:latest su - user
cd work/kern4.1_arm64_env/linux-4.1.16
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=../out user_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=../out -j4 Image

---> run
cd ..
$qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel out/arch/arm64/boot/Image --append "console=ttyAMA0"

---> online debug using gdb

$ip addr # remember the following ip address:
inet scope global eth0

$qemu-system-aarch64 -machine virt -cpu cortex-a57 -machine type=virt -nographic -smp 1 -m 2048 -kernel out/arch/arm64/boot/Image --append "console=ttyAMA0" -s -S

---> start another console type the following commands

$sudo docker run -v /absulote/path/to/work:/home/user/work -it ft2team/ubuntu_dev:latest su - user
$cd work/kern4.1_arm64_env/
// start gdb and load vmlinux
$ aarch64-linux-gnu-gdb
(gdb) file out/vmlinux
Reading symbols from /media/disk2/03study/kern4.1_arm64_env/out/vmlinux...done.

(gdb) directory linux-4.1.16/
// read source code
Source directories searched: /media/disk2/03study/kern4.1_arm64_env/linux-4.1.16:cdir:cwd

(gdb) target remote # using the ip address which you remembered.
// access qemu guest
Remote debugging using localhost:1234
0x0000000040000000 in ?? ()

(gdb) break start_kernel
Breakpoint 2 at 0xffffffc0007ed5d8: file /media/disk2/03study/kern4.1_arm64_env/linux-4.1.16/init/main.c, line 493.
(gdb) c

Breakpoint 2, start_kernel () at /media/disk2/03study/kern4.1_arm64_env/linux-4.1.16/init/main.c:493
493 {
(gdb) list
488 vmalloc_init();
489 ioremap_huge_init();
490 }

(gdb) s
502 set_task_stack_end_magic(&init_task);
(gdb) info r
x0 0x34d5d91d 886429981
x1 0x40b68000 1085702144
x2 0x40 64
x3 0x3f 63
x4 0xffffffc000ac7000 -274866606080
x5 0xffffffc00081f000 -274869391360
x6 0xffffffc000aca000 -274866593792
x7 0xffffffc000b624a8 -274865970008
x8 0x0 0
x9 0x1124 4388
x10 0x34b5193519 226376627481
x11 0x0 0
x12 0x0 0
x13 0x16 22
x14 0x0 0

dmesg log have no timestamp
echo Y > /sys/module/printk/parameters/time

Docker Pull Command

Comments (0)