##// END OF EJS Templates
add bc if uboot gets compiled
Unknown -
r323:3bb7303416dc
parent child
Show More
@@ -41,12 +41,12 if [ "$ENABLE_UBOOT" = true ] ; then
41 41 printf "\n# boot u-boot kernel\nkernel=u-boot.bin\n" >> "${BOOT_DIR}/config.txt"
42 42
43 43 # Install and setup U-Boot command file
44 install_readonly files/boot/uboot.mkimage "${BOOT_DIR}/uboot.mkimage"
45 printf "# Set the kernel boot command line\nsetenv bootargs \"earlyprintk ${CMDLINE}\"\n\n$(cat "${BOOT_DIR}"/uboot.mkimage)" > "${BOOT_DIR}/uboot.mkimage"
46 #Set correkt KERNEL_IMAGE
44 # Set correct KERNEL_IMAGE in mkfile
47 45 sed -i "s/kernel7.img/$KERNEL_BIN_IMAGE/g" files/boot/uboot.mkimage
48 #Set correct DTB_FILE
46 # Set correct DTB_FILE
49 47 sed -i "s/bcm2709-rpi-2-b.dtb/$DTB_FILE/g" files/boot/uboot.mkimage
48 install_readonly files/boot/uboot.mkimage "${BOOT_DIR}/uboot.mkimage"
49 printf "# Set the kernel boot command line\nsetenv bootargs \"earlyprintk ${CMDLINE}\"\n\n$(cat "${BOOT_DIR}"/uboot.mkimage)" > "${BOOT_DIR}/uboot.mkimage"
50 50
51 51 if [ "$ENABLE_INITRAMFS" = true ] ; then
52 52 # Convert generated initramfs for U-Boot using mkimage
@@ -70,22 +70,24 if [ "$ENABLE_UBOOT" = true ] ; then
70 70 printf "\nbootz \${kernel_addr_r} - \${fdt_addr_r}" >> "${BOOT_DIR}/uboot.mkimage"
71 71 fi
72 72 fi
73
73
74 74 if [ "$SET_ARCH" = 64 ] ; then
75 75 echo "Setting up config.txt to boot 64bit uboot"
76 printf \n# Tell u-boot a 64bit kernel is used\narm_64bit=1\n" >> "${BOOT_DIR}/config.txt"
77 printf \n# Device tree start addr\ndevice_tree_address=0x100\n" >> "${BOOT_DIR}/config.txt"
78 printf \n# Device tree stop adrr\ndevice_tree_end=0x8000\n" >> "${BOOT_DIR}/config.txt"
79 #to config.txt
76 printf "\n# Tell u-boot a 64bit kernel is used\narm_64bit=1\n" >> "${BOOT_DIR}/config.txt"
77 printf "\n# Device tree start addr\ndevice_tree_address=0x100\n" >> "${BOOT_DIR}/config.txt"
78 printf "\n# Device tree stop adrr\ndevice_tree_end=0x8000\n" >> "${BOOT_DIR}/config.txt"
80 79 fi
81 80
82 81 # Set mkfile to use the correct mach id
83 82 if [ "$ENABLE_QEMU" = true ] ; then
84 83 sed -i "s/^\(setenv machid \).*/\10x000008e0/" "${BOOT_DIR}/uboot.mkimage"
85 84 fi
85
86 # Set mkfile to use the correct dtb file
87 sed -i "s/^\(setenv dtbfile \).*/\1${DTB_FILE}/" "${BOOT_DIR}/uboot.mkimage"
86 88
87 89 # Set mkfile to use kernel image
88 sed -i "s/^\(fatload mmc 0:1 \${kernel_addr_r} \).*/\1${KERNEL_IMAGE}/" "${BOOT_DIR}/uboot.mkimage"
90 sed "s/^\(fatload mmc 0:1 \${kernel_addr_r} \).*/\1${KERNEL_IMAGE}/" "${BOOT_DIR}/uboot.mkimage"
89 91
90 92 # Remove all leading blank lines
91 93 sed -i "/./,\$!d" "${BOOT_DIR}/uboot.mkimage"
@@ -340,7 +340,7 fi
340 340
341 341 # Add device-tree-compiler required for building the U-Boot bootloader
342 342 if [ "$ENABLE_UBOOT" = true ] ; then
343 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bison,flex"
343 APT_INCLUDES="${APT_INCLUDES},device-tree-compiler,bison,flex,bc"
344 344 fi
345 345
346 346 # Check if root SSH (v2) public key file exists
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant