RaspberryPi 3 B下的64位 uboot linux编译更新

1.我的RaspberryPi 3 B环境

芯片BCM2837rifbg为4核 64位 ARM cortex A53 CPU(这是硬件64位,但软件可是64位或32位的),目前我烧写的buster的RaspberryPi的32系统(可以认为是软件32位),

A)用 cat /proc/cpuinfo查看到:

pi@raspberrypi:~/Downloads$ cat /proc/cpuinfo

processor       : 3
BogoMIPS        : 38.40
Features        : fp asimd evtstrm crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant     : 0x0
CPU part        : 0xd03
CPU revision    : 4

Hardware        : BCM2835
Serial          : 00000000b5af232c
Model           : Raspberry Pi 3 Model B

(这里我只列出一项,而且显示BCM2835,这里不用纠结,BCM2835是架构系列,为了保持简洁而为,你认为就是硬件的BCM2837rifbg就行)
-------------------------------------------------------

B)系统信息

用getconf LONG_BIT查看指令集为32位
pi@raspberrypi:~ $ getconf LONG_BIT
32
pi@raspberrypi:~ $ cat /proc/version
Linux version 5.4.83-v7+ (dom@buildbot) (gcc version 8.4.0 (Ubuntu/Linaro 8.4.0-3ubuntu1)) #1379 SMP Mon Dec 14 13:08:57 GMT 2020

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.83-v7+ #1379 SMP Mon Dec 14 13:08:57 GMT 2020 armv7l GNU/Linux

2.用aarch64位编译器(因为硬件支持64位)去编译32的uboot和linux

A)aarch64编译器搭建

参见Building a cross toolchain for Raspberry Pi 3 Model B

git clone https://github.com/crosstool-ng/crosstool-ng.git
cd crosstool-ng/ ## Tested until the following commit id.

git checkout 75d7525a

./bootstrap
./configure --enable-local
make -j`nproc`

./ct-ng aarch64-rpi3-linux-gnu

./ct-ng menuconfig

./ct-ng build

echo 'export PATH=$PATH:$HOME/x-tools/aarch64-rpi3-linux-gnu/bin/' >> ~/.bashrc
source ~/.bashrc

B) uboot编译

git clone git://git.denx.de/u-boot.git

cd u-boot

make clean; make mrproper; make distclean

export CROSS_COMPILE=aarch64-rpi3-linux-gnu- make rpi_3_defconfig

make -j`nproc`

最后生成uboot.bin

>cp uboot.bin /media/jimmy/boot/u-boot_compile_aar64rpi3.bin(这里boot为我的sd卡,自动挂载到ubuntu的/media/jimmy/)

C)内核编译

git clone https://github.com/raspberrypi/linux.git

cd linux

git checkout rpi-4.19.y

export ARCH=arm64 # This should match one of the directories in `arch` folder.

export CROSS_COMPILE=aarch64-rpi3-linux-gnu-

export PATH=$PATH:~/x-tools/aarch64-rpi3-linux-gnu/bin/

make bcmrpi3_defconfig

make -j`nproc`

cp arch/arm64/boot/Image /media/jimmy/boot/Image64_4.19  #这里boot位我的sdcard的boot分区
cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb /media/jimmy/boot/

D)修改config.txt

gpu_mem=128
enable_uart=1
arm_64bit=1
device_tree_address=0x100
device_tree_end=0x8000
#kernel=u-boot_aar64_rpi3.bin
kernel=u-boot_compile_aar64rpi3.bin
#kernel=u-boot_rpi3b.bin
#kernel=u-boot64-3bplus.bin

E)插卡启动

U-Boot> print
arch=arm
baudrate=115200
board=rpi
board_name=3 Model B
board_rev=0x8
board_rev_scheme=1
board_revision=0xA22082

kernel_addr_r=0x80000

U-Boot>echo ${fdtcontroladdr}
37fcd310

F)修改uboot环境变量bootargs(网上有很多其他设置,这里我就设置console=ttyS0,即板上的uart0,我买了个usr转usb,也可以设置为console=ttyAMA0,即HDMI显示器)

