This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 224401de72e7e08403cd07774d4f311d2e86c3a7 (commit) via 8649a31ed040795b09228c8f3fa181d001614541 (commit) from f08c14477ed0f875a86d01c1d11bc234766953aa (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 224401de72e7e08403cd07774d4f311d2e86c3a7 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Wed Mar 16 23:05:06 2016 +0100
linux-pae: add root (hd0) to grub.conf for virt install.
jiffybox will not load the kernel without this entry. not tested on citrix yet.
commit 8649a31ed040795b09228c8f3fa181d001614541 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Wed Mar 16 22:58:21 2016 +0100
u-boot: fix fat16 reader
-----------------------------------------------------------------------
Summary of changes: config/xen-image/xen-image-maker.sh | 1 + lfs/u-boot | 2 + src/paks/linux-pae/install.sh | 1 + ...ot-v2-fs-fat-read-fix-fat16-ls-read-issue.patch | 128 +++++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 src/patches/U-Boot-v2-fs-fat-read-fix-fat16-ls-read-issue.patch
Difference in files: diff --git a/config/xen-image/xen-image-maker.sh b/config/xen-image/xen-image-maker.sh index 28f005d..07414f7 100644 --- a/config/xen-image/xen-image-maker.sh +++ b/config/xen-image/xen-image-maker.sh @@ -130,6 +130,7 @@ mkdir $MNThdd/boot/grub echo "timeout 10" > $MNThdd/boot/grub/grub.conf echo "default 0" >> $MNThdd/boot/grub/grub.conf echo "title IPFire ($KERN_TYPE-kernel)" >> $MNThdd/boot/grub/grub.conf +echo " root (hd0) >> $MNThdd/boot/grub/grub.conf echo " kernel /vmlinuz-$KVER-ipfire-$KERN_TYPE root=/dev/$P3 rootdelay=10 panic=10 console=$CONSOLE" \ >> $MNThdd/boot/grub/grub.conf echo " initrd /initramfs-$KVER-ipfire-$KERN_TYPE.img" >> $MNThdd/boot/grub/grub.conf diff --git a/lfs/u-boot b/lfs/u-boot index 28f6508..3b3fbf2 100644 --- a/lfs/u-boot +++ b/lfs/u-boot @@ -75,6 +75,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+ cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/U-Boot-v2-fs-fat-read-fix-fat16-ls-read-issue.patch + # Pandaboard -mkdir -pv /usr/share/u-boot/pandaboard cd $(DIR_APP) && make CROSS_COMPILE="" omap4_panda_config diff --git a/src/paks/linux-pae/install.sh b/src/paks/linux-pae/install.sh index 4ebb38b..58a9c1c 100644 --- a/src/paks/linux-pae/install.sh +++ b/src/paks/linux-pae/install.sh @@ -67,6 +67,7 @@ else echo "timeout 10" > /boot/grub/grub.conf echo "default 0" >> /boot/grub/grub.conf echo "title IPFire (pae-kernel)" >> /boot/grub/grub.conf + echo " root (hd0)" >> /boot/grub/grub.conf echo " kernel /vmlinuz-$KVER-ipfire-pae root=/dev/$ROOT rootdelay=10 panic=10 console=hvc0" \ >> /boot/grub/grub.conf echo " initrd /initramfs-$KVER-ipfire-pae.img" >> /boot/grub/grub.conf diff --git a/src/patches/U-Boot-v2-fs-fat-read-fix-fat16-ls-read-issue.patch b/src/patches/U-Boot-v2-fs-fat-read-fix-fat16-ls-read-issue.patch new file mode 100644 index 0000000..39acf14 --- /dev/null +++ b/src/patches/U-Boot-v2-fs-fat-read-fix-fat16-ls-read-issue.patch @@ -0,0 +1,128 @@ +diff --git a/fs/fat/fat.c b/fs/fat/fat.c +index 04a51db..bccc3e3 100644 +--- a/fs/fat/fat.c ++++ b/fs/fat/fat.c +@@ -823,8 +823,11 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer, + int ret = -1; + int firsttime; + __u32 root_cluster = 0; ++ __u32 read_blk; + int rootdir_size = 0; +- int j; ++ int buffer_blk_cnt; ++ int do_read; ++ __u8 *dir_ptr; + + if (read_bootsectandvi(&bs, &volinfo, &mydata->fatsize)) { + debug("Error: reading boot sector\n"); +@@ -909,24 +912,54 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer, + isdir = 1; + } + +- j = 0; ++ buffer_blk_cnt = 0; ++ firsttime = 1; + while (1) { + int i; + +- if (j == 0) { +- debug("FAT read sect=%d, clust_size=%d, DIRENTSPERBLOCK=%zd\n", +- cursect, mydata->clust_size, DIRENTSPERBLOCK); ++ if (mydata->fatsize == 32 || firsttime) { ++ dir_ptr = do_fat_read_at_block; ++ firsttime = 0; ++ } else { ++ /** ++ * FAT16 sector buffer modification: ++ * Each loop, the second buffered block is moved to ++ * the buffer begin, and two next sectors are read ++ * next to the previously moved one. So the sector ++ * buffer keeps always 3 sectors for fat16. ++ * And the current sector is the buffer second sector ++ * beside the "firsttime" read, when it is the first one. ++ * ++ * PREFETCH_BLOCKS is 2 for FAT16 == loop[0:1] ++ * n = computed root dir sector ++ * loop | cursect-1 | cursect | cursect+1 | ++ * 0 | sector n+0 | sector n+1 | none | ++ * 1 | none | sector n+0 | sector n+1 | ++ * 0 | sector n+1 | sector n+2 | sector n+3 | ++ * 1 | sector n+3 | ... ++ */ ++ dir_ptr = (do_fat_read_at_block + mydata->sect_size); ++ memcpy(do_fat_read_at_block, dir_ptr, mydata->sect_size); ++ } ++ ++ do_read = 1; ++ ++ if (mydata->fatsize == 32 && buffer_blk_cnt) ++ do_read = 0; ++ ++ if (do_read) { ++ read_blk = (mydata->fatsize == 32) ? ++ mydata->clust_size : PREFETCH_BLOCKS; ++ ++ debug("FAT read(sect=%d, cnt:%d), clust_size=%d, DIRENTSPERBLOCK=%zd\n", ++ cursect, read_blk, mydata->clust_size, DIRENTSPERBLOCK); + +- if (disk_read(cursect, +- (mydata->fatsize == 32) ? +- (mydata->clust_size) : +- PREFETCH_BLOCKS, +- do_fat_read_at_block) < 0) { ++ if (disk_read(cursect, read_blk, dir_ptr) < 0) { + debug("Error: reading rootdir block\n"); + goto exit; + } + +- dentptr = (dir_entry *) do_fat_read_at_block; ++ dentptr = (dir_entry *)dir_ptr; + } + + for (i = 0; i < DIRENTSPERBLOCK; i++) { +@@ -951,7 +984,7 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer, + + get_vfatname(mydata, + root_cluster, +- do_fat_read_at_block, ++ dir_ptr, + dentptr, l_name); + + if (dols == LS_ROOT) { +@@ -1062,7 +1095,7 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer, + + goto rootdir_done; /* We got a match */ + } +- debug("END LOOP: j=%d clust_size=%d\n", j, ++ debug("END LOOP: buffer_blk_cnt=%d clust_size=%d\n", buffer_blk_cnt, + mydata->clust_size); + + /* +@@ -1070,10 +1103,10 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer, + * root directory clusters when a cluster has been + * completely processed. + */ +- ++j; ++ ++buffer_blk_cnt; + int rootdir_end = 0; + if (mydata->fatsize == 32) { +- if (j == mydata->clust_size) { ++ if (buffer_blk_cnt == mydata->clust_size) { + int nxtsect = 0; + int nxt_clust = 0; + +@@ -1086,11 +1119,11 @@ int do_fat_read_at(const char *filename, loff_t pos, void *buffer, + root_cluster = nxt_clust; + + cursect = nxtsect; +- j = 0; ++ buffer_blk_cnt = 0; + } + } else { +- if (j == PREFETCH_BLOCKS) +- j = 0; ++ if (buffer_blk_cnt == PREFETCH_BLOCKS) ++ buffer_blk_cnt = 0; + + rootdir_end = (++cursect - mydata->rootdir_sect >= + rootdir_size);
hooks/post-receive -- IPFire 2.x development tree