XUANTIE-RV / buildroot

Buildroot customized for Xuantie™ RISC-V CPU
Apache License 2.0
38 stars 7 forks source link

Unable to build boot.ext4 as per instructions #1

Open archanox opened 2 years ago

archanox commented 2 years ago

I have followed the instructions on the read me and cloned from https://github.com/T-head-Semi/buildroot.git and after running make CONF=thead_9xxf_enhanced_5.10_glibc_br_defconfig i get plenty of error: ‘_STAT_VER’ undeclared messages.

guoren83 commented 2 years ago

https://gitlab.com/c-sky/buildroot/-/jobs/1779407686

we have tested on the gitlab CI cloud, try Docker executor with image guoren83/ubuntu-16.04-buildroot:v1

On Wed, Dec 22, 2021 at 9:50 AM Pierce Andjelkovic @.***> wrote:

I have followed the instructions on the read me and cloned from https://github.com/T-head-Semi/buildroot.git and after running make CONF=thead_9xxf_enhanced_5.10_glibc_br_defconfig i get plenty of error: ‘_STAT_VER’ undeclared messages.

— Reply to this email directly, view it on GitHub https://github.com/T-head-Semi/buildroot/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETCFKYOH2IHWWB2HOCUMZLUSEVHLANCNFSM5KRO3HBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Best Regards Guo Ren

ML: https://lore.kernel.org/linux-csky/

archanox commented 2 years ago

Thank you for the link to the build artifacts. I've flashed them as per the instructions in this readme, but all I get over the USBC UART is

U-Boot SPL 2020.01-g58f105ce8f-dirty (May 17 2021 - 13:40:43 +0800)
Trying to boot from MMC1

U-Boot 2020.01-g58f105ce8f-dirty (May 17 2021 - 13:40:43 +0800)

CPU:   rv64imafdcvsu
Model: T-HEAD c910 ice
DRAM:  4 GiB
CPU freq: 1200MHz
DDR freq: 1600MT
AXI freq: 500MHz
AHB freq: 250MHz
GPU freq: 500MHz
MMC:   mmc0@3fffb0000: 0
Loading Environment from MMC... OK
In:    serial@3fff73400
Out:   serial@3fff73400
Err:   serial@3fff73400
Net:   eth0: ethernet@3fffc0000
Hit any key to stop autoboot:  0
81816 bytes read in 15 ms (5.2 MiB/s)
7569 bytes read in 3 ms (2.4 MiB/s)
18299968 bytes read in 2914 ms (6 MiB/s)
## Booting kernel from Legacy Image at 00200000 ...
   Image Name:   Linux
   Image Type:   RISC-V Linux Kernel Image (uncompressed)
   Data Size:    18299904 Bytes = 17.5 MiB
   Load Address: 00200000
   Entry Point:  00200000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 40000000
   Booting using the fdt blob at 0x40000000
   Loading Kernel Image
   Using Device Tree in place at 0000000040000000, end 0000000040004d90

Starting kernel ...

with nothing on screen either on the ICE-RVB LCD

I've also tried the debian images from https://mirrors.aliyun.com/thead/images/riscv64-ice/ and I do get an image of a login screen with the wrong orientation, and seemingly no way of interacting with the screen.

image

Do you have any advice?

archanox commented 2 years ago

My feeling is that there's something up with earlyprintk not working, or going somewhere it shouldn't be. I followed the directions here for build root to reset the env variables and set up the partitions.

T-HEAD# printenv
arch=riscv
avail_addr=0x10000000
baudrate=115200
board=ice-c910
board_name=ice-c910
boot_vector=0
bootcmd=run bootcmd_load; run finduuid; run set_bootargs; bootm $kernel_addr - $dtb_addr
bootcmd_load=ext4load mmc 0:2 $opensbi_addr fw_jump.bin; ext4load mmc 0:2 $dtb_addr ice.dtb; ext4load mmc 0:2 $kernel_addr uImage
bootdelay=2
console_port=console=ttyS1,115200
cpu=c9xx
dtb_addr=0x40000000
ethaddr=00:a0:a0:a0:a0:a1
fdt_high=0xffffffffffffffff
fdtcontroladdr=fffe4d30
finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid
ipaddr=10.42.0.100
kernel_addr=0x00200000
mmcdev=0
mmcpart=3
netmask=255.255.255.0
opensbi_addr=0x0
partitions=name=table,size=2031KB;name=boot,size=60MiB,type=boot;name=root,size=-,type=linux,uuid=80a5a8e9-c744-491a-93c1-4f4194fd690b
set_bootargs=setenv bootargs $console_port root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlyprintk clk_ignore_unused loglevel=7 c910_mmu_v1 eth=$ethaddr
stderr=serial@3fff73400
stdin=serial@3fff73400
stdout=serial@3fff73400
uuid_rootfs=80a5a8e9-c744-491a-93c1-4f4194fd690b
vendor=thead

Environment size: 1065/131068 bytes
T-HEAD# 

Perhaps you can see something wrong here?

guoren83 commented 2 years ago

https://github.com/T-head-Semi/linux/commit/7c872c974933275e83f0abee65327eef081b16d5

See here, we fix up an early console problem.

On Thu, Dec 23, 2021 at 2:25 AM Pierce Andjelkovic @.***> wrote:

