From 65093d0377383cd039b40b3bf4e38e3cdfdc2250 Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Mon, 06 Nov 2023 10:53:26 +0800
Subject: [PATCH] Add old u-boot and linux kernel patch

---
 images/build.sh |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/images/build.sh b/images/build.sh
index a3f5808..41e207e 100755
--- a/images/build.sh
+++ b/images/build.sh
@@ -91,7 +91,7 @@
     export BOOT_SIZE=`jq -r ".system.bootsize" $CONF_FILE | tr 'A-Z' 'a-z'`
 
     export ROOTFS=rootfs-${DISTRO}-${DISVER}
-    export IMAGE_NAME=$BOARD-$DISTRO-$DISVER-$BSPVER.img
+    export IMAGE_NAME=$DISTRO-$DISVER-$BSPVER.img
 
 
     # i.MX6ULL only need build uboot-imx
@@ -131,7 +131,7 @@
     if [ ! -s $TARBALL_PATH/$ROOTFS.$SUFIX ] ; then
         pr_info "start fetch $ROOTFS source code"
         mkdir -p $TARBALL_PATH
-        wget $URL/bsp/rootfs/$BOARD/$ROOTFS.$SUFIX -P $TARBALL_PATH
+        wget $URL/$BOARD/rootfs/$ROOTFS.$SUFIX -P $TARBALL_PATH
     fi
 
     # decompress source code packet
@@ -180,7 +180,7 @@
     sync
 
     pr_info "start install u-boot image"
-    dd if=$UBOOT_BINPATH/u-boot-${BOARD}.imx of=${IMAGE_NAME} bs=512 seek=66 conv=notrunc,sync
+    dd if=$UBOOT_BINPATH/u-boot-${BOARD}.imx of=${IMAGE_NAME} bs=512 seek=${UBOOT_SECTOR} conv=notrunc,sync
 
     pr_info "start install linux kernel images"
     mkdir -p $MNT_POINT
@@ -254,8 +254,13 @@
     cp $UBOOT_BINPATH/u-boot-${BOARD}.imx $INST_PATH
     mv $IMAGE_NAME $INST_PATH
 
+    cd $INST_PATH
+
+    pr_info "\ncompress system images $IMAGE_NAME"
+    bzip2 $IMAGE_NAME
+
     pr_info "\nsystem images installed to '$INST_PATH'"
-    ls $INST_PATH && echo ""
+    ls && echo ""
 }
 
 function do_clean()

--
Gitblit v1.9.1