>setenv bootargs "8250.nr_uarts=1 root=/dev/mmcblk0p2 rootwait console=ttyS0,115200"

 U-Boot>fatload mmc 0 0x80000 Image64_4.19
14770688 bytes read in 635 ms (22.2 MiB/s)
U-Boot> booti ${kernel_addr_r} - ${fdtcontroladdr}

---------------------------------------------------------------------------

注意:这里我用${fdtcontroladdr}成功,而按照网上很多直接加载dtd文件到内存都失败在Starting kernel ...,失败命令如下:

fatload mmc 0:1 0x80000 Image64_4.19
fatload mmc 0:1 0x2600000 bcm2710-rpi-3-b.dtb

(或fatload mmc 0:1 0x2000000 Image64_4.19
fatload mmc 0:1 0x200000 bcm2710-rpi-3-b.dtb)

---------------------------------------------------------------------------

U-Boot> booti ${kernel_addr_r} - ${fdtcontroladdr}

成功启动后显示如下:

-----------------------------------------------------------------
## Flattened Device Tree blob at 37fcd310
   Booting using the fdt blob at 0x37fcd310
   Using Device Tree in place at 0000000037fcd310, end 0000000037fd508f

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 4.19.127-v8+ (jimmy@ubuntu) (gcc version 9.2.0 (cro                                                                             sstool-NG 1.24.0.103_75d7525)) #1 SMP PREEMPT Fri Oct 15 15:44:00 PDT 2021
[    0.000000] Machine model: Raspberry Pi 3 Model B
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 8 MiB at 0x0000000037400000
[    0.000000] random: get_random_bytes called from start_kernel+0xa0/0x470 with                                                                              crng_init=0
[    0.000000] percpu: Embedded 23 pages/cpu s56728 r8192 d29288 u94208
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: enabling workaround for ARM erratum 843419
[    0.000000] CPU features: enabling workaround for ARM erratum 845719
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 225792
[    0.000000] Kernel command line: 8250.nr_uarts=1 root=/dev/mmcblk0p2 rootwait                                                                              console=ttyS0,115200
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[    0.000000] Memory: 875464K/917504K available (8060K kernel code, 984K rwdata                                                                             , 2476K rodata, 2880K init, 933K bss, 33848K reserved, 8192K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] ftrace: allocating 27700 entries in 109 pages
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] arch_timer: cp15 timer(s) running at 19.20MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles:                                                                              0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000007] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 43980                                                                             46511078ns
[    0.000233] Console: colour dummy device 80x25
[    0.000294] Calibrating delay loop (skipped), value calculated using timer fr                                                                             equency.. 38.40 BogoMIPS (lpj=19200)
[    0.000321] pid_max: default: 32768 minimum: 301
[    0.000708] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.000743] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[    0.008153] ASID allocator initialised with 32768 entries
[    0.010150] rcu: Hierarchical SRCU implementation.
[    0.012636] EFI services will not be available.
[    0.014222] smp: Bringing up secondary CPUs ...
[    0.022477] Detected VIPT I-cache on CPU1
[    0.022541] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.030598] Detected VIPT I-cache on CPU2
[    0.030644] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.038740] Detected VIPT I-cache on CPU3
[    0.038784] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.038969] smp: Brought up 1 node, 4 CPUs
[    0.039025] SMP: Total of 4 processors activated.
[    0.039048] CPU features: detected: 32-bit EL0 Support
[    0.039730] CPU: All CPU(s) started at EL2
[    0.039816] alternatives: patching kernel code
[    0.041477] devtmpfs: initialized
[    0.055244] Enabled cp15_barrier support
[    0.055288] Enabled setend support
[    0.055831] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma                                                                             x_idle_ns: 1911260446275000 ns
[    0.055867] futex hash table entries: 1024 (order: 4, 65536 bytes)
[    0.056575] pinctrl core: initialized pinctrl subsystem
[    0.056950] DMI not present or invalid.
[    0.057365] NET: Registered protocol family 16
[    0.063202] cpuidle: using governor menu
[    0.063485] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[    0.069455] DMA: preallocated 256 KiB pool for atomic allocations
[    0.069611] Serial: AMBA PL011 UART driver
[    0.077650] bcm2835-mbox 3f00b880.mailbox: mailbox enabled
[    0.088476] raspberrypi-firmware soc:firmware: Attached to firmware from 2021                                                                             -04-30 13:48, variant start_x
[    0.089494] raspberrypi-firmware soc:firmware: Firmware hash is d7f29d96450ab                                                                             fc77cd6cf011af1faf1e03e5e56
[    0.126684] bcm2835-dma 3f007000.dma: DMA legacy API manager at (____ptrval__                                                                             __), dmachans=0x1
[    0.129150] SCSI subsystem initialized
[    0.129461] usbcore: registered new interface driver usbfs
[    0.129537] usbcore: registered new interface driver hub
[    0.129692] usbcore: registered new device driver usb
[    0.131310] clocksource: Switched to clocksource arch_sys_counter
[    0.255534] VFS: Disk quotas dquot_6.6.0
[    0.255656] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.255876] FS-Cache: Loaded
[    0.256146] CacheFiles: Loaded
[    0.269398] NET: Registered protocol family 2
[    0.270370] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192                                                                              bytes)
[    0.270421] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    0.270549] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[    0.270752] TCP: Hash tables configured (established 8192 bind 8192)
[    0.270983] UDP hash table entries: 512 (order: 2, 16384 bytes)
[    0.271046] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[    0.271436] NET: Registered protocol family 1
[    0.272403] RPC: Registered named UNIX socket transport module.
[    0.272422] RPC: Registered udp transport module.
[    0.272440] RPC: Registered tcp transport module.
[    0.272457] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.274128] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counte                                                                             rs available
[    0.276491] Initialise system trusted keyrings
[    0.276853] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.288947] FS-Cache: Netfs 'nfs' registered for caching
[    0.290064] NFS: Registering the id_resolver key type
[    0.290129] Key type id_resolver registered
[    0.290147] Key type id_legacy registered
[    0.290180] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.298007] Key type asymmetric registered
[    0.298034] Asymmetric key parser 'x509' registered
[    0.298117] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 2                                                                             50)
[    0.298457] io scheduler noop registered
[    0.298478] io scheduler deadline registered
[    0.298715] io scheduler cfq registered (default)
[    0.298736] io scheduler mq-deadline registered
[    0.298756] io scheduler kyber registered
[    0.304512] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
[    0.305975] console [ttyS0] disabled
[    0.306068] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 61, base_baud = 5000000                                                                             0) is a 16550
[    0.893652] console [ttyS0] enabled
[    0.898952] bcm2835-rng 3f104000.rng: hwrng registered
[    0.904835] vc-mem: phys_addr:0x00000000 mem_base=0x00000000 mem_size:0x00000                                                                             000(0 MiB)
[    0.914015] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.935283] brd: module loaded
[    0.953451] loop: module loaded
[    0.957627] Loading iSCSI transport class v2.0-870.
[    0.963811] libphy: Fixed MDIO Bus: probed
[    0.968127] usbcore: registered new interface driver lan78xx
[    0.973978] usbcore: registered new interface driver smsc95xx
[    0.979855] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    1.037801] dwc2 3f980000.usb: dwc2_check_params: Invalid parameter lpm=1
[    1.044733] dwc2 3f980000.usb: dwc2_check_params: Invalid parameter lpm_clock                                                                             _gating=1
[    1.052804] dwc2 3f980000.usb: dwc2_check_params: Invalid parameter besl=1
[    1.059816] dwc2 3f980000.usb: dwc2_check_params: Invalid parameter hird_thre                                                                             shold_en=1
[    1.068945] dwc2 3f980000.usb: DWC OTG Controller
[    1.073780] dwc2 3f980000.usb: new USB bus registered, assigned bus number 1
[    1.081006] dwc2 3f980000.usb: irq 41, io mem 0x3f980000
[    1.086827] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bc                                                                             dDevice= 4.19
[    1.095253] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=                                                                             1
[    1.102617] usb usb1: Product: DWC OTG Controller
[    1.107426] usb usb1: Manufacturer: Linux 4.19.127-v8+ dwc2_hsotg
[    1.113644] usb usb1: SerialNumber: 3f980000.usb
[    1.119100] hub 1-0:1.0: USB hub found
[    1.123012] hub 1-0:1.0: 1 port detected
[    1.128110] usbcore: registered new interface driver usb-storage
[    1.135862] bcm2835-wdt bcm2835-wdt: Broadcom BCM2835 watchdog timer
[    1.143324] bcm2835-cpufreq: min=600000 max=1200000
[    1.150174] sdhci: Secure Digital Host Controller Interface driver
[    1.156487] sdhci: Copyright(c) Pierre Ossman
[    1.161559] sdhost-bcm2835 3f202000.mmc: /aliases ID not available
[    1.168257] sdhost: log_buf @ (____ptrval____) (f7441000)
[    1.243810] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    1.249651] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.257243] ledtrig-cpu: registered to indicate activity on CPUs
[    1.263485] hidraw: raw HID events driver (C) Jiri Kosina
[    1.269185] usbcore: registered new interface driver usbhid
[    1.274875] usbhid: USB HID core driver
[    1.279084] Initializing XFRM netlink socket
[    1.283484] NET: Registered protocol family 17
[    1.288171] Key type dns_resolver registered
[    1.293645] registered taskstats version 1
[    1.297850] Loading compiled-in X.509 certificates
[    1.312239] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 66, base_baud                                                                              = 0) is a PL011 rev2
[    1.325365] of_cfs_init
[    1.326549] mmc0: host does not support reading read-only switch, assuming wr                                                                             ite-enable
[    1.328000] of_cfs_init: OK
[    1.339956] mmc0: new high speed SDHC card at address aaaa
[    1.340058] Waiting for root device /dev/mmcblk0p2...
[    1.347572] mmcblk0: mmc0:aaaa SK32G 29.7 GiB
[    1.357769]  mmcblk0: p1 p2
[    1.370740] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesyst                                                                             em
[    1.378227] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
[    1.528364] usb 1-1: new high-speed USB device number 2 using dwc2
[    1.556926] EXT4-fs (mmcblk0p2): recovery complete
[    1.564282] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. O                                                                             pts: (null)
[    1.572627] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    1.580826] devtmpfs: mounted
[    1.591815] Freeing unused kernel memory: 2880K
[    1.596650] Run /sbin/init as init process
[    1.671214] random: fast init done
[    1.712707] usb 1-1: New USB device found, idVendor=0424, idProduct=9514, bcd                                                                             Device= 2.00
[    1.721212] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    1.729283] hub 1-1:1.0: USB hub found
[    1.733490] hub 1-1:1.0: 5 ports detected
[    2.021391] usb 1-1.1: new high-speed USB device number 3 using dwc2
[    2.115867] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00, b                                                                             cdDevice= 2.00
[    2.124430] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber                                                                             =0
[    2.134804] smsc95xx v1.0.6
[    2.183679] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-                                                                             1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:af:23:2c
[    2.242051] systemd[1]: System time before build time, advancing clock.
[    2.271374] usb 1-1.2: new low-speed USB device number 4 using dwc2
[    2.314430] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SEL                                                                             INUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +                                                                             XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybr                                                                             id)
[    2.337195] systemd[1]: Detected architecture arm64.

