[WIP] Mainline Buildroot

Hello,

I’m trying to port the mainline buildroot on Khadas VIM, and may be in the future be available in the official repository
It automatically generate an minimalist linux image bootable from a SD card.

Linux version : 3.14.29
Uboot : v2015.01

How to :

# git clone https://github.com/thauti/buildroot-kvim

Use the template
# make kvim_defconfig

Customize your image
# make menuconfig

Build
# make

You should have a sdcard.img file in /output/images
Copy the bootable “sdcard.img” into a microSD card:

sudo dd if=output/images/sdcard.img of=/dev/sdX bs=8M

Currently you need to use the serial/uart to get the console.

Status

Working:

  • Bootable

Not tested:

  • Ethernet
  • Wifi

Not working:

  • HDMI/Mali (the framebuffer is available)

Please feel free to test it and contribute

4 Likes

Hi @Ticc0,

Maybe you could use Linux 4.19 and U-boot 2018.11 since they support the Khadas Vim and Khadas Vim2, no ?

3 Likes

Great work.
I am waiting for my vim1 to arrive so i can test it.
Any update on this though?

Would be interested in knowing how you built this so i can try one of my own

I have tested this project, but I have entered in Linux:

BL2 Built : 20:32:17, Sep 8 2017.
gxl g6296b83 - xiaobo.gu@droid12

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
aml log : SIG CHK : 191 for address 0x01700000
reset…
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 213966

BL2 Built : 20:32:17, Sep 8 2017.
gxl g6296b83 - xiaobo.gu@droid12

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
aml log : SIG CHK : 191 for address 0x01700000
reset…
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 211566

BL2 Built : 20:32:17, Sep 8 2017.
gxl g6296b83 - xiaobo.gu@droid12

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
aml log : SIG CHK : 191 for address 0x01700000
reset…
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 213656

BL2 Built : 20:32:17, Sep 8 2017.
gxl g6296b83 - xiaobo.gu@droid12

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
aml log : SIG CHK : 191 for address 0x01700000
reset…
GXL:BL1:9ac50e:a1974b;FEAT:ADFC318C;POC:3;RCY:0;EMMC:0;READ:0;CHK:AA;SD:0;READ:0;0.0;CHK:0;
no sdio debug board detected
TE: 211242

BL2 Built : 20:32:17, Sep 8 2017.
gxl g6296b83 - xiaobo.gu@droid12

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from SD, src: 0x0000c200, des: 0x01400000, size: 0x00004000
aml log : SIG CHK : 191 for address 0x01700000
reset…

Would somebody give some hints?

Weird, it doesn’t seems to boot anything
Sorry, I have no more enough time to work on the project :confused:

EDIT: Maybe you don’t have uboot tools installed:

sudo apt-get install u-boot-tools

maybe you can check this post

He might be able to help you as he built the kvim1 kernel from mainline kernel