No announcement yet.

Aopen Chromebase Mini with Alpine Linux, Squeezelite and Jivelite

  • Filter
  • Time
  • Show
Clear All
new posts

    G'day, sodface!

    I very much appreciate your willingness to advise me in this situation! Meanwhile, I am considering looking into trying Windows with the programmer, if I can find the PC drivers for the CH341A programmer and a Windows version of flashrom.

    I don't understand the syntax error you are seeing, makes me think the format of your command line is incorrect but I can't tell for sure from your post. Almost looks like the flashrom binary you are using is compiled for a different architecture??
    Indeed -- I believe you've said you've been doing all this with Alpine from the CLI, whereas MrChromebox compiled his version of flashrom for Ubuntu flavors of Linux -- like Mint, which I am using with a full GUI. I figured that if I followed MrChromebox's Ubuntu-inspired syntax, I'd be fine, so I've always typed his programmer identification command verbatim:

    sudo ./flashrom -p ch341a_spi
    (I note that in my earlier message in this thread, I had a typo where I wrote "ch341a_sp1" instead of "ch341a_spi" -- but I have been typing the correct command while using the programmer kit. Sorry for any confusion -- I was just tired last night when I was writing in this thread.)

    As far as Alpine goes, you _should_ be able to boot the extended iso from USB and just use it running out of RAM without installing to disk, so you could do that with a newer machine without much risk of borking your normal OS install.
    True enough, but with a read-only CD as your operating system, you are stuck with whatever was included in the ISO file that you burned to the CD... The Alpine distro ISOs I found don't appear to include flashrom as default software, so I was stuck: unless I could get a full OS install onto a read-write hard drive, I couldn't add your repository or public key to Alpine, nor could I download and install your version (or any other version) of flashrom. The Alpine "live CD" allows me to play around on the CLI, but not much else. I would have preferred a GUI, but of course I couldn't install a display manager or any GUI on a read-only CD. I actually went through the entire "alpine-setup" procedure to get to the full HD install option -- the last step was choosing an appropriate install partition on the target machine, and I must have guessed wrong. I took the first option offered, to install Alpine to "sys" and take up the entire hard drive, but this resulted in an unbootable system on the MacBook. It doesn't even recognize the Alpine CD as bootable anymore! I vaguely recall this is a known risk with these old MacBooks, based on the peculiarities of how they use UEFI boot partitions and Apple authenticity checks. Sigh. I'll try to reinstall Mint on it later, but that's a very low priority for me right now, since I have another laptop with Mint.

    I'm beginning to wonder if CH341A drivers might still be issue with certain Linux flavors? Perhaps Mint is sufficiently abbreviated from full Ubuntu that it simply doesn't recognize the USB programmer when it's plugged in. That might explain the mysterious errors that flashrom gives me whenever I try to use MrChromebox's command to identify if my programmer is properly connected to the AOPEN chip...

    I had hoped that you would have instantly recognized the CLI output in my earlier screenshot as proof of "operator error" on my part. In other words, that such output was the result of me simply not getting the clip to properly contact the AOPEN chip pins. Now I think those weird control characters in the error output are evidence of a very confused machine -- perhaps one that doesn't realize that my CH341A even exists?

    Or is it more likely that I just NEVER have gotten those clip contacts properly aligned after a dozen attempts?


      Themistocles, I haven't read your whole post yet, I'm sitting here with a chromebase mini opened up on the bench and I'm halfway through writing up the procedure using Alpine booted from USB (or CD), so far so good. Will update in a few minutes.

      Here's the first bit I have that covers booting and getting utilities ready, formatting is rough but:

      Boot Alpine 3.14 extended .iso from USB
      Login as root with no password
      # setup-interfaces
      answer the questions - in my case I used my wlan0 interface
      restart networking with: # rc-service networking restart
      you should get an IP address and be able to ping
      add the main alpine repo:
      # echo "" >> /etc/apk/repositories
      add my repository:
      # echo "" >> /etc/apk/repositories
      download and extract my public key:
      # wget
      extract to /etc/apk/keys:
      # tar xzvf sodface-pub-key.tar.gz -C /etc/apk/keys
      run apk update and you should see the main and my sodface repo in the output and not see any errors
      # apk update
      Now add my packages for flashrom and vpd:
      # apk add flashrom-chromium vpd
      You should now have the flashrom and vpd commands available, check:
      # flashrom --help
      # vpd --help
      If you run flashrom now, prior to plugging in the ch341a you'll note an error saying "Programmer initialization failed"
      # flashrom -p ch341a_spi
      Plug in the ch341a usb programmer which should then have a solid red light
      Run dmesg | tail and check the last output and you should reference to ch341
      # dmesg | tail
      Run flashrom again and the error above should be gone and it will just say No EEPROM/flash device found
      Unplug the ch341a again and connect the chip clip to chromebase mini, red lead matched to the dimple on the chip
      Plug back in the ch341a and run flashrom again and now you should see that it's found a GigaDevice flash chip
      # flashrom -p ch341a_spi
      Read the flash contents off to a file:


        I would encourage you to follow the steps above and see if we can get in sync, provided you are working on this now... I'll edit this post with more steps.

        Read the flash contents off to a file:
        # flashrom -p ch341a_spi -r chromebase.orig.bin
        The above command will take a minute or so to complete, the yellow run light will come on steady and the command should finish with SUCCESS
        You should now see a 4.0M chromebase.orig.bin file:
        # ls -alh
        Copy the file to so we can edit the new one and leave the original alone:
        # cp chromebase.orig.bin
        Use the vpd utility to list the values in the file:
        # vpd -l -i "RO_VPD" -f
        We'll leave the following values alone:
        We'll change "serial_number" to all zeroes
        We'll delete the following keys completely:
        # vpd -f -i "RO_VPD" -s "serial_number"="00000000000000000000000"
        # vpd -f -i "RO_VPD" -d "stable_device_secret_DO_NOT_SHARE"
        # vpd -f -i "RO_VPD" -d "mlb_serial_number"
        Now take a look at the RW VPD values:
        # vpd -l -i "RW_VPD" -f
        I'm less sure about when/if to change these. At this point, I _think_ you could write the new flash back,
        restore a stock chromeos from a recovery USB, and go through registration with your google account, the enterprise enrollment
        block should be fixed now with zeroing out the serial number. The you'll just need to pick up over at the Alpine wiki I made to go to dev
        mode, enable USB boot, install Alpine etc. Or stay with Chromeos if you want (though not sure how you'd use it with LMS)
        I can tell you that I _think_ it doesn't hurt to change a couple of more settings and may actually help you avoid having to restore the stock
        chromeos and go through the registration steps / dev mode stuff at all but I don't really have a good way to easily test since mine are done already,
        and I went through the long way on those.
        My RW_VPD settings of interest are set to:
        Yours are probably set to "1"? Change yours to match with:
        # vpd -f -i "RW_VPD" -s "check_enrollment"="0"
        # vpd -f -i "RW_VPD" -s "block_devmode"="0"
        Write the new flash file back to the chromebase:
        # flashrom -p ch341a_spi -w
        Same as the read step, this will take a minute or so and the Run light will be on steady, the command should indicate SUCCESS

        At this point, you can uplug the USB programmer, disconnect the chip clip, and pickup with the steps of restoring a recovery image,
        registration and enabling dev mode and usb boot.
        Last edited by sodface; 2021-09-02, 14:14.


          OK, Setting Up Now

          Hi sodface,

          It's 9:55AM in the Pacific Time Zone and I'm turning on my Linux machine now. I'll have to burn the Alpine ISO to a USB stick (duh, why didn't I think of that?) first. I have to dig up a free stick -- I'll report back by 10:30AM Pacific once I get it up and running.


            Running apk update now...

            I have the Alpine USB stick up and running, I'm about halfway through your list of steps... so far, so good.


              'flashrom-chromium' and 'vpd' = "No such package" ?

              Just hit a brick wall -- I think you and I might be colliding in using your repo at the same time? Using 'add apk flashrom-chromium vpd' yields the response that no such packages exist...


                Originally posted by Themistocles View Post
                Just hit a brick wall -- I think you and I might be colliding in using your repo at the same time? Using 'add apk flashrom-chromium vpd' yields the response that no such packages exist...
                I updated the post above with the second half of the steps.

                Using the repo at the same time isn't an issue. What do you have in your repos file? When you ran apk update did it have any errors?

                You should see something like:

                repo  []
                I snipped some output so it wouldn't be confusing.


                  'apk update' yields 1 error

                  When I do 'apk update' I get "1 error, 4759 distinct packages available"


                    Make sure you have my URL in the repositories file:

                    # cat /etc/apk/repositories 
                    Make sure my public key is in /etc/apk/keys:

                    # find /etc/apk/keys
                    /etc/apk/keys/[email protected]
                    /etc/apk/keys/[email protected]
                    /etc/apk/keys/[email protected]
                    /etc/apk/keys/[email protected]


                      Errors in detail

                      Actually, looking deeper into the CLI output, it says " No such file or directory" even though I had no errors when I first added your repo.

                      I am using the x86 version of Alpine extended, by the way -- this is an old laptop and I don't think it's 64-bit.


                        Yes, your repo is listed -- twice. And your keys are there too.


                          Originally posted by Themistocles View Post
                          Actually, looking deeper into the CLI output, it says " No such file or directory" even though I had no errors when I first added your repo.

                          I am using the x86 version of Alpine extended, by the way -- this is an old laptop and I don't think it's 64-bit.
                          Oh, shoot, that's the issue then. I don't have an x86 32 bit repo.

                          What's your arch command output:
                          desk-5070:~# arch


                            I don't have a 32bit build environment setup to rebuild the packages. Do you have a 64bit machine you can work from? Otherwise it'll take me a bit to get the packages compiled for 32 bit and uploaded to my repo.


                              Yup -- my machine's to blame. My arch is i686. I guess I need to swap out the USB stick to a newer machine. I can do that...

                              Give me about 5 min...


                                Actually, you should go have a late lunch (well deserved!) or grab a coffee. I'll need to download the x64 version of Alpine extended and re-burn the USB stick. That'll take more like 15 minutes or so.