Welcome to Raspbian GNU/Linux 10 (buster)!

[    2.358325] systemd[1]: Set hostname to .
[    2.372393] usb 1-1.2: New USB device found, idVendor=413c, idProduct=2107, b                                                                             cdDevice= 1.78
[    2.380952] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber                                                                             =0
[    2.388451] usb 1-1.2: Product: Dell USB Entry Keyboard
[    2.393993] usb 1-1.2: Manufacturer: DELL
[    2.405835] input: DELL Dell USB Entry Keyboard as /devices/platform/soc/3f98                                                                             0000.usb/usb1/1-1/1-1.2/1-1.2:1.0/0003:413C:2107.0001/input/input0
[    2.471216] hid-generic 0003:413C:2107.0001: input,hidraw0: USB HID v1.10 Key                                                                             board [DELL Dell USB Entry Keyboard] on usb-3f980000.usb-1.2/input0
[    2.563411] usb 1-1.3: new low-speed USB device number 5 using dwc2
[    2.665463] usb 1-1.3: New USB device found, idVendor=046d, idProduct=c063, b                                                                             cdDevice=57.00
[    2.674043] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber                                                                             =0
[    2.681562] usb 1-1.3: Product: DELL USB Laser Mouse
[    2.686675] usb 1-1.3: Manufacturer: DELL
[    2.698025] input: DELL DELL USB Laser Mouse as /devices/platform/soc/3f98000                                                                             0.usb/usb1/1-1/1-1.3/1-1.3:1.0/0003:046D:C063.0002/input/input1
[    2.711202] hid-generic 0003:046D:C063.0002: input,hidraw1: USB HID v1.10 Mou                                                                             se [DELL DELL USB Laser Mouse] on usb-3f980000.usb-1.3/input0
[    3.309503] random: systemd: uninitialized urandom read (16 bytes read)
[    3.331471] random: systemd: uninitialized urandom read (16 bytes read)
[    3.339440] systemd[1]: Set up automount Arbitrary Executable File Formats Fi                                                                             le System Automount Point.
[  OK  ] Set up automount Arbitrary…s File System Automount Point.
[    3.360615] random: systemd: uninitialized urandom read (16 bytes read)
[    3.373222] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[  OK  ] Created slice system-systemd\x2dfsck.slice.
[    3.389709] systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
[    3.402120] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[    3.420352] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    3.436919] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    3.466637] systemd[1]: Starting Set the console keyboard layout...
         Starting Set the console keyboard layout...
         Mounting POSIX Message Queue File System...
