hexdump0815 / linux-mainline-on-arm-chromebooks

running linux mainline on arm chromebooks - for example: samsung xe303c12 and xe503c12 (snow and peach), acer c100, c101 and c201 (veyron speedy, minnie etc. and gru bob and kevin), medion s2013 and s2015 (veyron jaq, mighty etc.), acer cb5 311 (nyan big), lenovo n23, acer r13 (oak elm and hana), lenovo duet (kukui krane) and most probably many many more over time ...
144 stars 10 forks source link

XE503C32 peach pi doesn't boot up on SD or USB #4

Closed bykeat closed 1 year ago

bykeat commented 1 year ago

Bought 2nd hand to try out chromeOS and try to flash to linux. I have tried chromium arnoldthebat, arch Linux, crouton but all hits a dead end where it doesn't recognise the USB or SD card to boot. Hence, I end up here and hope this would work.

At least a small progress for me when it able to boot on USB/SD instead of high pitch beep and return to that default dev screen to ctrl D boot to chromeOS. Unfortunately it doesn't show up and UI or text.

I flashed my USB/SD card on Etcher using bullseye latest version.

I'll try on other flash software or other OS images this weekend to see if I could resolve it.

hexdump0815 commented 1 year ago

@bykeat - the image comes by default with a peach pit u-boot installed - for peach pi you'll have to write the uboot.kpart.cbe-peach-pi file from the extra dir of the /boot partition (3rd partition) to the kernel partition (1st partition) of the image ... i do not have a peach pi (only a peach pit), so it should work with that u-boot written to the kernel partition but i cannot guarantee it ... this should bring you the u-boot boot menu onto the screen where you can (and have to) select peach pi for your system

best wishes, good luck and please let me know if you get it working - hexdump

bykeat commented 1 year ago

@hexdump0815 Thanks for your response. But I'm new to this so I'm not sure where to start. I have background on web dev but on kernel is a whoelpe new world to me.

Feed me some link and I'll try to learn from there. Thanks in advance!

hexdump0815 commented 1 year ago

@bykeat - lets see, i'll try to find some time to desribe it in more detail but it might take some days - please let me know if you do not hear from me for too many days :)

RaylynnKnight commented 1 year ago

Your instructions above for booting on Peach Pi are not possible as their is only 1 file in the extra folder of the /boot partition. That file is uboot.kpart.cbe-peach-pit. This is true for both the 220619-02 and 210725-01 releases. I downloaded https://github.com/hexdump0815/u-boot-chainloading-for-arm-chromebooks/releases/download/v2018.11-cbe/uboot.kpart.cbe-peach-pi.gz and uncompressed then wrote to the 1st partition using dd. This worked and the XE503C32 appears to function properly.

RaylynnKnight commented 1 year ago

After some time I realized I was using the 210725-01 release. Performed the same steps on the 220619-02 release and it indeed boots Linux, but then I get a black screen. Waited for over 10 minutes and never got an X desktop. Holding the power button results in seeing linux shutdown so it appears to be a graphics related issue. I'm reverting to the 210725-01 release for now.

RaylynnKnight commented 1 year ago

I must have done something wrong in my initial testing. I started over with the 220619-02 release image. Downloaded https://github.com/hexdump0815/u-boot-chainloading-for-arm-chromebooks/releases/download/v2018.11-cbe/uboot.img.cbe-peach-pi.gz and wrote it to the 1st partition. It is now booting successfully into the X Desktop and I am beginning testing.

bykeat commented 1 year ago

Thanks @RaylynnKnight, I'll try to make my chromebook to work too! I'm new to this so writing partition has to use dd command instead of those image writers in Windows?

RaylynnKnight commented 1 year ago

I don't use Windows, so I'm not aware if there is a tool that can be used to write to the 1st partition of the sd card. Using linux the steps are as follows (assumes your sd card is recognized as mmcblk1): wget https://github.com/hexdump0815/u-boot-chainloading-for-arm-chromebooks/releases/download/v2018.11-cbe/uboot.img.cbe-peach-pi.gz gunzip uboot.img.cbe-peach-pi.gz dd if=uboot.img.cbe-peach-pi.gz of=/dev/mmcblk1p1

You should then eject the sd card and insert into the Chromebook and follow instructions for booting.

bykeat commented 1 year ago

Not sure if I am doing this correctly.

I created 2 partitions using fdisk and followed steps to write into mmcblk1p1 of my SD card and mmcblk1p2 for the chromebook_peach-armv7l-focal.img.gz file.

I'm still getting loud beep at the developer white screen thing after CTRL U.

Do I need to gunzip the img.gz and dd it to partition 2?

hexdump0815 commented 1 year ago

@bykeat - you'll have to write the focal image to thw whole disk and the result should be that you have four partitions on it afterwards - then you need to write the proper u-boot to the first of those partitions

bykeat commented 1 year ago

For update after many retries.

