Trouble booting in Gentoo - tdiggitydog - 07-16-2021
Hello all!
I'm currently running Manjaro ARM (as the PBP was shipped with), and I have been trying to install Gentoo onto an sd card for my PBP, following Jannik2099's guide as well as Gentoo's AMD64 handbook. Here are my main 3 sources of information:
https://forum.pine64.org/showthread.php?tid=8765
https://github.com/Jannik2099/gentoo-pinebookpro
https://wiki.gentoo.org/wiki/Handbook:AMD64
I have tried installing it twice now onto my 64GB sd card. I encounter no errors or problems during the installation process. But when I reboot the laptop, I am left with a boot loop. I know that /boot/extlinux/extlinux.conf (on the sd card) is being read upon boot, because if I modify it and change the line
to
or something else, the time the laptop is powered on changes according to the timeout value. But either way, it still powers on, waits some time (as per the timeout), and then reboots, and repeats.
I've tried installing 2 times now, each with different partitioning.
Here are the partitions from my first install. I didn't copy it down unfortunately, so this is merely a guess. I think the only values that will be wrong are the sectors (start, end, & size), but they will still be close approximates.
Code: root # parted /dev/mmcblk1 u S p
Partition Table: msdos
Number Start End Size Type File system Flags
1 2048s 526335s 524288s primary fat32 lba
2 526336 8914942 8388608s primary swap
3 8914943 123473886s 114558944s primary btrfs
Here are the partitions from my second (and current) install. I used this as a reference for my partitioning.
Code: root # parted /dev/mmcblk1 u S p
Partition Table: gpt
Number Start End Size File system Name Flags
2 64s 16383s 16320s IDBLoader
3 16384s 24575s 8192s U-Boot
4 24576s 32767s 8192s TrustedFirmware-A
1 32768s 557055s 524288s fat32 GENT-BOOT
5 557056s 8945663s 8388608s linux-swap(v1) GENT-SWAP swap
6 8945664s 123473886s 114528223s f2fs GENT-ROOT
Most of the installation process probably did not play into my boot problems but I will quickly go through the steps I took on each installation:
1. Partioned SD card
2. Mounted root partion to /mnt/gentoo and boot partition to /mnt/gentoo/boot
3. Extracted stage3 archive.
4. Git cloned Jannik2099's repository (link at the top of this post)
5. Coppied DNS info and mounted the necessary filesystems exactly as the AMD64 handbook did.
6. Chrooted into /mnt/gentoo
7. Modified make.conf as such:
Code: COMMON_FLAGS="-march=armv8-a+crc -mtune=cortex-a53 -O2 -pipe"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
CHOST="aarch64-unknown-linux-gnu"
MAKEOPTS="-j6 -l8"
EMERGE_DEFAULT_OPTS="--jobs 6 --load-average 8"
FEATURES="parallel-install"
LC_MESSAGES=C
ACCEPT_LICENSE="*"
USE=""
8. Ran Jannik2099's script (prepare.sh)
9. Selected the default profile (default/linux/arm64/17.0 (stable)) and updated @world set
10. Set timezone and locale stuff
11. Emerged sys-kernel/pinebookpro-manjaro-sources sys-kernel/genkernel sys-boot/extlinux sys-boot/u-boot
12. Installed U-Boot as such:
Code: #FIRST INSTALLATION
dd if=/usr/share/u-boot/idbloader.img of=/dev/mmcblk1 seek=64 conv=notrunc
dd if=/usr/share/u-boot/u-boot.itb of=/dev/mmcblk1 seek=16384 conv=notrunc
#SECOND INSTALLATION
dd if=/usr/share/u-boot/idbloader.img of=/dev/mmcblk1p2
dd if=/usr/share/u-boot/u-boot.itb of=/dev/mmcblk1p3
13. Updated /etc/fstab for boot entry:
Code: /dev/mmcblk1p1 /boot vfat defaults 0 2
14. eselected kernel and ran genkernel all
15. Went to /usr/src/linux and ran:
Code: make dtbs && make dtbs_install
16. Ran u-boot-update
17. Updated fstab to:
Code: #first entry of each line was different on both of my installations, but everything else was the same. On my first
installation I used both device names (i.e. /dev/mmcblk1p1) and UUIDs.
LABEL=GENT-BOOT /boot vfat defaults,noatime 0 2
LABEL=GENT-SWAP none swap sw 0 0
LABEL=GENT-ROOT / f2fs noatime 0 1
18. Exited chroot environment and unmounted everything necessary and rebooted.
19. Boot loop
Here is some other relevant information:
Code: # /boot/extlinux/extlinux.conf
default l0
menu title U-Boot menu
prompt 0
timeout 50
label l0
menu label Gentoo Linux 5.11.16-pinebookpro-arm64
linux /vmlinuz-5.11.16-pinebookpro-arm64
append initrd=/initramfs-5.11.16-pinebookpro-arm64.img root=LABEL=GENT-ROOT console=tty1 rw video=eDP-1:1920x1080@60
label l0r
menu label Gentoo Linux 5.11.16-pinebookpro-arm64 (rescue target)
linux /vmlinuz-5.11.16-pinebookpro-arm64
append initrd=/initramfs-5.11.16-pinebookpro-arm64.img root=LABEL=GENT-ROOT console=tty1 rw video=eDP-1:1920x1080@60 systemd.unit=rescue.target
Code: # /etc/default/u-boot
U_BOOT_UPDATE="true"
U_BOOT_ALTERNATIVES="default recovery"
U_BOOT_DEFAULT="l0"
U_BOOT_ENTRIES="all"
U_BOOT_MENU_LABEL="Gentoo Linux"
U_BOOT_PARAMETERS="console=tty1 rw video=eDP-1:1920x1080@60"
U_BOOT_ROOT=""
U_BOOT_TIMEOUT="50"
U_BOOT_FDT="rockchip/rk3399-pinebook-pro.dtb"
U_BOOT_FDT_DIR="dtbs"
Code: root # ls -l /boot
drwxr-xr-x 3 root root 512 Jul 15 19:59 dtbs
drwxr-xr-x 2 root root 512 Jul 16 16:19 extlinux
-rwxr-xr-x 1 root root 9865720 Jul 16 14:05 initramfs-5.11.16-pinebookpro-arm64.img
-rwxr-xr-x 1 root root 5130930 Jul 16 14:05 System.map-5.11.16-pinebookpro-arm64
-rwxr-xr-x 1 root root 26708480 Jul 16 14:05 vmlinuz-5.11.16-pinebookpro-arm64
I have also updated my Manjaro system and updated u-boot on it as well.
I've been at this for several days now and I feel like I am going to lose my mind trying to figure out what's wrong! I have scoured the internet and so far there hasn't been much helpful information.
I would sincerely appreciate any help my issues. Thank you!
RE: Trouble booting in Gentoo - 33YN2 - 07-18-2021
Deleted the other thread.
RE: Trouble booting in Gentoo - wdt - 07-18-2021
You seem to be missing the line for the dtb,, often just after kernel/Image
fdt /some-path (fdt=flattened device tree)
it can be relative to extlinux,,, ../dtbs/etc OR if 2 partitions /dtbs/etc
OR if 1 partition /boot/dtbs/etc
Remember, dtb is loaded BEFORE initrd which is where filesystem becomes complete
uboot (which is what loads dtb) only knows about the partition where it found extlinux.conf (or boot.scr)
So, in a 2 partition setup thinks boot partiiton is /
RE: Trouble booting in Gentoo - tdiggitydog - 07-19-2021
(07-18-2021, 03:40 PM)wdt Wrote: You seem to be missing the line for the dtb,, often just after kernel/Image
fdt /some-path (fdt=flattened device tree)
it can be relative to extlinux,,, ../dtbs/etc OR if 2 partitions /dtbs/etc
OR if 1 partition /boot/dtbs/etc
Remember, dtb is loaded BEFORE initrd which is where filesystem becomes complete
uboot (which is what loads dtb) only knows about the partition where it found extlinux.conf (or boot.scr)
So, in a 2 partition setup thinks boot partiiton is /
Thanks for the reply!
I added this line to my extlinux.conf
Code: fdt /dtbs/5.11.16-pinebookpro-arm64/rockchip/rk3399-pinebook-pro.dtb
so, the file now looks like this:
Code: default l0
menu title U-Boot menu
prompt 0
timeout 50
label l0
menu label Gentoo Linux 5.11.16-pinebookpro-arm64
linux /vmlinuz-5.11.16-pinebookpro-arm64
fdt /dtbs/5.11.16-pinebookpro-arm64/rockchip/rk3399-pinebook-pro.dtb
append initrd=/initramfs-5.11.16-pinebookpro-arm64.img root=LABEL=GENT-ROOT console=tty1 rw video=eDP-1:1920x1080@60
label l0r
menu label Gentoo Linux 5.11.16-pinebookpro-arm64 (rescue target)
linux /vmlinuz-5.11.16-pinebookpro-arm64
fdt /dtbs/5.11.16-pinebookpro-arm64/rockchip/rk3399-pinebook-pro.dtb
append initrd=/initramfs-5.11.16-pinebookpro-arm64.img root=LABEL=GENT-ROOT console=tty1 rw video=eDP-1:1920x1080@60 systemd.unit=rescue.target
I wasn't sure which .dtb file to use, since there are so many (in the subdirs found in /boot/dtbs/5.11.16-pinebookpro-arm64/). So i copied the the file "rk3399-pinebook-pro.dtb" from my Manjaro system to the gentoo sd card.
So after copying the file and the adding that line in my extlinux.conf, I am still unable to boot, but it no longer goes into a boot loop. It stays powered on until I force it off, and the screen never turns on. So hopefully this made some progress at least.
Do you think maybe I ought to use a different .dtb file in my extlinux.conf?
Here is a list of all of them found on the sd card. The files under the "rockchip" directory are ones I copied from my manjaro system.
Code: gentoo # pwd
/boot/dtbs/5.11.16-pinebookpro-arm64
gentoo # ls -l
total 32
drwxr-xr-x 2 root root 512 Jul 15 23:33 amd
drwxr-xr-x 2 root root 5632 Jul 15 23:33 amlogic
drwxr-xr-x 2 root root 512 Jul 15 23:33 apm
drwxr-xr-x 2 root root 1024 Jul 15 23:33 arm
drwxr-xr-x 2 root root 1024 Jul 15 23:33 broadcom
drwxr-xr-x 2 root root 512 Jul 15 23:33 cavium
drwxr-xr-x 2 root root 5632 Jul 15 23:33 freescale
drwxr-xr-x 2 root root 1024 Jul 15 23:33 hisilicon
drwxr-xr-x 2 root root 2048 Jul 15 23:33 marvell
drwxr-xr-x 2 root root 1536 Jul 15 23:33 nvidia
drwxr-xr-x 2 root root 5632 Jul 15 23:33 qcom
drwxr-xr-x 2 root root 5632 Jul 19 08:55 rockchip
drwxr-xr-x 2 root root 2048 Jul 15 23:33 xilinx
gentoo # ls *
amd:
amd-overdrive-rev-b0.dtb amd-overdrive-rev-b1.dtb amd-overdrive.dtb husky.dtb
amlogic:
meson-a1-ad401.dtb meson-g12b-s922x-khadas-vim3.dtb meson-gxbb-vega-s95-telos.dtb meson-gxl-s905w-p281.dtb meson-gxm-q200.dtb
meson-axg-s400.dtb meson-g12b-ugoos-am6.dtb meson-gxbb-wetek-hub.dtb meson-gxl-s905w-tx3-mini.dtb meson-gxm-q201.dtb
meson-g12a-sei510.dtb meson-gxbb-kii-pro.dtb meson-gxbb-wetek-play2.dtb meson-gxl-s905x-hwacom-amazetv.dtb meson-gxm-rbox-pro.dtb
meson-g12a-u200.dtb meson-gxbb-nanopi-k2.dtb meson-gxl-s805x-libretech-ac.dtb meson-gxl-s905x-khadas-vim.dtb meson-gxm-s912-libretech-pc.dtb
meson-g12a-x96-max.dtb meson-gxbb-nexbox-a95x.dtb meson-gxl-s805x-p241.dtb meson-gxl-s905x-libretech-cc-v2.dtb meson-gxm-vega-s96.dtb
meson-g12b-a311d-khadas-vim3.dtb meson-gxbb-odroidc2.dtb meson-gxl-s905d-libretech-pc.dtb meson-gxl-s905x-libretech-cc.dtb meson-gxm-wetek-core2.dtb
meson-g12b-gtking-pro.dtb meson-gxbb-p200.dtb meson-gxl-s905d-p230.dtb meson-gxl-s905x-nexbox-a95x.dtb meson-sm1-khadas-vim3l.dtb
meson-g12b-gtking.dtb meson-gxbb-p201.dtb meson-gxl-s905d-p231.dtb meson-gxl-s905x-p212.dtb meson-sm1-odroid-c4.dtb
meson-g12b-odroid-n2-plus.dtb meson-gxbb-vega-s95-meta.dtb meson-gxl-s905d-phicomm-n1.dtb meson-gxm-khadas-vim2.dtb meson-sm1-sei610.dtb
meson-g12b-odroid-n2.dtb meson-gxbb-vega-s95-pro.dtb meson-gxl-s905d-sml5442tw.dtb meson-gxm-nexbox-a1.dtb
apm:
apm-merlin.dtb apm-mustang.dtb
arm:
foundation-v8-gicv3-psci.dtb foundation-v8-psci.dtb fvp-base-revc.dtb juno-r2.dtb rtsm_ve-aemv8a.dtb
foundation-v8-gicv3.dtb foundation-v8.dtb juno-r1.dtb juno.dtb vexpress-v2f-1xv7-ca53x2.dtb
broadcom:
bcm2711-rpi-4-b.dtb bcm2837-rpi-3-a-plus.dtb bcm2837-rpi-3-b-plus.dtb bcm2837-rpi-3-b.dtb bcm2837-rpi-cm3-io3.dtb
cavium:
thunder-88xx.dtb thunder2-99xx.dtb
freescale:
fsl-ls1012a-frdm.dtb fsl-ls1028a-kontron-sl28.dtb fsl-ls1088a-rdb.dtb fsl-lx2160a-rdb.dtb imx8mn-var-som-symphony.dtb imx8mq-pico-pi.dtb
fsl-ls1012a-frwy.dtb fsl-ls1028a-qds.dtb fsl-ls2080a-qds.dtb fsl-lx2162a-qds.dtb imx8mp-evk.dtb imx8mq-thor96.dtb
fsl-ls1012a-oxalis.dtb fsl-ls1028a-rdb.dtb fsl-ls2080a-rdb.dtb imx8mm-beacon-kit.dtb imx8mq-evk.dtb imx8mq-zii-ultra-rmb3.dtb
fsl-ls1012a-qds.dtb fsl-ls1043a-qds.dtb fsl-ls2080a-simu.dtb imx8mm-ddr4-evk.dtb imx8mq-hummingboard-pulse.dtb imx8mq-zii-ultra-zest.dtb
fsl-ls1012a-rdb.dtb fsl-ls1043a-rdb.dtb fsl-ls2088a-qds.dtb imx8mm-evk.dtb imx8mq-librem5-devkit.dtb imx8qxp-ai_ml.dtb
fsl-ls1028a-kontron-kbox-a-230-ls.dtb fsl-ls1046a-frwy.dtb fsl-ls2088a-rdb.dtb imx8mm-kontron-n801x-s.dtb imx8mq-librem5-r2.dtb imx8qxp-colibri-eval-v3.dtb
fsl-ls1028a-kontron-sl28-var2.dtb fsl-ls1046a-qds.dtb fsl-lx2160a-clearfog-cx.dtb imx8mm-var-som-symphony.dtb imx8mq-librem5-r3.dtb imx8qxp-mek.dtb
fsl-ls1028a-kontron-sl28-var3-ads2.dtb fsl-ls1046a-rdb.dtb fsl-lx2160a-honeycomb.dtb imx8mn-ddr4-evk.dtb imx8mq-nitrogen.dtb
fsl-ls1028a-kontron-sl28-var4.dtb fsl-ls1088a-qds.dtb fsl-lx2160a-qds.dtb imx8mn-evk.dtb imx8mq-phanbell.dtb
hisilicon:
hi3660-hikey960.dtb hi3670-hikey970.dtb hi3798cv200-poplar.dtb hi6220-hikey.dtb hip05-d02.dtb hip06-d03.dtb hip07-d05.dtb
marvell:
armada-3720-db.dtb armada-3720-espressobin-v7-emmc.dtb armada-3720-turris-mox.dtb armada-8040-clearfog-gt-8k.dtb armada-8040-mcbin.dtb cn9130-db.dtb
armada-3720-espressobin-emmc.dtb armada-3720-espressobin-v7.dtb armada-3720-uDPU.dtb armada-8040-db.dtb armada-8040-puzzle-m801.dtb cn9131-db.dtb
armada-3720-espressobin-ultra.dtb armada-3720-espressobin.dtb armada-7040-db.dtb armada-8040-mcbin-singleshot.dtb armada-8080-db.dtb cn9132-db.dtb
nvidia:
tegra132-norrin.dtb tegra194-p2972-0000.dtb tegra210-p2371-0000.dtb tegra210-p2571.dtb tegra210-p3450-0000.dtb
tegra186-p2771-0000.dtb tegra194-p3509-0000+p3668-0000.dtb tegra210-p2371-2180.dtb tegra210-p2894-0050-a08.dtb tegra210-smaug.dtb
qcom:
apq8016-sbc.dtb msm8992-msft-lumia-talkman.dtb qcs404-evb-1000.dtb sc7180-trogdor-lazor-r3.dtb sdm845-cheza-r2.dtb
apq8096-db820c.dtb msm8992-xiaomi-libra.dtb qcs404-evb-4000.dtb sc7180-trogdor-r1-lte.dtb sdm845-cheza-r3.dtb
apq8096-ifc6640.dtb msm8994-angler-rev-101.dtb qrb5165-rb5.dtb sc7180-trogdor-r1.dtb sdm845-db845c.dtb
ipq6018-cp01-c1.dtb msm8994-msft-lumia-cityman.dtb sc7180-idp.dtb sdm630-sony-xperia-ganges-kirin.dtb sdm845-mtp.dtb
ipq8074-hk01.dtb msm8994-sony-xperia-kitakami-sumire.dtb sc7180-trogdor-lazor-r0.dtb sdm630-sony-xperia-nile-discovery.dtb sdm845-xiaomi-beryllium.dtb
msm8916-longcheer-l8150.dtb msm8996-mtp.dtb sc7180-trogdor-lazor-r1-kb.dtb sdm630-sony-xperia-nile-pioneer.dtb sdm850-lenovo-yoga-c630.dtb
msm8916-mtp.dtb msm8998-asus-novago-tp370ql.dtb sc7180-trogdor-lazor-r1-lte.dtb sdm630-sony-xperia-nile-voyager.dtb sm8150-hdk.dtb
msm8916-samsung-a3u-eur.dtb msm8998-hp-envy-x2.dtb sc7180-trogdor-lazor-r1.dtb sdm636-sony-xperia-ganges-mermaid.dtb sm8150-mtp.dtb
msm8916-samsung-a5u-eur.dtb msm8998-lenovo-miix-630.dtb sc7180-trogdor-lazor-r3-kb.dtb sdm660-xiaomi-lavender.dtb sm8250-hdk.dtb
msm8992-bullhead-rev-101.dtb msm8998-mtp.dtb sc7180-trogdor-lazor-r3-lte.dtb sdm845-cheza-r1.dtb sm8250-mtp.dtb
rockchip:
px30-engicam-px30-core-ctouch2-of10.dtb rk3328-evb.dtb rk3368-px5-evb.dtb rk3399-hugsun-x99.dtb rk3399-nanopi-neo4.dtb rk3399-rock-pi-4c.dtb
px30-engicam-px30-core-ctouch2.dtb rk3328-nanopi-r2s.dtb rk3368-r88.dtb rk3399-khadas-edge-captain.dtb rk3399-nanopi-r4s.dtb rk3399-rock960.dtb
px30-engicam-px30-core-edimm2.2.dtb rk3328-roc-cc.dtb rk3399-evb.dtb rk3399-khadas-edge-v.dtb rk3399-orangepi.dtb rk3399-rockpro64-v2.dtb
px30-evb.dtb rk3328-rock-pi-e.dtb rk3399-ficus.dtb rk3399-khadas-edge.dtb rk3399-pinebook-pro.dtb rk3399-rockpro64.dtb
rk3308-evb.dtb rk3328-rock64.dtb rk3399-firefly.dtb rk3399-kobol-helios64.dtb rk3399-puma-haikou.dtb rk3399-sapphire-excavator.dtb
rk3308-roc-cc.dtb rk3368-evb-act8846.dtb rk3399-gru-bob.dtb rk3399-leez-p710.dtb rk3399-roc-pc-mezzanine.dtb rk3399-sapphire.dtb
rk3318-a95x-z2.dtb rk3368-geekbox.dtb rk3399-gru-kevin.dtb rk3399-nanopc-t4.dtb rk3399-roc-pc.dtb rk3399-station-p1.dtb
rk3326-odroid-go2.dtb rk3368-lion-haikou.dtb rk3399-gru-scarlet-inx.dtb rk3399-nanopi-m4.dtb rk3399-rock-pi-4a.dtb rk3399pro-rock-pi-n10.dtb
rk3328-a1.dtb rk3368-orion-r68-meta.dtb rk3399-gru-scarlet-kd.dtb rk3399-nanopi-m4b.dtb rk3399-rock-pi-4b.dtb
xilinx:
avnet-ultra96-rev1.dtb zynqmp-zc1275-revA.dtb zynqmp-zc1751-xm017-dc3.dtb zynqmp-zcu100-revC.dtb zynqmp-zcu102-revB.dtb zynqmp-zcu111-revA.dtb
zynqmp-zc1232-revA.dtb zynqmp-zc1751-xm015-dc1.dtb zynqmp-zc1751-xm018-dc4.dtb zynqmp-zcu102-rev1.0.dtb zynqmp-zcu104-revA.dtb
zynqmp-zc1254-revA.dtb zynqmp-zc1751-xm016-dc2.dtb zynqmp-zc1751-xm019-dc5.dtb zynqmp-zcu102-revA.dtb zynqmp-zcu106-revA.dtb
RE: Trouble booting in Gentoo - wdt - 07-19-2021
The dtb for a specific device will vary slightly for each different kernel, but only slightly
This device is a rockchip rk3399, so any other cpu-dtb will almost certainly be mismatched
Sometimes the uboot will have an effect, and also the compositer
For example, I have a debian10 that with tow-boot will not boot anything other than 5.5
unless the compositer is turned off, but with a bsp uboot will boot the default kernel (5.8)
(nearly all uboots will NOT show the menu, only samueldr/tow-boot)
Do be aware that if this is on SD, whatever uboot is on emmc will be found 1st and used
If you are 100% sure that you have a bootable SD, some other distro, that will boot for sure,,,
then copy mbr (1 sector old style, 34 sectors GPT style) ,1st 16M (of emmc), maybe to a usb stick,,
blank (/dev/zero) 1st 16M, restore mbr
Then the pbp will be forced to use uboot on SD, because there is no other
If you have a 100% bootable SD, you can easily restore the original 1st 16M
--more--
Are you saying that there was not a dtb for either pinebookpro or several rk3399 dtbs with the gentoo install?
RE: Trouble booting in Gentoo - tdiggitydog - 07-19-2021
(07-19-2021, 04:18 PM)wdt Wrote: The dtb for a specific device will vary slightly for each different kernel, but only slightly
This device is a rockchip rk3399, so any other cpu-dtb will almost certainly be mismatched
Sometimes the uboot will have an effect, and also the compositer
For example, I have a debian10 that with tow-boot will not boot anything other than 5.5
unless the compositer is turned off, but with a bsp uboot will boot the default kernel (5.8)
(nearly all uboots will NOT show the menu, only samueldr/tow-boot)
Do be aware that if this is on SD, whatever uboot is on emmc will be found 1st and used
If you are 100% sure that you have a bootable SD, some other distro, that will boot for sure,,,
then copy mbr (1 sector old style, 34 sectors GPT style) ,1st 16M (of emmc), maybe to a usb stick,,
blank (/dev/zero) 1st 16M, restore mbr
Then the pbp will be forced to use uboot on SD, because there is no other
If you have a 100% bootable SD, you can easily restore the original 1st 16M
--more--
Are you saying that there was not a dtb for either pinebookpro or several rk3399 dtbs with the gentoo install?
Quote:If you are 100% sure that you have a bootable SD, some other distro, that will boot for sure,,,
then copy mbr (1 sector old style, 34 sectors GPT style) ,1st 16M (of emmc), maybe to a usb stick,,
blank (/dev/zero) 1st 16M, restore mbr
Then the pbp will be forced to use uboot on SD, because there is no other
If you have a 100% bootable SD, you can easily restore the original 1st 16M
Would you mind elaborating on this? Sorry, I am still very new to ARM, u-boot, etc, and I am unsure what this means/how to do it.
Quote:Are you saying that there was not a dtb for either pinebookpro or several rk3399 dtbs with the gentoo install?
Correct. The only .dtb files that have "rk3399" or "pinebook" in the name are the ones I manually copied from my manjaro system.
RE: Trouble booting in Gentoo - wdt - 07-19-2021
Sometimes (but not that often) the dtb for a SPECIFIC device is appended to kernel,
but I doubt this is the case here
My pbp is setup this way (still)
using dd, copy 1st sector (mbr) somewhere, give name like emmc.mbr
copy 1st 16 MB somewhere (named as 1st-16.emmc.$DISTRO)
use something like dd if=/dev/emmc of=~/1st-16.emmc.manj bs=1M count=16,,,,, change emmc as appropriate
(that is emmc = mmcblk1 OR mmcblk2 OR maybe mmcblk0)
blank,,, dd if=/dev/zero of=/dev/emmc bs=1M count=16
restore mbr,,,,, dd if=emmc.mbr of=/dev/emmc (emmc.mbr should only be 512 bytes
(unless GPT ,, use 34 sectors,,,, dd default bs is 512 bytes so only need count)
So, if you check with fdisk /dev/emmc should all show correctly
Rest of 1st 16 M is /dev/zero,, blank,,,, so only uboot on SD can be used, it is the only one
If you want to restore just dd 1st-16M back to emmc
---edit---
I have never seen (unless very old) an arm device without dtb,
except for specific devices only, appended to kernel,,
so I think the gentoo is broken
RE: Trouble booting in Gentoo - moonwalkers - 07-19-2021
(07-19-2021, 04:18 PM)wdt Wrote: (nearly all uboots will NOT show the menu, only samueldr/tow-boot)
u-boot-rockchip 2021.07~rc4+dfsg-1 in Debian Experimental shows menu just fine, though I haven't tried using keyboard to actually select a kernel.
RE: Trouble booting in Gentoo - wdt - 07-19-2021
@moonwalkers
Do you know?
is this something internal to the uboot or is there an arm compiled menu.c32 ?
RE: Trouble booting in Gentoo - Arwen - 07-20-2021
What we need is a minimal & bootable Gentoo image. I too wanted to use Gentoo, but had to give up because of the complexities on ARM64.
Plus, the kernel would be minimal too. Only activate actual hardware and software necessary to boot a Pinebook Pro. With the intent that a user would customize things after, (like adding CIFS support).
|