[  OK  ] Listening on udev Control Socket.
[    3.510077] random: crng init done
[    3.513558] random: 7 urandom warning(s) missed due to ratelimiting
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Listening on Syslog Socket.
[  OK  ] Listening on Journal Socket (/dev/log).
         Mounting Kernel Debug File System...
[  OK  ] Listening on fsck to fsckd communication Socket.
[  OK  ] Started Forward Password R…uests to Wall Directory Watch.
         Starting Journal Service...
         Starting Restore / save the current clock...
[  OK  ] Listening on udev Kernel Socket.
         Mounting RPC Pipe File System...
         Starting udev Coldplug all Devices...
         Starting Load Kernel Modules...
[  OK  ] Reached target Slices.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Started Restore / save the current clock.
[  OK  ] Mounted RPC Pipe File System.
[FAILED] Failed to start Load Kernel Modules.
See 'systemctl status systemd-modules-load.service' for details.
         Mounting Kernel Configuration File System...
         Starting Apply Kernel Variables...
         Starting File System Check on Root Device...
[  OK  ] Started Journal Service.
[  OK  ] Mounted Kernel Configuration File System.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Started File System Check Daemon to report status.
[  OK  ] Started File System Check on Root Device.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Started Set the console keyboard layout.
[  OK  ] Started udev Coldplug all Devices.
         Starting Helper to synchronize boot up for ifupdown...
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Started Helper to synchronize boot up for ifupdown.
         Starting Load/Save Random Seed...
         Starting Flush Journal to Persistent Storage...
         Starting Create System Users...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started Create System Users.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Started udev Kernel Device Manager.
         Starting Show Plymouth Boot Screen...
