Giter Site home page Giter Site logo

inindev / rockpi-4c-plus Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 0.0 156 KB

debian arm64 linux for the rockpi 4c+

License: GNU General Public License v3.0

Shell 86.36% Makefile 13.64%
arm arm64 debian device-tree linux rock-pi u-boot rock-pi-4c-plus rock-4c-plus debian-linux

rockpi-4c-plus's Introduction

rockpi-4c-plus

Stock Debian ARM64 Linux for the Radxa ROCK (Pi) 4C+

This stock Debian ARM64 Linux image is built directly from official packages using the official Debian Debootstrap utility, see: https://github.com/inindev/rockpi-4c-plus/blob/main/debian/make_debian_img.sh#L139

Being an official unmodified Debian build, patches are directory available from the Debian repos using the stock apt package manager, see: https://github.com/inindev/rockpi-4c-plus/blob/main/debian/make_debian_img.sh#L368-L378

If you want to run true up-stream Debian Linux on your ARM64 device, this is the way to do it.



debian bookworm setup


1. download image

wget https://github.com/inindev/rockpi-4c-plus/releases/download/v12.0.1/rockpi-4c-plus_bookworm-1201.img.xz

2. determine the location of the target micro sd card

  • before plugging-in device
ls -l /dev/sd*
ls: cannot access '/dev/sd*': No such file or directory
  • after plugging-in device
ls -l /dev/sd*
brw-rw---- 1 root disk 8, 0 Sep  8 20:58 /dev/sda
  • note: for mac, the device is /dev/rdiskX

3. in the case above, substitute 'a' for 'X' in the command below (for /dev/sda)

sudo sh -c 'xzcat rockpi-4c-plus_bookworm-1201.img.xz > /dev/sdX && sync'

when the micro sd has finished imaging, eject and use it to boot the rock 4c+ to finish setup


4. login account

user: debian
pass: debian

5. take updates

sudo apt update
sudo apt upgrade

6. create account & login as new user

sudo adduser <youruserid>
echo '<youruserid> ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/<youruserid>
sudo chmod 440 /etc/sudoers.d/<youruserid>

7. lockout and/or delete debian account

sudo passwd -l debian
sudo chsh -s /usr/sbin/nologin debian
sudo deluser --remove-home debian
sudo rm /etc/sudoers.d/debian

8. change hostname (optional)

sudo nano /etc/hostname
sudo nano /etc/hosts


building debian bookworm arm64 for the rock 4c+ from scratch


The build script builds native arm64 binaries and thus needs to be run from an arm64 device such as a raspberry pi4 running a 64 bit arm linux. The initial build of this project used a debian arm64 raspberry pi4, but now uses a rock 5b running stock debian trixie arm64.


1. clone the repo

git clone https://github.com/inindev/rockpi-4c-plus.git
cd rockpi-4c-plus

2. run the debian build script

cd debian
sudo sh make_debian_img.sh
  • note: edit the build script to change various options: nano make_debian_img.sh

3. the output if the build completes successfully

mmc_2g.img.xz


note: bypassing spi flash boot

If the SPI flash contains a u-boot image, the flash will need to be disabled to boot from MMC. To disable the flash, short SPI1_CLK pin 23 to ground as outlined on the radxa wiki. Once the MMC has been bootstrapped, the jumper can carefully be removed to reenable the SPI flash so it can be accessed by the booted image.


            spi flash bypass


rockpi-4c-plus's People

Contributors

inindev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rockpi-4c-plus's Issues

Latest Rock 4C+ not booting

Hi John,

first of all I'd like to thank you for sharing this repository with the public. You did an amazing job! Your scripts worked perfectly for my Rock 4 C+ boards so far.

However, apparently, with the most recent batch of boards I received, the images generated by your scripts do not boot anymore. The "official" Debian image available from Radxa [1], however, still works. Although, the new boards have the same revision as the old ones (v1.41), on can see some "minor differences".

Since I do not even receive output via the serial console, I assume that u-boot isn't really alive. To summarize what I've tested so far:

  • Cloned the latest version of this repo and made a fresh debian image (sligt modifications to some of the URLs in make_debian_img.sh were necessary [v12.0 -> v12.0.1]). No success.
  • Built DTB and uboot from scratch using sh make_dtb.sh cp and sh make_uboot.sh cp and built a new image. No success.
  • Found commit radxa/u-boot@31b8524 and changed +CONFIG_SPL_FIT_SIGNATURE=y to +CONFIG_SPL_FIT_SIGNATURE=n in https://github.com/inindev/rockpi-4c-plus/blob/main/uboot/patches/0003-u-boot-config-for-the-rock-4c-plus.patch . No success.
  • Installed "official" Debian image [1]. Success, board boots. Serial console only outputs tons of @ instead of anything useful.
  • Took 50 4-k-blocks starting from offset 8 (4-k-blocks) out of the "official" Debian image and replaced idbloader.img with that. A small succes: The serial console receives the @s again. Board does not boot.
  • Tried to build u-boot from Radxa repository. Stuck here, because repo cotains some pre-compiled binaries. For x86 and I'm on an RPi at the moment.
  • Mounted the two root file systems and compared the contents of /boot. The are major differences...

Do you have any idea, what I could try next? Is there anything I can provide that would help you help me?

Cheers and thanks
G.

[1] https://github.com/radxa-build/rock-4c-plus/releases/download/20230312-1521/rock-4c-plus_debian_bullseye_kde_b55.img.xz

Boot, Video, Audio Issues.

Overall, great image for the Rock 4C+.

Some of the issues:

  • After U-Boot loads, the display has a checkered yellow pattern for a few seconds before the login prompt to Debian appears. It is almost like the Raspberry Pi rainbow pattern when the device is turned on to test the GPU. Can this be an option to toggle off as a blank-black or on as a rainbow like the Raspberry Pi?

  • Verbose mode option during boot after U-Boot. Option to toggle U-Boot timing to read before loading the OS Debian where the console output is in verbose mode.

  • Boot tries to identify the display when connected to a KVM switch, and only detects a resolution of [email protected] when the KVM switch supports [email protected]. I can directly attach the Rock 4C+ to the same display and it detects [email protected], and reconnect it back to the KVM switch with full [email protected], but the reboot reverts back to [email protected]. Can this be setup to have a static resolution such as [email protected] in /boot as a config file during U-Boot, and booting to the CLI of Debian?

  • Toggle HDMI-1-2 on by default. Ensure HDMI is on regardless if there is a connected display or not.

  • Enforce HDMI hotplug, group or mode. This can aid when connected to a KVM switch or display that EDID cannot read.

  • Disable EDID or KMS during boot to prevent the display from being detected using a standard static resolution such as [email protected]. This can aid when connected to a KVM switch or display that EDID cannot read.

  • Enable Analog audio, HDMI audio or both. HDMI audio works, but the Analog audio jack is not an option.

  • Resolve Led status indicators. Default Green-Power-Static, Blue-Storage-MicroSD-Activity.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.