My feeling is that there's something up with earlyprintk not working, or going somewhere it shouldn't be. I followed the directions here for build root to reset the env variables and set up the partitions.

T-HEAD# printenv arch=riscv avail_addr=0x10000000 baudrate=115200 board=ice-c910 board_name=ice-c910 boot_vector=0 bootcmd=run bootcmd_load; run finduuid; run set_bootargs; bootm $kernel_addr - $dtb_addr bootcmd_load=ext4load mmc 0:2 $opensbi_addr fw_jump.bin; ext4load mmc 0:2 $dtb_addr ice.dtb; ext4load mmc 0:2 $kernel_addr uImage bootdelay=2 console_port=console=ttyS1,115200 cpu=c9xx dtb_addr=0x40000000 ethaddr=00:a0:a0:a0:a0:a1 fdt_high=0xffffffffffffffff fdtcontroladdr=fffe4d30 finduuid=part uuid mmc ${mmcdev}:${mmcpart} uuid ipaddr=10.42.0.100 kernel_addr=0x00200000 mmcdev=0 mmcpart=3 netmask=255.255.255.0 opensbi_addr=0x0 partitions=name=table,size=2031KB;name=boot,size=60MiB,type=boot;name=root,size=-,type=linux,uuid=80a5a8e9-c744-491a-93c1-4f4194fd690b set_bootargs=setenv bootargs $console_port root=PARTUUID=${uuid} rootfstype=ext4 rdinit=/sbin/init rootwait rw earlyprintk clk_ignore_unused loglevel=7 c910_mmu_v1 eth=$ethaddr @. @. @.*** uuid_rootfs=80a5a8e9-c744-491a-93c1-4f4194fd690b vendor=thead

Environment size: 1065/131068 bytes T-HEAD#

Perhaps you can see something wrong here?

— Reply to this email directly, view it on GitHub https://github.com/T-head-Semi/buildroot/issues/1#issuecomment-999778884, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETCFKZXLNCZCQKIXLYFWE3USIJY5ANCNFSM5KRO3HBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

-- Best Regards Guo Ren

ML: https://lore.kernel.org/linux-csky/

archanox commented 2 years ago

Are there any pre-built Debian images that would have that fix you described? Currently I've tried https://gitee.com/thead-linux/ice_images and https://mirrors.aliyun.com/thead/images/riscv64-ice/ with no luck.

archanox commented 2 years ago

I've flashed the boot.ext4 and rootfs.ext2 images to my ICE-RVB from the artifacts here https://gitlab.com/c-sky/buildroot/-/jobs/1779407686 which is the 9xxf_5.10_glibc_enhanced job triggered by the package/hw-c910: Add ice2 board commit, there still is no output after Starting kernel ... over the USBC UART.

Is there something I'm missing @guoren83 ?

guoren83 commented 2 years ago

Buildroot is not suitable for ICE-RVB, please follow https://yoc.docs.t-head.cn/icebook

On Wed, Dec 29, 2021 at 7:33 AM Pierce Andjelkovic @.***> wrote:

I've flashed the boot.ext4 and rootfs.ext2 images to my ICE-RVB from the artifacts here https://gitlab.com/c-sky/buildroot/-/jobs/1779407686 which is the 9xxf_5.10_glibc_enhanced job triggered by the package/hw-c910: Add ice2 board commit, there still is no output after Starting kernel ... over the USBC UART.

Is there something I'm missing @guoren83 https://github.com/guoren83 ?

— Reply to this email directly, view it on GitHub https://github.com/T-head-Semi/buildroot/issues/1#issuecomment-1002322066, or unsubscribe https://github.com/notifications/unsubscribe-auth/AETCFK5R7RFRH3M4NB4T5FLUTJCK5ANCNFSM5KRO3HBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

-- Best Regards Guo Ren

ML: https://lore.kernel.org/linux-csky/

archanox commented 2 years ago

Thanks for the link @guoren83 I've checked that the instructions seem to line up for flashing buildroot/debian/android.

I did manage to flash the android boot.ext4 alongside the debian-desktop-rootfs.ext4 and I now have the screen filling the display in a horizontal aspect. Which makes me believe that most of the boot images are for the EVB and not the RVB.

I still am unable to get a console, nor am I able to plug in a mouse or keyboard into the OTG micro usb, nor is the touch input working.

Are you able to advise if I need to build a particular image for the RVB? Or is this something someone at t-head can do?

m0jek commented 2 years ago

I still am unable to get a console, nor am I able to plug in a mouse or keyboard into the OTG micro usb, nor is the touch input working.

Have you had any luck getting Linux working?

I haven't tried yet ... so hoping you have made more progress.

m0jek commented 2 years ago

@archanox if you still need to know, to get serial console on ICE-RVB, what works for me is to connect to the UART0 on the GPIO and set bootargs console = /dev/ttyS0

GPIO pin | Function 13 | GND 15 | UART0_TXD 17 | UART0_RXD 19 | GND

You will then at least have console access to do setup etc ...

archanox commented 2 years ago

@m0jek do you have the pinouts for the RVB-ICE? I know they're not the same board, but I'm cross referencing the pinouts with the VisionFive board and they don't seem to line up with the power/ground/rx/tx signals you described.

I'm using one of these cables image