[  OK  ] Started Show Plymouth Boot Screen.
[  OK  ] Reached target Local Encrypted Volumes.
[  OK  ] Started Forward Password R…s to Plymouth Directory Watch.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /dev/disk/by-partuuid/8beeb67a-01.
         Starting File System Check…isk/by-partuuid/8beeb67a-01...
[  OK  ] Started File System Check …/disk/by-partuuid/8beeb67a-01.
         Mounting /boot...
[  OK  ] Mounted /boot.
[  OK  ] Reached target Local File Systems.
         Starting Preprocess NFS configuration...
         Starting Create Volatile Files and Directories...
         Starting Raise network interfaces...
         Starting Set console font and keymap...
         Starting Tell Plymouth To Write Out Runtime Data...
[  OK  ] Started Preprocess NFS configuration.
[  OK  ] Reached target NFS client services.
[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Set console font and keymap.
[  OK  ] Started Create Volatile Files and Directories.
         Starting Network Time Synchronization...
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Started Raise network interfaces.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on CUPS Scheduler.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Listening on triggerhappy.socket.
[  OK  ] Started CUPS Scheduler.
[  OK  ] Reached target Paths.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting rng-tools.service...
         Starting System Logging Service...
         Starting dphys-swapfile - …unt, and delete a swap file...
[  OK  ] Started CUPS Scheduler.
         Starting Login Service...
         Starting Check for Raspberry Pi EEPROM updates...
         Starting Check for v3d driver...
         Starting dhcpcd on all interfaces...
[  OK  ] Started Regular background program processing daemon.
         Starting triggerhappy global hotkey daemon...
         Starting LSB: Switch to on…nless shift key is pressed)...
         Starting Avahi mDNS/DNS-SD Stack...
         Starting Disk Manager...