On Chromebook's terminal: I had ensured all partitions in SD card are deleted using fdisk.

  1. dd if=chromebook_peach-arm7l-focal.img of=/dev/mmcblk1 bs=4M conv=fsync
  2. Using lsblk still saw mmcblk1 without partition so I ran fdisk and 4 partitions are there. This step I think not necessary as it would causes the loud beep when ctrl U booting.
  3. dd if=uboot.img.cbe-peach-pi of=/dev/mmcblk1p1
  4. Reboot the chromebook and at the white screen did CTRL + U. Here, observed to get either a loud beep and returned to the white screen or just getting black screen.
  5. Repeated step 1 to 4 with step 3 uses uboot.kpart.cbe-peach-pi. The result at step 4 was successfully booted into Peach-Pi terminal and I'm not sure what to do next as shown in picture below.

Anything I missed out in the steps above please do let me know. Thank you.

Here's the screen I get booting via uboot.kpart.cbe-peach-pi. IMG_20221020_093853.jpg

hexdump0815 commented 1 year ago

@bykeat - some comments:

  1. looks good
  2. sometime the kernel does not yet recognize the new partition table if things get changed "behind the scenes", i.e. via dd directly - best is to remove the sd card after step 1 and reinsert it - then the partitions should be there
  3. looks good (if the partitions are detected properly - otherwise it might not result in what is expected) - just the file is the wrong one as you have noted in 4. - the kpart files are the ones bootable by the chromebook bootloader
  4. expected as it was the wrong u-boot image
  5. at least u-boot starts now - i think nobody yet tested it on peach pi (only peach pit so far), so there might be a problem with u-boot ... could you please run "mmc list" on that prompt and post the result here? another option to try to boot from a usb-stuck instead of an sd card - not sure if it works/is actually supported but might be worth a try (long time ago that i worked on the snow/peach u-boot)

good luck and best wishes - hexdump

bykeat commented 1 year ago

MMC list shows as follows: EXYNOS DWMMC: 0 (eMMC) EXYNOS DWMMC: 1 (SD)

I think based on the previous screenshot there's SCRIPT FAILED after reading file /extlinux/extlinux.conf

hexdump0815 commented 1 year ago

@bykeat - can you please try "sysboot mmc 1:3 any" on the u-boot prompt? and maybe "ls mmc 1:3" in case that does not work ...

bykeat commented 1 year ago

Here it is.

IMG_20221022_173838.jpg

hexdump0815 commented 1 year ago

@bykeat - maybe the full cmd is required (i tested it on snow and there it worked in the short way already) - can you please try: "sysboot mmc 1:3 any ${scriptaddr} extlinux/extlinux.conf" and maybe the value of scriptaddr via printenv would be interesting ...

bykeat commented 1 year ago

scriptaddr returns 0x30000000 invalid filesystem

hexdump0815 commented 1 year ago

@bykeat - can you please try:

setenv scriptaddr 0x50000000
sysboot mmc 1:3 any
bykeat commented 1 year ago

Set and nothing happens.

And I reran "sysboot mmc 1:3 any &{scriptaddr} /extlinux/extlinux.conf" as I noticed we missed out the backward slash in your previous comment regarding this command.

Able to read the file but nothing happens.

Here's the current values on printenv: IMG_20221022_232750.jpg

hexdump0815 commented 1 year ago

ok - will have to think some more about this :)

hexdump0815 commented 1 year ago

@bykeat - can you please do the same as in the last step and then do "run bootcmd_mmc1"?

i meanwhile got my hands on a peach-pi as well and at least gave booting it a try: i flashed the bullseye image from https://github.com/hexdump0815/imagebuilder/releases/tag/220619-02 to an sd card, wrote the proper uboot.img.cbe-peach-pi to the first partition as you described and did it above as well and booted and then selected the peach-pi menu entry and it booted and seems to run just fine - just the audio setup seems to need a bit of tweaking to work it seems ... can you maybe try it as i did from scratch once more to see if it still does not work?

good luck and best wishes - hexdump

bykeat commented 1 year ago

I noticed you are using uboot.img.cbe-peach-pi.

Mines doesn't work unfortunately, getting black screen.

As usual my steps are as follows just in case I missed out anything.

hexdump0815 commented 1 year ago

strange - the steps look right - i think you had it booting already before - right? do you maybe have another sd card to test? older and smaller is usually better for those devices.

bykeat commented 1 year ago

It only boots when I'm using uboot.kpart.cbe-peach-pi. I'm currently using 16GB SD card. Will try to look for 8GB one or some usb drive.

So far I have fried my old usb drive and another 16GB SD card when testing this ;)

I'm thinking another possible issue is I'm using Chromebook terminal to write the SD card. I'm gonna try to get a Ubuntu os to do the disk writing.

bykeat commented 1 year ago

Good news, able to boot in my old Samsung SD card 16GB (previously was using Kingston 16GB bought in year 2021) on uboot.kpart.cbe-peach-pi But what's the default password for the login?

Ok found on Google.

linux/changeme

Thank you so much for your help.

hexdump0815 commented 1 year ago

cool - happy to hear that it worked in the end - as mentioned it can be that sound is not working yet, but i'll look into this and will most probably build newer (linux v6.1 based) kernels and images over the next months ...

best wishes - hexdump