User Tools

Site Tools



en:rpi3b:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:rpi3b:start [2020/02/29 17:42] – [uboot] franken:rpi3b:start [2023/06/08 17:06] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Raspberry Pi3b ======
  
 +===== uboot =====
 +
 +replace kernel.img (and rename kernel7.img so that there is no kernel*.img) on boot-partition with upstream-uboot built with this:
 +
 +<code>
 +export ARCH=arm
 +export CROSS_COMPILE=arm-linux-gnueabihf-
 +make rpi_3_32b_defconfig
 +make -j8
 +</code>
 +
 +if hdmi-output is scary, you can try changing hdmi_mode (https://www.raspberrypi.org/documentation/configuration/config-txt/video.md)
 +
 +in my case i used 
 +
 +  hdmi_group=1
 +  hdmi_mode=4
 +
 +for a 1024x600 display
 +===== Kernel =====
 +
 +original kernel can be loaded like this:
 +
 +<code>
 +U-Boot> setenv fdtfile backup/bcm2710-rpi-3-b.dtb                                                                                                
 +U-Boot> fatload mmc 0:1 ${fdt_addr} ${fdtfile}                                                                                                   
 +26480 bytes read in 5 ms (5.1 MiB/s)                                                                                                             
 +U-Boot> fatload mmc 0:1 ${kernel_addr_r} backup/kernel7l.img                                                                                     
 +5757200 bytes read in 250 ms (22 MiB/s)                                                                                                          
 +U-Boot> setenv bootargs earlyprintk console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait noinitrd video=1024x600-32                      
 +U-Boot> bootz ${kernel_addr_r} - ${fdt_addr}
 +</code>
 +
 +have not got serial console working after uboot...
 +
 +have compiled new kernel like this:
 +
 +<code>
 +export ARCH=arm
 +export CROSS_COMPILE=arm-linux-gnueabi-
 +export LOCALVERSION=-rpi3
 +CPUCORES=$(grep -c processor /proc/cpuinfo)
 +make bcm2835_defconfig
 +make -j$CPUCORES zImage modules dtbs 2> >(tee -a build.log >&2)
 +
 +BOOTFS=/media/$USER/boot
 +ROOTFS=/media/$USER/rootfs
 +KERNELNAME="mykernel-"$(make kernelversion)
 +export INSTALL_MOD_PATH=$ROOTFS
 +sudo make  modules_install
 +sudo cp $BOOTFS/$KERNELNAME.img $BOOTFS/$KERNELNAME-backup.img
 +sudo cp arch/arm/boot/zImage $BOOTFS/$KERNELNAME.img
 +sudo cp arch/arm/boot/dts/bcm2837-rpi-3-b.dtb $BOOTFS/
 +</code>