[  OK  ] Started D-Bus System Message Bus.
         Starting WPA supplicant...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily man-db regeneration.
[  OK  ] Started Daily rotation of log files.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Started System Logging Service.
[  OK  ] Started triggerhappy global hotkey daemon.
[  OK  ] Started rng-tools.service.
[FAILED] Failed to start Check for Raspberry Pi EEPROM updates.
See 'systemctl status rpi-eeprom-update.service' for details.
[  OK  ] Started Check for v3d driver.
[  OK  ] Started dhcpcd on all interfaces.
[  OK  ] Started dphys-swapfile - s…mount, and delete a swap file.
[  OK  ] Started Login Service.
[  OK  ] Started Avahi mDNS/DNS-SD Stack.
[  OK  ] Started WPA supplicant.
         Starting Authorization Manager...
         Starting Manage, Install and Generate Color Profiles...
[  OK  ] Started Make remote CUPS printers available locally.
[  OK  ] Reached target Network.
[  OK  ] Started VNC Server in Service Mode daemon.
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
         Starting /etc/rc.local Compatibility...
[  OK  ] Started LSB: Switch to ond…(unless shift key is pressed).
[  OK  ] Started /etc/rc.local Compatibility.
[  OK  ] Started Permit User Sessions.
         Starting Hold until boot process finishes up...
         Starting Light Display Manager...
[  OK  ] Started Manage, Install and Generate Color Profiles.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Started Authorization Manager.

Raspbian GNU/Linux 10 raspberrypi ttyS0

-----------------------------------------------------------------

登录后:
pi@raspberrypi:~/Downloads$ cat /proc/version
Linux version 4.19.127-v8+ (jimmy@ubuntu) (gcc version 9.2.0 (crosstool-NG 1.24.0.103_75d7525)) #1 SMP PREEMPT Fri Oct 15 15:44:00 PDT 2021
pi@raspberrypi:~/Downloads$ uname -a
Linux raspberrypi 4.19.127-v8+ #1 SMP PREEMPT Fri Oct 15 15:44:00 PDT 2021 aarch64 GNU/Linux

pi@raspberrypi:~/Downloads$ getconf LONG_BIT
32

问题:但是为什么 getconf LONG_BIT还是显示32(是不是和选取的编译配置有关,网上说如果选uboot选rpi_3_b_plus_defconfig和linux选bcm2711_defconfig就是64位的,没验证,留给大家思考)

备注:虚拟机上传到googledriver上:

https://drive.google.com/file/d/1GGbvsEOTuvQgmryVM9Moc-ZcfEo-KwjM/view?usp=sharing

你可能感兴趣的:(Raspberry,pi,B,linux,stm32)